Hyperlinks broken over two lines exports incorrectly to PDF
Using InDesign CC 13.0.1, I have some urls in a paragraph that are fairly long so have to break over two lines, e.g.
When I export to pdf, the link will just link to www.websiteaddress.com/subpage/ and the bit with "pagename" is ignored.
I found similar problems posted online from a few years back and the workaround was to set your hyperlinks using the hyperlinks palette, not just rely on the pdf to detect the links automatically. I've done this manually to my document, but the problem persists. I can get the full link to work behind the first line of text, but the second line is just plain text with no link.
I've managed to add a link to the second line manually using Acrobat after creating my PDF, but I feel that this shouldn't be necessary.
Jay Rutherford commented
I've discovered a quick & dirty solution: use a URL shortener to ensure the URL can stay on one line. Not elegant, but it worked in a book I just finished.
When exporting pdf, make sure that you checked the box Hyperlinks in Include area of general tab.
Same issue exporting a PDF containing a split-line link. It seems the converter just creates a hit area box encasing both full lines of text.
That's just sloppy programming by Adobe.
I have the same problem with InDesign 14.03 so we know that Adobe has done nothing to correct the problem, or perhaps they do not know.
I have written to them about this so I hope they will react.
Tom and Csaba, to ensure working hyperlinks in your exported PDFs, you should always convert your URLs to complete hyperlinks in InDesign. PDF readers will do their best to detect valid URLs, but they can't be relied upon to do this consistently, particularly when URLs have line breaks (as you have discovered) or they are incomplete/naked URLs (missing the http:// or https://).
If you have many URLs, you certainly don't want to be doing this manually, one at a time. InDesign comes with a script pre-installed to do automatic URL conversions for you, called 'Convert URLs to Hyperlinks', which you can read about in the InDesign User Guide here: https://helpx.adobe.com/au/indesign/using/hyperlinks.html#convert_urls_to_hyperlinks
If the built-in script doesn't meet your needs, I developed a more reliable and extensive script called Hyperlinker, which you can download here: https://inkwire.app/hyperlinker/download/ (There's a free version for documents up to 3 pages, and a paid version for larger documents.)
Csaba Sinka commented
I've the same problem. What is the solution?