Forum How do I...?

Link to external file

ioana
I am trying to link to an external file. If the external file is a PDF, all works well. If not, the link does not work. I am using Adobe Reader to open the PDF. I attached a small HTML with a link to an image. Do I have to do anything else in order to make it work?
Thank you in advance for all your help.
  1. image.png58.8 kB
  2. test.html0.2 kB
mikeday
Do you want the resulting PDF to have a piece of text "Image" which when clicked opens a file called image.png in the same folder? In this case, you need to hope that the person reading the PDF actually has that image available in that folder, or the link will not work.

(If you want to include the actual image inside the PDF file, then you want to use an <img> element, or something else like CSS background-image).
ioana
I would like that when the person clicks the link, the file is opened. I do not want to include the actual image in the pdf (because the attachments are not always images).
But unfortunately it does not seem to work (and I do have the image in the same folder).
Thank you a lot for your answer Mike.

Edited by ioana

mikeday
When I test it here, Acrobat does not like the link, but other PDF viewers do. So it may not be a reliable method.

You can actually include arbitrary file attachments inside PDF files using the --attach option on the command-line, they will show up in the attachments panel in Acrobat.
ioana
I tried the attach method and indeed it works. However, the use case that I am using them for requires to have a link in the actual pdf and from what I have read in the forums, that is not possible right now with Prince and attachments.

Edited by ioana