Skip to main content
Participant
July 1, 2019
Question

URLs breaking - because of "/"

  • July 1, 2019
  • 1 reply
  • 150 views

Hi guys,

I'm working on a document which has a lot of URLs. The trouble is that on export to PDF any that have a "/" as the last character at the end of a line are breaking at that point. So for example:

https://www.newyorker.com/tech/annals-of-technology/

the-enduring-lessons-of-star-trek

only loads up to the Annals of Technology and not the individual page that needs to be linked to.

Is there an easy fix to this?

Thanks,

D.

    This topic has been closed for replies.

    1 reply

    Jongware
    Community Expert
    Community Expert
    July 1, 2019

    That is an indication that this text is not an URL in InDesign to begin with.

    Acrobat (and possible other PDF readers as well) have a default setting "Create links from URLs" checked, because there are lots of document creators who don't bother to use their writing tool to correctly create a proper link:

    So, in the absence of a proper hyperlink, a PDF reader scans the actual text and tries to infer what the link is. It cannot "know" that that separate line "the-enduring-lessons-of-star-trek" somewhere below the text you click at is part of that same link. You probably would not like it either if it *always* connected the second line to the link.

    You can apply No Break to the entire hyperlink text and then InDesign will honor this, and never break it. This will probably cause your text to reflow, and might cause ugly line breaks. Also, you'd better be absolutely positive that the entire link fits onto a single line, or else you'll force InDesign to do something it cannot do (and all of your text will get overset).

    But you don't want to not-break them, the underlined text above is the "easy fix" you're looking for. Full instructions are in the Online Help: Learn how to create, manage, and edit hyperlinks in InDesign