Geographic Information Systems Asked by Joshua Swanson on April 23, 2021
I’m using QGIS 2.8.1 Atlas and creating a mapbook using a grid layer that has an attribute with a URL in it.
I want to use the URL in the attribute to be a hyperlink in the PDF once its published.
Is there just an expression I can use to do this?
In QGIS 3 (and possibly in your version) you can add an HTML box (Top menu: Add Item > Add HTML) where you can add a hyperlink. If your grid layer is being used as a coverage layer, adding the URL should be simple: you can use the expression [% "name-of-your-url-attribute" %] to pull in the link.
In your HTML Frame properties window, your code would look something like this:
<a href="[% "name-of-your-url-attribute" %]">[% "link-title" %]</a>
Answered by Roman B on April 23, 2021
Unfortunately, QGIS doesn't seem to handle exporting hyperlinks in PDF for now. So even if you manage to create those links in the layout, the link will not be active.
Related question: Clickable HTML link in QGIS print composer pdf export?
EDIT: Here's a Python code snippet for creating a PDF mapbook from QGIS Atlas images by adding links to neighbor tiles on each page.
I used this script to add links to images generated from a QGIS atlas and read them on my e-reader as a PDF. It works just fine!
Answered by Gustave Coste on April 23, 2021
You can just add a text link such as http://www.google.com and when you make the pdf it is a clickable hyperlink.
Answered by Jampot2000 on April 23, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP