comet.CHyperlinkDestination¶
- class comet.CHyperlinkDestination¶
Methods¶
- CHyperlinkDestination.isValid()¶
Determine whether the hyperlink destination is still valid and exists
- Returns
Whether the hyperlink destination is still valid and exists
- Return type
- Available
- CScript
- CHyperlinkDestination.getDocument()¶
Get the document the destination belongs to.
- Returns
The owning document
- Return type
- Raises
CometError – When the destination is not valid
- Available
- CHyperlinkDestination.getType()¶
Get the type of the destination.
- Returns
The destination type.
0 : Undefined
1 : URL
2 : External File
3 : Mail (comet_pdf only). InDesign® returns 1 (URL) here too.
4 : Page
5 : Text Anchor
8 : Named Destination (comet_pdf only)
- Return type
- Raises
CometError – When the destination is not valid
- Available
- CScript
- CHyperlinkDestination.getPageIndex()¶
Get the page index the destination points to.
- Returns
The target page index
- Return type
- Raises
TypeError – When the destination does not point to a page
CometError – When the destination is not valid
- Available
- CHyperlinkDestination.getURL()¶
Get the target url the destination points to.
- Returns
The target URL
- Return type
- Raises
TypeError – When the destination does not point to a page
CometError – When the destination is not valid
- Available
- CHyperlinkDestination.getTextAnchor()¶
Get the text anchor in the target text model the destination points to.
- Returns
The target anchor information.
Tuple containing:
CTextModel
: Text modelint
: Index
- Return type
- Raises
TypeError – When the destination does not point to a text anchor
CometError – When the destination is not valid
- Available