Adding Hyperlinks to your Scribus PDF document: Difference between revisions

From Scribus Wiki
Jump to navigation Jump to search
(Update the page so that it conforms with Scribus 1.4.6.)
(Remove references, cos all links are invalid.)
 
Line 29: Line 29:


This is dependent on having the preset link to the appropriate email client.
This is dependent on having the preset link to the appropriate email client.
== References ==
* [http://docs.scribus.net/content/en/pdfs/javascriptpdf.pdf Javascripting PDF in Scribus] - see page 3 on creating a  web button link. This solution goes halfway but fails to open the link in a new frame.
* [http://partners.adobe.com/public/developer/en/acrobat/sdk/AcroJS.pdf Adobe Acrobat JavaScript Manual] - see page 114 on the launchURL function. This allows the added parameter that completes the solution.

Latest revision as of 18:38, 24 February 2017

This article is part of the Tips & Tricks series.
Installation Usage PDF issues Other

Note

If you can't see the PDF Tools in the toolbar, check if you have Windows > PDF Tools menu entry enabled.

Method A

Insert link annotation.png
  1. go to the PDF toolbar, select Insert Link Annotation and draw with it a rectangle above an element (e.g. a text frame) you wish to become a hyperlink
  2. double click on the new rectangle (with the left mouse button)
  3. select External Web-Link as annotation type and insert your URL into the Destination field

Method B

  1. Click the OK button for Insert PDF fields.
  2. Make a box to surround the text and/or graphics from which you want to create a hyperlink.
  3. Double click this box, which opens the Field Properties dialogue box.
  4. In the Appearance tab, choose "None" for colour of the border (unless you really want a border added).
  5. Click on the Action tab.
  6. From the Type pull-down menu, choose JavaScript.
  7. To the right of the Script box, click Edit.
  8. Enter the following: app.launchURL("http://www.scribus.net/", true);
  9. Click File > Save and Exit.
  10. Click OK.

If you now open that PDF version in a web browser, you will find those text (and/or graphics) areas linkable. The "true" parameter in the JavaScript is important so a new frame (window or tab) is opened for the link. This way your PDF document remains open and available in its original frame.

Variation on Method B

If you want to create a link to an email address, modify the JavaScript above like this:

  • app.launchURL("mailto:youraddress@yourISP.com", true);

This is dependent on having the preset link to the appropriate email client.