[Qgis-user] Possibility for Labels as Hyperlinks in PDF Output?

Emma Hain emma at north-road.com
Mon Sep 11 18:37:56 PDT 2023


Hi Mike
I've done a search for a feature request for this for QGIS.
<https://github.com/qgis/QGIS/issues>
I can't see anything, I see similar things but not actually what you are
asking. You may want to include this as a new feature request as it is
kinda cool.

Cheers
Em

On Tue, 12 Sept 2023 at 04:57, Mike Treglia via QGIS-User <
qgis-user at lists.osgeo.org> wrote:

> Thanks, Keith, for pointing me to that documentation.
>
> That's really helpful. I guess I had gotten confused with some
> functionality with web-map exports in  QGIS2Web - leaflet maps - in that
> form, a field with an html-formatted hyperlink would function as a
> hyperlink (though a hyperlink label still just seems to be formatted as a
> link, but not function as one.)
>
> I also see that in the Print Composer, manually using the "Add Label"
> functionality enables one to include html-formatted hyperlinks, which
> function in exported PDFs (when "render as html" is checked in the label
> properties in the print composer).  So, it looks like there is almost the
> functionality I'm looking for, but not quite.  If there's a way to place
> labels from a map layer in a print composer in the right spots, that could
> potentially work, but that seems challenging - I can't wrap my brain around
> how that would functionally even work.
>
> Welcome any other ideas folks have, or how others have worked through
> this.  It seems like the alternative options to doing this fully in QGIS
> would involve exporting the PDF and working in PDF-editing software to
> incorporate the links.
>
> Best,
> Mike
>
>
>
> On Mon, Sep 11, 2023 at 11:10 AM Keith Jenkins <kgjenkins at gmail.com>
> wrote:
>
>> I don't think the label "HTML formatting" currently supports links.
>> The supported HTML is just a subset of HTML, mainly focused on visual
>> styles:
>>
>> """
>> The HTML formatting option enables the proper rendering of some HTML
>> tags to customize the label. The supported HTML tags are:
>>
>> * Color, applicable to text, underline, strikethrough, and overline
>> * Font properties (font family, font size, bold and italic)
>> * Superscript and subscript components in text
>> """
>>
>> https://docs.qgis.org/testing/en/docs/user_manual/style_library/label_settings.html#text-tab
>>
>> Keith
>>
>> On Mon, Sep 11, 2023 at 9:28 AM Mike Treglia via QGIS-User
>> <qgis-user at lists.osgeo.org> wrote:
>> >
>> > Hi all,
>> >
>> > Working on a project where the desired output is PDF map, where the
>> labels are hyperlinks. From searching around, it seems like there are, at
>> least historically, some challenges related to this functionality and Qt,
>> which might still be present?
>> >
>> > I'm finding that in the Print Composer in QGIS, I can add a label that
>> functions as a hyperlink in an exported PDF (using the "render as HTML"
>> functionality"), but labels associated with a layer, placed in the main map
>> window, do not function as hyperlinks when exported as a PDF.
>> >
>> > Thus, wanted to check if maybe either I'm missing something - like this
>> is/should be possible, or if not directly, maybe there's an efficient
>> work-around?  I'm working in QGIS 3.32-2 most immediately for testing this,
>> on Windows.
>> >
>> > Thanks, all, for any insights!
>> > Mike
>> >
>> >
>> > _______________________________________________
>> > QGIS-User mailing list
>> > QGIS-User at lists.osgeo.org
>> > List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
>> > Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>>
> _______________________________________________
> QGIS-User mailing list
> QGIS-User at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>


-- 
Emma Hain — Product Manager/Senior GIS Analyst
emma at north-road.com / 0414 512 782
[image: https://north-road.com]
*North Road*
Cartography • Development • Spatial Analysis
------------------------------
*north-road.com* <http://north-road.com>
<https://twitter.com/northroadgeo>
<https://www.linkedin.com/company/north-road-studios>
<https://www.facebook.com/North-Road-997236690392419/home>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20230912/4cf55082/attachment.htm>


More information about the QGIS-User mailing list