Auto-generated Hyperlinks in PDF load improperly if they break mid-line

I’ve noticed that while spelled-out hyperlinks in pdf exports are intended to automatically act like hyperlinks and can be clicked to navigate to a browser, if the hyperlink stretches over more than one line–(say, because it’s spelled out in a narrow textbox, as pictured below)–the hyperlink doesn’t function properly. Instead of navigating to the full link, the browser will attempt to load whatever fit just onto that single line.

In the photo below, the mouseover text displays the attenuated link address that the pdf tries to load in the browser. (The link that loads in the browser will stop at “soft-” instead of including the full hyperlink text.)

Is there something I can tweak to change this behavior?

The text pictured below uses the Jacobs child theme of McLuhan and hyphenation is on for the textboxes.

Attenuated%20hyperlinks%20in%20pdf%20export

A secondary question: is this a query that ought to be in Github? (I can transfer it if so! I went for the specificity of the “exports” section here, but was on the fence.)

Hi @Naomi_Salmon, this should definitely be on GitHub; on https://github.com/pressbooks/pressbooks, please. It might be a bug in Prince, the PDF generator we use, but I’d like to track it on our GitHub even if it requires a fix upstream. Thanks for reporting!

Thank you, Ned! I’ve posted this issue at https://github.com/pressbooks/pressbooks/issues/1380

1 Like