Name: print link

Type: command

Syntax: print link to [{ url | anchor }] <linkName> with rect <rectArea>

Summary:
Defines a hyperlink within a pdf print loop.

Introduced: 4.5

OS: mac, windows, linux, ios

Platforms: desktop, mobile

Example:
print link to url "http://www.livecode.com" with rect 50,50,60,60

Example:
print link to anchor "section 1.1" with rect 100,100,200,200

Parameters:
linkName:
A URL or internal anchor name.

rectArea:
A valid rectangle describing the link area in the pdf.

Description:
Use the print link command to define a hyperlink within a pdf printing
loop. 

If the url adjective is specified, then <link> is interpreted as a URL
and an external URL launching link is created in the PDF document. The
given rectangle jumps to that URL when it is clicked.

If the anchor adjective is specified, then <link> is interpreted as an
internal anchor name, as specified by the print anchor command, and an
internal anchor link is created in the PDF document. Clicking the given
rectangle jumps to that anchor.

If no adjective is specified then <link> is interpreted as a URL if it
begins with (ASCII) letters followed by a colon. e.g. "mailto:foobar" is
interpreted as a URL, whereas "mail-to-anchor:foo" is interpreted as an
anchor name.

When printing fields, any text that has its <linkText> property set
together with the link <textStyle> is treated as if a print link command
had been executed with the contents of the property as <link>, and the
<formattedRect> of the text as <rectangle>.

References: print bookmark (command), print anchor (command),
open printing to pdf (command), cancel printing (command),
textStyle (property), linkText (property), formattedRect (property)

Tags: printing

