From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Julian M. Burgos" Subject: Re: Viewing pdf images Date: Thu, 06 Apr 2017 15:02:14 +0000 Message-ID: References: <52f1d2ee-b964-39ac-3c96-674ad7b6137e@yahoo.com> <23B01130-8A78-4B5F-A1EE-392FDADF33F7@ur.rochester.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33573) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cw8vd-0008QR-Of for emacs-orgmode@gnu.org; Thu, 06 Apr 2017 11:02:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cw8va-00020a-Ls for emacs-orgmode@gnu.org; Thu, 06 Apr 2017 11:02:29 -0400 Received: from hafgarpur.hafro.is ([130.208.64.48]:47820) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cw8va-0001x9-9H for emacs-orgmode@gnu.org; Thu, 06 Apr 2017 11:02:26 -0400 In-reply-to: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" 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 > 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 th= at > 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 hav= e > 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. Th= e > "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=C3=B3knastofnun, ranns=C3=B3kna- og r=C3=A1=C3=B0gjafarstofnun h= afs og vatna/ Marine and Freshwater Research Institute Sk=C3=BAlagata 4, 121 Reykjav=C3=ADk, Iceland S=C3=ADmi/Telephone : +354-5752037 Br=C3=A9fs=C3=ADmi/Telefax: +354-5752001 Netfang/Email: julian.burgos@hafogvatn.is