1

Is there a script to use within InDesign so it finds a URL within textframes and it turns it into a hyperlink?

As I am aware, to create a hyperlink within InDesign requires you to right click and manually create the hyperlink.

2 Answers 2

4

It is a built-in feature. Open the Hyperlinks panel and select "Convert URLs to Hyperlinks..." in the panel menu:

enter image description here

2
  • As i am inputting content from an XML document, after import it does not recognise the href within an xml tag to form a hyperlink. For example, there could be a <tag href="www.google.com"> click here </tag> and it will not recognise it
    – lanes123
    Apr 9, 2018 at 8:01
  • Ok, not sure I can help then. But have you tried to just export an "Interactive PDF" (not "Print PDF")? Most times the links just work without being defined as hyperlinks.
    – Wolff
    Apr 9, 2018 at 14:57
1

You don't normally need a script for this as InDesign can detect URL's by default. If a PDF is the end goal, then you simply need to check 'Hyperlinks' in the PDF export panel and the resulting PDF will have links included for all URL's.

enter image description here

2
  • As i am inputting content from an XML document, after import it does not recognise the href within an xml tag to form a hyperlink. For example, there could be a <tag href="www.google.com"> click here </tag> and it will not recognise it
    – lanes123
    Apr 9, 2018 at 8:01
  • This answer is incorrect. Selecting the Include Hyperlinks option in the PDF export window has no effect unless you actually define Hyperlinks in your document. If not, Acrobat tries to find valid URLs automatically if you have the 'Create links from URLs' option checked in Acrobat preferences—but that's a feature of Acrobat, not InDesign. Other PDF readers may or may not do the same thing.
    – Kal
    Dec 18, 2018 at 3:08

Your Answer

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

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