Clickable URLs in PDF output created by Inkscape/SVG

Solution 1:

This functionality has been implemented in Inkscape 1.0:

  • right-click on object
  • select "Create link"
  • enter target address under "Href"
  • store as PDF using "Save a copy..."
  • (I also restricted the output to PDF 1.4)

My system: Linux Mint 19.3, Inkscape 1.0+r73+1.

Solution 2:

Building on Király's "theory", I wrote a massively hackish python script to add hyperlinks to the generated PDF.

All the instructions on what you need and how to use it is provided in the header comment of the script. I've tested this with my cutting edge software. If you run into problem because of different inkscape/qpdf version, shoot me an email with your files and I'll see if I can help.

EDIT: I have re-written this script in Go with much better usability. Now you simply add hyperlinks to objects using "Create Link" option when right clicking, and run the svglinkify program.

Solution 3:

The best solution I found to have your links working in PDFs created from Inkscape would be:

  1. save from Inkscape as "Plain SVG".
  2. open in Chrome the plain SVG file.
  3. from Chrome: Print/Save as PDF.

Solution 4:

One (indirect) way if your links are based on text would be to go through Latex.

When exporting the PDF, tick the box "Dont include text but generate latex file". Then the coordinates of text objects will be available in the .pdf_tex file, where you will need to add manually the links. Then compile with pdflatex.

Solution 5:

If you are facing problem in Inkscape, you can edit your PDF file with an attached link from here: http://www.pdfescape.com/open/