I'm using gdal_translate to create a Geospatial PDF. I'm trying to add file path to my feature when clicking on them by using:

-co OGR_LINK_FIELD=<column with path> 

I am creating my PDF in the main folder and the files that I link to are in main/images/unique.jpg

In my VRT layer is a column with "Filepaths".

My code is:

gdal_translate -of PDF \main\input_background.tif \main\output.pdf -co OGR_DATASOURCE=\main\data\vrt_input.vrt -co OGR_LINK_FIELD=Filepaths -co TILED=YES

In the shapefile, used to create the VRT is column Filepaths filled with:


In the resulting PDF I see that file:// is added to the link, but when I click on it it open the browser, but doesn't show the image.

If I place the output PDF in the same folder as the images and set the filepath to


it opens the image.

What can be wrong? Or is it not possible to use relative paths in this?

  • You write that the images are in main/files but the link is to main/images. Is that just a typo? – user30184 Nov 19 '15 at 5:45
  • Thanks for you comment. It was a mistake, i have changed it now. – student Nov 19 '15 at 9:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.