LinkToObject
PowerScript function
Description
Links the current object to an object that already exists in the PDF
document.
Applies to
PDFText object in Objects and Controls
PDFImage object in Objects and Controls
PDFMultilineText object in Objects and Controls
PDFTextBlock object in Objects and Controls
Syntax
|
1 |
long LinkToObject(PDFModel object) |
|
Argument |
Description |
|---|---|
|
object |
The object that the current object links to. The object |
Return value
Long. Returns 1 if it succeeds, or -1 if an error occurs. For more
errors, see the Error Codes.
Usage
Call the function to link the current object with the specified
object.
Examples
The following example links the PDFText object (with the content
“jump to me”) to the current PDFText object (with the content “I am
PDFtexttext).
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
PDFdocument lpdf_doc PDFpage lpdf_page PDFtext lpdf_text,lpdf_textlink lpdf_doc = create PDFdocument lpdf_page = create PDFpage lpdf_text = create PDFtext lpdf_textlink = create PDFtext lpdf_text.backcolor.rgb = rgb(255,0,0) lpdf_text.textcolor.rgb = rgb(0,255,0) lpdf_text.font.fontsize = 38 lpdf_text.content = "I am PDFtext text" lpdf_textlink.content = "jump to me" //Support PDFtext, PDFmultilinetext, PDFimage, and PDFtextblock lpdf_text.linktoobject( lpdf_textlink) lpdf_page.addcontent( lpdf_text) lpdf_page.addcontent( lpdf_textlink) lpdf_doc.addpage( lpdf_page) lpdf_doc.save( "D: extlink.pdf") |
See also
PDFText, PDFImage, PDFTextBlock objects:
PDFMultilineText objects: