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?

3 Answers 3


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?

QGIS bug tracker issue.

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!


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>

You can just add a text link such as http://www.google.com and when you make the pdf it is a clickable hyperlink.

  • Partially true: it depends on the pdf reader and how it interprets texts/strings which "look like hyperlinks"
    – MrXsquared
    Commented Oct 15, 2020 at 0:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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