all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Viewing pdf images
@ 2017-03-17 12:27 Doyley, Marvin M.
       [not found] ` <52f1d2ee-b964-39ac-3c96-674ad7b6137e@yahoo.com>
  2017-04-09 22:06 ` Eduardo Mercovich
  0 siblings, 2 replies; 14+ messages in thread
From: Doyley, Marvin M. @ 2017-03-17 12:27 UTC (permalink / raw)
  To: emacs-orgmode@gnu.org

[-- Attachment #1: Type: text/plain, Size: 329 bytes --]

Hi there,

For manuscripts, my research group and I typically save images in pdf format, much better resolution. It would be nice to view pdf  images when working in org-mode.
Does anybody know how to view pdf images in org-mode.

Thanks,
M

PS We also work with svg images too, that would also love to view in org-mode

[-- Attachment #2: Message signed with OpenPGP using GPGMail --]
[-- Type: application/pgp-signature, Size: 455 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Viewing pdf images
       [not found] ` <52f1d2ee-b964-39ac-3c96-674ad7b6137e@yahoo.com>
@ 2017-03-17 13:48   ` Doyley, Marvin M.
  2017-03-21 10:34     ` Julian M. Burgos
  0 siblings, 1 reply; 14+ messages in thread
From: Doyley, Marvin M. @ 2017-03-17 13:48 UTC (permalink / raw)
  To: Norwid Behrnd; +Cc: emacs-orgmode@gnu.org, Doyley, Marvin M.

[-- Attachment #1: Type: text/plain, Size: 1010 bytes --]

Doesn’t work. Emacs just Hangs :(
> On Mar 17, 2017, at 8:43 AM, Norwid Behrnd <nbehrnd@yahoo.com> wrote:
> 
> 
> To include and display pdf files, perhaps the setup outlined here is
> still working (dates back 2014...)
> 
> https://urldefense.proofpoint.com/v2/url?u=http-3A__emacs.stackexchange.com_questions_390_display-2Dpdf-2Dimages-2Din-2Dorg-2Dmode&d=DwIC-g&c=kbmfwr1Yojg42sGEpaQh5ofMHBeTl9EI2eaqQZhHbOU&r=s3_3riAscdqtNAzgOuwYB9g0dZVGcp8BNCy_RylYdxU&m=cQ2XAFEKpHWcRH33Hvyanl-V2rE3v-7glys69pwm8CY&s=rmvwv-l1KvLkkUN0iG1d7bT6-MNbzQOFpz5U4-fLPt0&e=
> 
> Cheers.
> 
> 
> 
> On 03/17/2017 01:27 PM, Doyley, Marvin M. wrote:
>> Hi there,
>> 
>> For manuscripts, my research group and I typically save images in pdf
>> format, much better resolution. It would be nice to view pdf  images
>> when working in org-mode. Does anybody know how to view pdf images in
>> org-mode.
>> 
>> Thanks, M
>> 
>> PS We also work with svg images too, that would also love to view in
>> org-mode
>> 


[-- Attachment #2: Message signed with OpenPGP using GPGMail --]
[-- Type: application/pgp-signature, Size: 496 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Viewing pdf images
  2017-03-17 13:48   ` Doyley, Marvin M.
@ 2017-03-21 10:34     ` Julian M. Burgos
  2017-03-22  0:22       ` Doyley, Marvin M.
  0 siblings, 1 reply; 14+ messages in thread
From: Julian M. Burgos @ 2017-03-21 10:34 UTC (permalink / raw)
  To: Doyley, Marvin M.; +Cc: emacs-orgmode@gnu.org, Norwid Behrnd

I have the following in my .emacs file.  For this to work you need to
have your emacs compiled with imagemagick support (and have imagemagick
installed, of course).  It works well, although the images do not appear
immediately the first time you toggle them because the conversion takes
a little bit.

#+BEGIN_SRC emacs-lisp

(setq image-file-name-extensions
   (quote
    ("png" "jpeg" "jpg" "gif" "tiff" "tif" "xbm" "xpm" "pbm" "pgm" "ppm" "pnm" "svg" "pdf" "bmp" "eps")))
(add-to-list 'image-type-file-name-regexps '("\\.eps\\'" . imagemagick))
(add-to-list 'image-file-name-extensions "eps")
(add-to-list 'image-type-file-name-regexps '("\\.pdf\\'" . imagemagick))
(add-to-list 'image-file-name-extensions "pdf")
(setq imagemagick-types-inhibit (remove 'PDF imagemagick-types-inhibit))

#+END_SRC




Doyley, Marvin M. writes:

> Doesn’t work. Emacs just Hangs :(
>> On Mar 17, 2017, at 8:43 AM, Norwid Behrnd <nbehrnd@yahoo.com> wrote:
>>
>>
>> To include and display pdf files, perhaps the setup outlined here is
>> still working (dates back 2014...)
>>
>> https://urldefense.proofpoint.com/v2/url?u=http-3A__emacs.stackexchange.com_questions_390_display-2Dpdf-2Dimages-2Din-2Dorg-2Dmode&d=DwIC-g&c=kbmfwr1Yojg42sGEpaQh5ofMHBeTl9EI2eaqQZhHbOU&r=s3_3riAscdqtNAzgOuwYB9g0dZVGcp8BNCy_RylYdxU&m=cQ2XAFEKpHWcRH33Hvyanl-V2rE3v-7glys69pwm8CY&s=rmvwv-l1KvLkkUN0iG1d7bT6-MNbzQOFpz5U4-fLPt0&e=
>>
>> Cheers.
>>
>>
>>
>> On 03/17/2017 01:27 PM, Doyley, Marvin M. wrote:
>>> Hi there,
>>>
>>> For manuscripts, my research group and I typically save images in pdf
>>> format, much better resolution. It would be nice to view pdf  images
>>> when working in org-mode. Does anybody know how to view pdf images in
>>> org-mode.
>>>
>>> Thanks, M
>>>
>>> PS We also work with svg images too, that would also love to view in
>>> org-mode
>>>


--
Julian Mariano Burgos, PhD
Hafrannsóknastofnun, rannsókna- og ráðgjafarstofnun hafs og vatna/
Marine and Freshwater Research Institute
Skúlagata 4, 121 Reykjavík, Iceland
Sími/Telephone : +354-5752037
Bréfsími/Telefax:  +354-5752001
Netfang/Email: julian.burgos@hafogvatn.is

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Viewing pdf images
  2017-03-21 10:34     ` Julian M. Burgos
@ 2017-03-22  0:22       ` Doyley, Marvin M.
  2017-04-05  3:22         ` Kaushal Modi
  0 siblings, 1 reply; 14+ messages in thread
From: Doyley, Marvin M. @ 2017-03-22  0:22 UTC (permalink / raw)
  To: Julian M. Burgos; +Cc: emacs-orgmode@gnu.org, Norwid Behrnd, Doyley, Marvin M.

[-- Attachment #1: Type: text/plain, Size: 2419 bytes --]

Thanks,

Much appreciated.

Cheers,
M
> On Mar 21, 2017, at 6:34 AM, Julian M. Burgos <julian.burgos@hafogvatn.is> wrote:
> 
> I have the following in my .emacs file.  For this to work you need to
> have your emacs compiled with imagemagick support (and have imagemagick
> installed, of course).  It works well, although the images do not appear
> immediately the first time you toggle them because the conversion takes
> a little bit.
> 
> #+BEGIN_SRC emacs-lisp
> 
> (setq image-file-name-extensions
>   (quote
>    ("png" "jpeg" "jpg" "gif" "tiff" "tif" "xbm" "xpm" "pbm" "pgm" "ppm" "pnm" "svg" "pdf" "bmp" "eps")))
> (add-to-list 'image-type-file-name-regexps '("\\.eps\\'" . imagemagick))
> (add-to-list 'image-file-name-extensions "eps")
> (add-to-list 'image-type-file-name-regexps '("\\.pdf\\'" . imagemagick))
> (add-to-list 'image-file-name-extensions "pdf")
> (setq imagemagick-types-inhibit (remove 'PDF imagemagick-types-inhibit))
> 
> #+END_SRC
> 
> 
> 
> 
> Doyley, Marvin M. writes:
> 
>> Doesn’t work. Emacs just Hangs :(
>>> On Mar 17, 2017, at 8:43 AM, Norwid Behrnd <nbehrnd@yahoo.com> wrote:
>>> 
>>> 
>>> To include and display pdf files, perhaps the setup outlined here is
>>> still working (dates back 2014...)
>>> 
>>> https://urldefense.proofpoint.com/v2/url?u=http-3A__emacs.stackexchange.com_questions_390_display-2Dpdf-2Dimages-2Din-2Dorg-2Dmode&d=DwIC-g&c=kbmfwr1Yojg42sGEpaQh5ofMHBeTl9EI2eaqQZhHbOU&r=s3_3riAscdqtNAzgOuwYB9g0dZVGcp8BNCy_RylYdxU&m=cQ2XAFEKpHWcRH33Hvyanl-V2rE3v-7glys69pwm8CY&s=rmvwv-l1KvLkkUN0iG1d7bT6-MNbzQOFpz5U4-fLPt0&e=
>>> 
>>> Cheers.
>>> 
>>> 
>>> 
>>> On 03/17/2017 01:27 PM, Doyley, Marvin M. wrote:
>>>> Hi there,
>>>> 
>>>> For manuscripts, my research group and I typically save images in pdf
>>>> format, much better resolution. It would be nice to view pdf  images
>>>> when working in org-mode. Does anybody know how to view pdf images in
>>>> org-mode.
>>>> 
>>>> Thanks, M
>>>> 
>>>> PS We also work with svg images too, that would also love to view in
>>>> org-mode
>>>> 
> 
> 
> --
> Julian Mariano Burgos, PhD
> Hafrannsóknastofnun, rannsókna- og ráðgjafarstofnun hafs og vatna/
> Marine and Freshwater Research Institute
> Skúlagata 4, 121 Reykjavík, Iceland
> Sími/Telephone : +354-5752037
> Bréfsími/Telefax:  +354-5752001
> Netfang/Email: julian.burgos@hafogvatn.is


[-- Attachment #2: Message signed with OpenPGP using GPGMail --]
[-- Type: application/pgp-signature, Size: 455 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Viewing pdf images
  2017-03-22  0:22       ` Doyley, Marvin M.
@ 2017-04-05  3:22         ` Kaushal Modi
  2017-04-05  9:21           ` Julian M. Burgos
  0 siblings, 1 reply; 14+ messages in thread
From: Kaushal Modi @ 2017-04-05  3:22 UTC (permalink / raw)
  To: Doyley, Marvin M., Julian M. Burgos; +Cc: emacs-orgmode@gnu.org

[-- Attachment #1: Type: text/plain, Size: 3018 bytes --]

In case you are interested, I have now updated the solution on
emacs.stackexchange to not use #+HEADER for this purpose:
http://emacs.stackexchange.com/a/401/115

Earlier discussion on that:
http://lists.gnu.org/archive/html/emacs-orgmode/2017-01/msg00260.html

The solution still does the exact same thing as before.

On Tue, Mar 21, 2017 at 8:37 PM Doyley, Marvin M. <m.doyley@rochester.edu>
wrote:

> Thanks,
>
> Much appreciated.
>
> Cheers,
> M
> > On Mar 21, 2017, at 6:34 AM, Julian M. Burgos <
> julian.burgos@hafogvatn.is> wrote:
> >
> > I have the following in my .emacs file.  For this to work you need to
> > have your emacs compiled with imagemagick support (and have imagemagick
> > installed, of course).  It works well, although the images do not appear
> > immediately the first time you toggle them because the conversion takes
> > a little bit.
> >
> > #+BEGIN_SRC emacs-lisp
> >
> > (setq image-file-name-extensions
> >   (quote
> >    ("png" "jpeg" "jpg" "gif" "tiff" "tif" "xbm" "xpm" "pbm" "pgm" "ppm"
> "pnm" "svg" "pdf" "bmp" "eps")))
> > (add-to-list 'image-type-file-name-regexps '("\\.eps\\'" . imagemagick))
> > (add-to-list 'image-file-name-extensions "eps")
> > (add-to-list 'image-type-file-name-regexps '("\\.pdf\\'" . imagemagick))
> > (add-to-list 'image-file-name-extensions "pdf")
> > (setq imagemagick-types-inhibit (remove 'PDF imagemagick-types-inhibit))
> >
> > #+END_SRC
> >
> >
> >
> >
> > Doyley, Marvin M. writes:
> >
> >> Doesn’t work. Emacs just Hangs :(
> >>> On Mar 17, 2017, at 8:43 AM, Norwid Behrnd <nbehrnd@yahoo.com> wrote:
> >>>
> >>>
> >>> To include and display pdf files, perhaps the setup outlined here is
> >>> still working (dates back 2014...)
> >>>
> >>>
> https://urldefense.proofpoint.com/v2/url?u=http-3A__emacs.stackexchange.com_questions_390_display-2Dpdf-2Dimages-2Din-2Dorg-2Dmode&d=DwIC-g&c=kbmfwr1Yojg42sGEpaQh5ofMHBeTl9EI2eaqQZhHbOU&r=s3_3riAscdqtNAzgOuwYB9g0dZVGcp8BNCy_RylYdxU&m=cQ2XAFEKpHWcRH33Hvyanl-V2rE3v-7glys69pwm8CY&s=rmvwv-l1KvLkkUN0iG1d7bT6-MNbzQOFpz5U4-fLPt0&e=
> >>>
> >>> Cheers.
> >>>
> >>>
> >>>
> >>> On 03/17/2017 01:27 PM, Doyley, Marvin M. wrote:
> >>>> Hi there,
> >>>>
> >>>> For manuscripts, my research group and I typically save images in pdf
> >>>> format, much better resolution. It would be nice to view pdf  images
> >>>> when working in org-mode. Does anybody know how to view pdf images in
> >>>> org-mode.
> >>>>
> >>>> Thanks, M
> >>>>
> >>>> PS We also work with svg images too, that would also love to view in
> >>>> org-mode
> >>>>
> >
> >
> > --
> > Julian Mariano Burgos, PhD
> > Hafrannsóknastofnun, rannsókna- og ráðgjafarstofnun hafs og vatna/
> > Marine and Freshwater Research Institute
> > Skúlagata 4, 121 Reykjavík, Iceland
> > Sími/Telephone : +354-5752037 <+354%20575%202037>
> > Bréfsími/Telefax:  +354-5752001 <+354%20575%202001>
> > Netfang/Email: julian.burgos@hafogvatn.is
>
> --

Kaushal Modi

[-- Attachment #2: Type: text/html, Size: 6345 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Viewing pdf images
  2017-04-05  3:22         ` Kaushal Modi
@ 2017-04-05  9:21           ` Julian M. Burgos
  2017-04-05 11:52             ` Kaushal Modi
  0 siblings, 1 reply; 14+ messages in thread
From: Julian M. Burgos @ 2017-04-05  9:21 UTC (permalink / raw)
  To: Kaushal Modi; +Cc: emacs-orgmode@gnu.org, Doyley, Marvin M.

Can you clarify the purpose of this function?  I understand that
produces an image of each pdf linked to the file.  But the question in
emacs.stackexchange was about displaying pdf's as inline images.  Your
function only converts the pdfs into images (and you have to do an
export to achieve that).  You would still would have to add a link to
the image file in order to see it as an inline image.
add a link in order to see it, correct?


Kaushal Modi writes:

> In case you are interested, I have now updated the solution on
> emacs.stackexchange to not use #+HEADER for this purpose:
> http://emacs.stackexchange.com/a/401/115
>
> Earlier discussion on that:
> http://lists.gnu.org/archive/html/emacs-orgmode/2017-01/msg00260.html
>
> The solution still does the exact same thing as before.
>
> On Tue, Mar 21, 2017 at 8:37 PM Doyley, Marvin M. <m.doyley@rochester.edu>
> wrote:
>
>> Thanks,
>>
>> Much appreciated.
>>
>> Cheers,
>> M
>> > On Mar 21, 2017, at 6:34 AM, Julian M. Burgos <
>> julian.burgos@hafogvatn.is> wrote:
>> >
>> > I have the following in my .emacs file.  For this to work you need to
>> > have your emacs compiled with imagemagick support (and have imagemagick
>> > installed, of course).  It works well, although the images do not appear
>> > immediately the first time you toggle them because the conversion takes
>> > a little bit.
>> >
>> > #+BEGIN_SRC emacs-lisp
>> >
>> > (setq image-file-name-extensions
>> >   (quote
>> >    ("png" "jpeg" "jpg" "gif" "tiff" "tif" "xbm" "xpm" "pbm" "pgm" "ppm"
>> "pnm" "svg" "pdf" "bmp" "eps")))
>> > (add-to-list 'image-type-file-name-regexps '("\\.eps\\'" . imagemagick))
>> > (add-to-list 'image-file-name-extensions "eps")
>> > (add-to-list 'image-type-file-name-regexps '("\\.pdf\\'" . imagemagick))
>> > (add-to-list 'image-file-name-extensions "pdf")
>> > (setq imagemagick-types-inhibit (remove 'PDF imagemagick-types-inhibit))
>> >
>> > #+END_SRC
>> >
>> >
>> >
>> >
>> > Doyley, Marvin M. writes:
>> >
>> >> Doesn’t work. Emacs just Hangs :(
>> >>> On Mar 17, 2017, at 8:43 AM, Norwid Behrnd <nbehrnd@yahoo.com> wrote:
>> >>>
>> >>>
>> >>> To include and display pdf files, perhaps the setup outlined here is
>> >>> still working (dates back 2014...)
>> >>>
>> >>>
>> https://urldefense.proofpoint.com/v2/url?u=http-3A__emacs.stackexchange.com_questions_390_display-2Dpdf-2Dimages-2Din-2Dorg-2Dmode&d=DwIC-g&c=kbmfwr1Yojg42sGEpaQh5ofMHBeTl9EI2eaqQZhHbOU&r=s3_3riAscdqtNAzgOuwYB9g0dZVGcp8BNCy_RylYdxU&m=cQ2XAFEKpHWcRH33Hvyanl-V2rE3v-7glys69pwm8CY&s=rmvwv-l1KvLkkUN0iG1d7bT6-MNbzQOFpz5U4-fLPt0&e=
>> >>>
>> >>> Cheers.
>> >>>
>> >>>
>> >>>
>> >>> On 03/17/2017 01:27 PM, Doyley, Marvin M. wrote:
>> >>>> Hi there,
>> >>>>
>> >>>> For manuscripts, my research group and I typically save images in pdf
>> >>>> format, much better resolution. It would be nice to view pdf  images
>> >>>> when working in org-mode. Does anybody know how to view pdf images in
>> >>>> org-mode.
>> >>>>
>> >>>> Thanks, M
>> >>>>
>> >>>> PS We also work with svg images too, that would also love to view in
>> >>>> org-mode
>> >>>>
>> >
>> >
>> > --
>> > Julian Mariano Burgos, PhD
>> > Hafrannsóknastofnun, rannsókna- og ráðgjafarstofnun hafs og vatna/
>> > Marine and Freshwater Research Institute
>> > Skúlagata 4, 121 Reykjavík, Iceland
>> > Sími/Telephone : +354-5752037 <+354%20575%202037>
>> > Bréfsími/Telefax:  +354-5752001 <+354%20575%202001>
>> > Netfang/Email: julian.burgos@hafogvatn.is
>>
>> --
>
> Kaushal Modi


--
Julian Mariano Burgos, PhD
Hafrannsóknastofnun, rannsókna- og ráðgjafarstofnun hafs og vatna/
Marine and Freshwater Research Institute
Skúlagata 4, 121 Reykjavík, Iceland
Sími/Telephone : +354-5752037
Bréfsími/Telefax:  +354-5752001
Netfang/Email: julian.burgos@hafogvatn.is

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Viewing pdf images
  2017-04-05  9:21           ` Julian M. Burgos
@ 2017-04-05 11:52             ` Kaushal Modi
  2017-04-05 15:23               ` Kaushal Modi
  2017-04-06 15:02               ` Julian M. Burgos
  0 siblings, 2 replies; 14+ messages in thread
From: Kaushal Modi @ 2017-04-05 11:52 UTC (permalink / raw)
  To: Julian M. Burgos; +Cc: emacs-org list, Doyley, Marvin M.

[-- Attachment #1: Type: text/plain, Size: 1428 bytes --]

On Wed, Apr 5, 2017, 5:21 AM Julian M. Burgos <julian.burgos@hafogvatn.is>
wrote:

> Can you clarify the purpose of this function?  I understand that
> produces an image of each pdf linked to the file.


That's correct, but the user can control when that happens by adding that
function to the appropriate hook.

 But

the question in
> emacs.stackexchange was about displaying pdf's as inline images.


Yes, I forgot to change the hook when I updated the whole answer; I have
fixed that now. Now the answer shows how to add this function to the
before-save-hook.

 Your

function only converts the pdfs into images (and you have to do an
> export to achieve that).


Well, the function org-include-img-from-pdf is the workhorse here, and it
doesn't depend on when you want the PDF to PNG conversion to happen. The
"when" depends on the hook you add the function to.

  You would still would have to add a link to
> the image file in order to see it as an inline image.
> add a link in order to see it, correct?
>

I didn't follow that. The user is already adding that. Example:

# ()convertfrompdf:t
# User needs to have a ./foo.pdf. That will be converted to the below
referenced foo.png.
[[./foo.png]]

When I get to a computer, I'll confirm if the #+CAPTION: and/or #+NAME: is
needed for the inline images to show. Above works fine for exports, so I
assumed that the inline images should show fine too.



-- 

Kaushal Modi

[-- Attachment #2: Type: text/html, Size: 3093 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Viewing pdf images
  2017-04-05 11:52             ` Kaushal Modi
@ 2017-04-05 15:23               ` Kaushal Modi
  2017-04-06 15:02               ` Julian M. Burgos
  1 sibling, 0 replies; 14+ messages in thread
From: Kaushal Modi @ 2017-04-05 15:23 UTC (permalink / raw)
  To: Julian M. Burgos; +Cc: emacs-org list, Doyley, Marvin M.

[-- Attachment #1: Type: text/plain, Size: 505 bytes --]

On Wed, Apr 5, 2017 at 7:52 AM Kaushal Modi <kaushal.modi@gmail.com> wrote:

> When I get to a computer, I'll confirm if the #+CAPTION: and/or #+NAME: is
> needed for the inline images to show. Above works fine for exports, so I
> assumed that the inline images should show fine too.
>

Following up on that, the inline images work just fine with.

# ()convertfrompdf:t
[[./foo.png]]

One can add

#+STARTUP: inlineimages

if the inline images are not always set to be shown by default.
-- 

Kaushal Modi

[-- Attachment #2: Type: text/html, Size: 1175 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Viewing pdf images
  2017-04-05 11:52             ` Kaushal Modi
  2017-04-05 15:23               ` Kaushal Modi
@ 2017-04-06 15:02               ` Julian M. Burgos
  1 sibling, 0 replies; 14+ messages in thread
From: Julian M. Burgos @ 2017-04-06 15:02 UTC (permalink / raw)
  To: Kaushal Modi; +Cc: emacs-org list, Doyley, Marvin M.

So if I have an org file with links to pdfs, your function will convert
those pdfs to images and also will replace the link to the pdf for the
link to the newly created png?

Kaushal Modi writes:

> On Wed, Apr 5, 2017, 5:21 AM Julian M. Burgos <julian.burgos@hafogvatn.is>
> wrote:
>
>> Can you clarify the purpose of this function?  I understand that
>> produces an image of each pdf linked to the file.
>
>
> That's correct, but the user can control when that happens by adding that
> function to the appropriate hook.
>
>  But
>
> the question in
>> emacs.stackexchange was about displaying pdf's as inline images.
>
>
> Yes, I forgot to change the hook when I updated the whole answer; I have
> fixed that now. Now the answer shows how to add this function to the
> before-save-hook.
>
>  Your
>
> function only converts the pdfs into images (and you have to do an
>> export to achieve that).
>
>
> Well, the function org-include-img-from-pdf is the workhorse here, and it
> doesn't depend on when you want the PDF to PNG conversion to happen. The
> "when" depends on the hook you add the function to.
>
>   You would still would have to add a link to
>> the image file in order to see it as an inline image.
>> add a link in order to see it, correct?
>>
>
> I didn't follow that. The user is already adding that. Example:
>
> # ()convertfrompdf:t
> # User needs to have a ./foo.pdf. That will be converted to the below
> referenced foo.png.
> [[./foo.png]]
>
> When I get to a computer, I'll confirm if the #+CAPTION: and/or #+NAME: is
> needed for the inline images to show. Above works fine for exports, so I
> assumed that the inline images should show fine too.


--
Julian Mariano Burgos, PhD
Hafrannsóknastofnun, rannsókna- og ráðgjafarstofnun hafs og vatna/
Marine and Freshwater Research Institute
Skúlagata 4, 121 Reykjavík, Iceland
Sími/Telephone : +354-5752037
Bréfsími/Telefax:  +354-5752001
Netfang/Email: julian.burgos@hafogvatn.is

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Viewing pdf images
  2017-03-17 12:27 Viewing pdf images Doyley, Marvin M.
       [not found] ` <52f1d2ee-b964-39ac-3c96-674ad7b6137e@yahoo.com>
@ 2017-04-09 22:06 ` Eduardo Mercovich
  2017-04-10  0:00   ` Doyley, Marvin M.
  1 sibling, 1 reply; 14+ messages in thread
From: Eduardo Mercovich @ 2017-04-09 22:06 UTC (permalink / raw)
  To: Doyley, Marvin M.; +Cc: emacs-orgmode@gnu.org

Hi Marvin.

> For manuscripts, my research group and I typically save images 
> in pdf format, much better resolution. It would be nice to view 
> pdf  images when working in org-mode.
> Does anybody know how to view pdf images in org-mode.

Excuse my question but there is something I don't understand 
here... I'd like to be sure we are not scratching where it doesn't 
itch. 

PDF files don't show images at a better resolution, they just 
"encapsulate" and show them. So, if you have a 2000x2000 px jpg, 
putting it inside a pdf will not add resolution (nor lower it, if 
it's not compressed), but just add a wrapper around it. The 
resolution is a property of the image file.

OTOH, different image formats do change the quality: jpg and 
(some) png are lossy formats while tiff is looseless. 

So what kind of images are you talking about? Are they produced by 
you and your team (and using what tools/methods), scanned from 
physical artifacts, or taken from other sources?

Maybe there is no need to do all this pdf magic. 

> PS We also work with svg images too, that would also love to 
> view in org-mode

Again, this is quite similar. You can produce pdf from svg: both 
are vector images and are resolution independent. But emacs con 
show svg files directly (see 
https://www.emacswiki.org/emacs/EmacsSvg).

Best... 

-- 
eduardo mercovich

 Donde se cruzan tus talentos 
 con las necesidades del mundo, 
 ahí está tu vocación. 
 (Anónimo)

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Viewing pdf images
  2017-04-09 22:06 ` Eduardo Mercovich
@ 2017-04-10  0:00   ` Doyley, Marvin M.
  2017-04-10 16:51     ` Eduardo Mercovich
       [not found]     ` <c8efd5b805e447aba02e063b2f4b5327@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
  0 siblings, 2 replies; 14+ messages in thread
From: Doyley, Marvin M. @ 2017-04-10  0:00 UTC (permalink / raw)
  To: Eduardo Mercovich; +Cc: emacs-orgmode@gnu.org

[-- Attachment #1: Type: text/plain, Size: 2324 bytes --]

Hi Eduardo,

I also agree that in terms of resolution (pix per inch ) pdf and jpg are the same. However, pdf (and SVG) allow the image to be scaled with little loss in image quality. In my lab we typically save the images in pdf because the most biomedical journals don’t accept SVG file format (not yet).

Thanks,
M
PS Since emacs can display SVG, we are planning to use this as our default file format during the manuscript generation stage, and then convert to pdf at the end (just before submitting)

> On Apr 9, 2017, at 6:06 PM, Eduardo Mercovich <eduardo@mercovich.net> wrote:
> 
> Hi Marvin.
> 
>> For manuscripts, my research group and I typically save images in pdf format, much better resolution. It would be nice to view pdf  images when working in org-mode.
>> Does anybody know how to view pdf images in org-mode.
> 
> Excuse my question but there is something I don't understand here... I'd like to be sure we are not scratching where it doesn't itch.
> PDF files don't show images at a better resolution, they just "encapsulate" and show them. So, if you have a 2000x2000 px jpg, putting it inside a pdf will not add resolution (nor lower it, if it's not compressed), but just add a wrapper around it. The resolution is a property of the image file.
> 
> OTOH, different image formats do change the quality: jpg and (some) png are lossy formats while tiff is looseless.
> So what kind of images are you talking about? Are they produced by you and your team (and using what tools/methods), scanned from physical artifacts, or taken from other sources?
> 
> Maybe there is no need to do all this pdf magic.
>> PS We also work with svg images too, that would also love to view in org-mode
> 
> Again, this is quite similar. You can produce pdf from svg: both are vector images and are resolution independent. But emacs con show svg files directly (see https://urldefense.proofpoint.com/v2/url?u=https-3A__www.emacswiki.org_emacs_EmacsSvg&d=DwIDaQ&c=kbmfwr1Yojg42sGEpaQh5ofMHBeTl9EI2eaqQZhHbOU&r=s3_3riAscdqtNAzgOuwYB9g0dZVGcp8BNCy_RylYdxU&m=ToUr47iyS79VqRe2JGHpKEuFdjOC7Ae_27eFPP0IW_w&s=7L3s6Qt1QD87OGVmmSwlgpqsI1HZOUvEVFP6izsIYmc&e= ).
> 
> Best...
> --
> eduardo mercovich
> 
> Donde se cruzan tus talentos con las necesidades del mundo, ahí está tu vocación. (Anónimo)


[-- Attachment #2: Message signed with OpenPGP using GPGMail --]
[-- Type: application/pgp-signature, Size: 455 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Viewing pdf images
  2017-04-10  0:00   ` Doyley, Marvin M.
@ 2017-04-10 16:51     ` Eduardo Mercovich
  2017-04-12 13:05       ` Doyley, Marvin M.
       [not found]     ` <c8efd5b805e447aba02e063b2f4b5327@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
  1 sibling, 1 reply; 14+ messages in thread
From: Eduardo Mercovich @ 2017-04-10 16:51 UTC (permalink / raw)
  To: Doyley, Marvin M.; +Cc: emacs-orgmode@gnu.org

Hi Marvin.

> I also agree that in terms of resolution (pix per inch ) pdf and 
> jpg are the same. However, pdf (and SVG) allow the image to be 
> scaled with little loss in image quality.

Sorry to disagree, but again, pdf images can be vector (like svg) 
and infinitely scaled or raster (bitmap, as a jpg) and in this 
case the quality is on the file. The pdf format only adds and 
envelope around the original jpg image, or in the conversion it 
can be downscaled.

Just to test this you can extract the images from the pdf and 
check their properties. The specific tools depend on your OS of 
choice, but at least in Linux there are many options, some command 
line based and others GUI based.

> In my lab we typically save the images in pdf because the most 
> biomedical journals don’t accept SVG file format (not yet).

Sure. But why not simply use a jpg or png?
* Journals accept those formats perfectly well, 
* you will see them with their best quality, and
* you can see them in emacs buffers natively.

Just try it and you'll see that -if I understood you ok- you will 
gain in every dimension. :)

Best...


-- 
eduardo mercovich

 Donde se cruzan tus talentos 
 con las necesidades del mundo, 
 ahí está tu vocación. 
 (Anónimo)

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Viewing pdf images
       [not found]     ` <c8efd5b805e447aba02e063b2f4b5327@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
@ 2017-04-10 17:06       ` Eric S Fraga
  0 siblings, 0 replies; 14+ messages in thread
From: Eric S Fraga @ 2017-04-10 17:06 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1049 bytes --]

On Monday, 10 Apr 2017 at 16:51, Eduardo Mercovich wrote:
> Hi Marvin.
>
>> I also agree that in terms of resolution (pix per inch ) pdf and 
>> jpg are the same. However, pdf (and SVG) allow the image to be 
>> scaled with little loss in image quality.
>
> Sorry to disagree, but again, pdf images can be vector (like svg) 
> and infinitely scaled or raster (bitmap, as a jpg) and in this 
> case the quality is on the file. The pdf format only adds and 
> envelope around the original jpg image, or in the conversion it 
> can be downscaled.

Totally correct.

And, further, pixels per inch (i.e. resolution) is a property of an
output (e.g. printer or screen) or input device (e.g. camera sensor),
not an inherent property of the bitmap image.  A bitmap file simply has
a size which can be expressed as pixels x pixels.  If you display an
image on a high resolution screen (without scaling) it will appear
smaller than if you display it on a lower resolution screen.

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 26.0.50, Org release_9.0.5-385-g72fc2d

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 194 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Viewing pdf images
  2017-04-10 16:51     ` Eduardo Mercovich
@ 2017-04-12 13:05       ` Doyley, Marvin M.
  0 siblings, 0 replies; 14+ messages in thread
From: Doyley, Marvin M. @ 2017-04-12 13:05 UTC (permalink / raw)
  To: Eduardo Mercovich; +Cc: emacs-orgmode@gnu.org

[-- Attachment #1: Type: text/plain, Size: 1456 bytes --]

Hi Eduardo,
Thanks for the insight, I really appreciate this.
Cheers,
M
> On Apr 10, 2017, at 12:51 PM, Eduardo Mercovich <eduardo@mercovich.net> wrote:
> 
> Hi Marvin.
> 
>> I also agree that in terms of resolution (pix per inch ) pdf and jpg are the same. However, pdf (and SVG) allow the image to be scaled with little loss in image quality.
> 
> Sorry to disagree, but again, pdf images can be vector (like svg) and infinitely scaled or raster (bitmap, as a jpg) and in this case the quality is on the file. The pdf format only adds and envelope around the original jpg image, or in the conversion it can be downscaled.
> 
> Just to test this you can extract the images from the pdf and check their properties. The specific tools depend on your OS of choice, but at least in Linux there are many options, some command line based and others GUI based.
> 
>> In my lab we typically save the images in pdf because the most biomedical journals don’t accept SVG file format (not yet).
> 
> Sure. But why not simply use a jpg or png?
> * Journals accept those formats perfectly well, * you will see them with their best quality, and
> * you can see them in emacs buffers natively.
> 
> Just try it and you'll see that -if I understood you ok- you will gain in every dimension. :)
> 
> Best...
> 
> 
> --
> eduardo mercovich
> 
> Donde se cruzan tus talentos con las necesidades del mundo, ahí está tu vocación. (Anónimo)


[-- Attachment #2: Message signed with OpenPGP using GPGMail --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2017-04-12 13:06 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-17 12:27 Viewing pdf images Doyley, Marvin M.
     [not found] ` <52f1d2ee-b964-39ac-3c96-674ad7b6137e@yahoo.com>
2017-03-17 13:48   ` Doyley, Marvin M.
2017-03-21 10:34     ` Julian M. Burgos
2017-03-22  0:22       ` Doyley, Marvin M.
2017-04-05  3:22         ` Kaushal Modi
2017-04-05  9:21           ` Julian M. Burgos
2017-04-05 11:52             ` Kaushal Modi
2017-04-05 15:23               ` Kaushal Modi
2017-04-06 15:02               ` Julian M. Burgos
2017-04-09 22:06 ` Eduardo Mercovich
2017-04-10  0:00   ` Doyley, Marvin M.
2017-04-10 16:51     ` Eduardo Mercovich
2017-04-12 13:05       ` Doyley, Marvin M.
     [not found]     ` <c8efd5b805e447aba02e063b2f4b5327@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
2017-04-10 17:06       ` Eric S Fraga

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.