8

I need to export a (GEO)PDF - overview map with bounding boxes - with clickable links in every bounding box.

I tried to simply export a PDF with html-links as text labels, but as you can see in the screenshot of my PDF below, the HTML syntax is not interpreted as linkenter image description here

I also tried simple links like: <a href>www.qgis.org</a>

This solution works on clickable text field links (rendered as HTML) but does not match my needs: Exporting PDF from QGIS Print Layout including clickable hyperlinks

Even this post is not helping me: Clickable HTML link in QGIS print composer pdf export?

  • 2
    You have text-labels overlayed over your map? Than you have to check the box "render as html" to make the html-tags disappear an only show the link - this seems not to be the case in your screenshot. However, as stated in the posts linked by you in the moment it seems to be possible to create only links of the actual URL, not of any other text. Workaround: create another text label containing the URL formatted as link, see the last comment here: gis.stackexchange.com/questions/354249/… – babel May 13 at 10:07
  • A text field rendered as HTML is not what im looking for. I need a link für every single rectangle in my map. – MAP May 18 at 9:52
  • 1
    have you already perhaps just tried to insert the actual link as a text and not as html? like only http://URL.com/7025 just to see how it works? – umbe1987 May 20 at 10:16
  • @MAP Does this pdf fit your needs? drive.google.com/open?id=1YvLNlTfL2bQyLp6uRNQYgjxKfhB1RfkH – Comrade Che May 20 at 12:09
3

Unfortunately , there is a known problem associated with the task you are trying to realise and the QGIS development team is working on it.

For now, the issue is considered " a won't fix " because of how the underlying libraries (QT) export data to GeoPDF.

You can read and follow the issues on QGIS Github at these two addresses:

Issue 35172

Issue 29888

| improve this answer | |
3
+25

This method is software dependent and may not work with some PDF readers.

Tested with Acrobat Reader DC (OS: Windows 10).

To create a PDF file with clickable links inside polygons, just save the links as text in text field and create labels using this field.

You must also set the option Always export text as text objects when exporting to PDF. Here is an example pdf. If you use acrobat reader to view PDF - hold Ctrl button when click on the text.

Also you can change the label formatting if you want it to looks like a real URL (blue and underlined).

enter image description here

| improve this answer | |
  • @MAP Answer updated – Comrade Che May 20 at 12:20
  • I believe the question is asking for a solution to create text links using arbitrary text, such as this, rather than just printing the URL like https://stackexchange.com – Jake May 20 at 12:49
  • @Jake The example PDF file the contains clickable text. So it is a link. Also you can change the text formatting if you want it to looks like a real URL (blue and underlined). Probably the author of the question should clarify what specific result he wants to get. – Comrade Che May 20 at 13:12
  • I did like you explained: but the links are still not clickable. Could you provide some screenshots? – MAP May 25 at 7:36
  • @MAP Sure: ibb.co/BjFv88v – Comrade Che May 25 at 8:12

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.