comet.CHyperlinkSource¶
- class comet.CHyperlinkSource¶
Methods¶
- CHyperlinkSource.isValid() bool ¶
Determine whether this hyperlink destination is still valid and exists
- Returns:
Whether this hyperlink destination is still valid and exists
- Return type:
- Available:
InDesign® comet_pdf®
- CScript:
- CHyperlinkSource.getDocument() CDocument ¶
Get the document this destination belongs to
- Returns:
The owning document
- Return type:
- Raises:
CometError – When the source is not valid
- Available:
InDesign® comet_pdf®
- CHyperlinkSource.getType() int ¶
Determine the type of this hyperlink source
- Returns:
The hyperlink source type
0: Frame
1: Text
- Return type:
- Raises:
CometError – When the source is not valid
- Available:
InDesign®
- CHyperlinkSource.getFrame() CFrame ¶
Get the frame this source is attached to.
- Return type:
- Raises:
TypeError – When the source is not attached to a frame
CometError – When the source is not valid
- Available:
InDesign®
- CHyperlinkSource.getTextModel() CTextModel ¶
Get the textmodel this source is attached to.
- Returns:
The textmodel
- Return type:
- Raises:
TypeError – When the source is not attached to a text
CometError – When the source is not valid
- Available:
InDesign®
- CHyperlinkSource.getStart() int ¶
Get the text index this source starts at.
The result is the global index in the text model this source starts at.
- Returns:
The start text index
- Return type:
- Raises:
TypeError – When the source is not attached to a text
CometError – When the source is not valid
- Available:
InDesign®
- CHyperlinkSource.getLength() int ¶
Get the text length of this source.
- Returns:
The source text length
- Return type:
- Raises:
TypeError – When the source is not attached to a text
CometError – When the source is not valid
- Available:
InDesign®
- CHyperlinkSource.getLink() CHyperlink ¶
Get the link this source is attached to.
- Returns:
The link of this source
- Return type:
- Raises:
CometError – When the source is not valid
- Available:
InDesign®
Special methods¶
- CHyperlinkSource.__repr__() str ¶
String representation.
- Returns:
For
getType()
== 0 (Frame):<CHyperlinkSource> Type: Frame | UID: Frame UID
For
getType()
== 1 (Text):<CHyperlinkSource> Type: Text | Start: Start | Length: Length
Example (Frame)¶<CHyperlinkSource> Type: Frame | UID: 328
Example (Text)¶<CHyperlinkSource> Type: Text | Start: 10 | Length: 4
- Return type: