priint:comet placeholders in documents.

priint:comet placeholders in documents. The placeholders can be found using linklist::collect and similar functions.

static int link::classid(Link lk)

Get the ClassID of the placeholder.

Name Type Default Description
Return int   ClassID of the placeholder

0 : Error or placeholder not linked
lk Link - Valid Link object of a linklist


priint:comet InDesign® Plug-Ins, comet_pdf

linklist

static int link::id(Link lk)

Get the ID(1) of the RecordID of the product linked to the placeholder.

Name Type Default Description
Return int   ID(1) of the RecordID of the product to which the placeholder is linked

0 : Error or placeholder not linked
lk Link - Valid Link object of a linklist


priint:comet InDesign® Plug-Ins, comet_pdf

linklist
comet.CLink.getRecordID

static int link::id2(Link lk)

Get the ID2 of the RecordID of the product linked to the placeholder.

Name Type Default Description
Return int   ID2 of the RecordID of the product to which the placeholder is linked

0 : Error or placeholder not linked
lk Link - Valid Link object of a linklist


priint:comet InDesign® Plug-Ins, comet_pdf

linklist
comet.CLink.getRecordID

static int link::id3(Link lk)

Get the ID3 of the RecordID of the product linked to the placeholder.

Name Type Default Description
Return int   ID3 of the RecordID of the product to which the placeholder is linked

0 : Error or placeholder not linked
lk Link - Valid Link object of a linklist


priint:comet InDesign® Plug-Ins, comet_pdf

linklist
comet.CLink.getRecordID

static char* link::sid(Link lk)

Get the ID3 of the RecordID of the product linked to the placeholder.

Name Type Default Description
Return int   StringID of the RecordID of the product to which the placeholder is linked.

The return value is read only, do NOT CHANGE. The result will be overridden on following calls to the function. See here to learn more about functions returning r/o char* values.

lk Link - Valid Link object of a linklist


priint:comet InDesign® Plug-Ins, comet_pdf

linklist
comet.CLink.getRecordID

static int link::placeholderid(Link lk)

Get the placeholder ID of the placeholder. The placeholder ID is the unique ID of the placeholder itself, not the RecordID of the product linked to the placeholder.

Name Type Default Description
Return int   II of the placeholder itself. The placeholder ID is the unique ID of the placeholder itself, not the RecordID of the product linked to the placeholder.

0 : Error
lk Link - Valid Link object of a linklist


priint:comet InDesign® Plug-Ins, comet_pdf

linklist
comet.CLink.getPlaceHolderID

static int link::sync(Link lk)

Get the 'Sync Styte' of the placeholder. The value is only defined in the results lists of linklist::sync and linklist::collect.

Name Type Default Description
Return int   Sync State of the placeholder
Marker State Value Description
-6 Status undefined
kOverridden -5 Placeholder overridden
kLoadError -4 Error during loading
kHide -3 Hide marker
kNoObject -2 Object not found
kChanged -1 Changed
kDeleted 0 Deleted
kOkay 1 Okay
kNotUnique 2 RecordID not unique
lk Link - Valid Link object of a linklist


priint:comet InDesign® Plug-Ins, comet_pdf

linklist
linklist::sync
linklist::collect
comet.CLink.getSyncState

static char* (
  Link lk,
  int fmt = 0,
  int pos = 0,
  int len = -1)

Determine the text content of a placeholder. The placeholder text can only be determined after calling the linklist::collect.

If the text contains InDesign® variables, the internal code used in the document (and not the current value) is exported on pure text formats like kExportPlain. Use the ~Plus~-Formats (available since v3.3 R2883) to replace InDesign® variables by their current values.

Name Type Default Description
Return char*   Text content of the placeholder. For frame placeholders the text content of the frame is returned. If there is no text available, the function returns 0.

The return value is read only, do NOT CHANGE. The result will be overridden on following calls to the function. See here to learn more about functions returning r/o char* values.

lk Link - Valid Link object one with a linklist loaded by collect
fmt int kExportPlain Export format, see here
position int 0 Start position. The parameter is used only for frame placeholders (isframe () == 1).
  • >= 0 : Text position
  • kSelection : Current text selection
len int kEnd Number of letters to be fetched. The parameter is used only for frame placeholders (isframe () == 1).
  • kSelection : Until the end of the text
  • Otherwise : Number of letters
#include "internal/text.h"

Version 1.2.2 (26 October 2005)
~Plus~-formats since v3.3 R2883, 20.04.2012

priint:comet InDesign® Plug-Ins, comet_pdf

clear_content
comet.CLink.getContent

static int link::clear_content(Link lk)

Delete the internal representation of the text content of a placeholder. Placeholder texts can be very long, in this case it is advantageous to delete the data from the memory. the document text remains unchanged by this action.

Name Type Default Description
Return int   0 or ErrorCode
lk Link - Valid Link object linklist

Version 1.2.2 (26 Ocober 2005)

priint:comet InDesign® Plug-Ins, comet_pdf

content

static int (Link lk, String result)

DEPRECATED! Please use the function link::content instead.

Name Type Default Description
Return char*   Text content of the placeholder in the document. The returned pointer can be used in the functions, which expect a char*s tring as parameter. The result may not be changed with regards to its length.
lk Link - Valid Link object of a linklist
result String - valid string object.

Version 1.1.5
Please use the function link::content instead.

static int (Link lk, int len = -1)

DEPRECATED! The function no longer has any meaning.

Name Type Default Description
Return int   0 or Error
lk Link - Valid Link object of a linklist
len int -1 New maximum length for text contents of placeholders
  • > 4 lengths in bytes
  • Otherwise : Any length

Version 1.1.5
The function no longer has any meaning.

static int link::pos(Link lk)

On text placeholder the start position of the placeholder. For frames the value is -1. The value is only defined in the result lists of linklist::sync and linklist::collect.

Name Type Default Description
Return int   At what point in the associated text frame does the placeholder begin?
  • -1 : Frame placeholder
lk Link - Valid Link object of a linklist


priint:comet InDesign® Plug-Ins, comet_pdf

linklist::sync
linklist::collect
isframe
comet.CLink.getPosition
comet.CLink.getType

static int link::length(Link lk)

Length of the placeholder text in the document. For frames the value is -1. The value is only defined in the result lists of linklist::sync and linklist::collect.

Name Type Default Description
Return int   Text length of the placeholder in the document
  • -1 : Frame placeholder
lk Link - Valid Link object of a linklist


priint:comet InDesign® Plug-Ins, comet_pdf

linklist
content_length
linklist::collect
isframe
comet.CLink.getLength
comet.CLink.getType

static int link::content_length(Link lk)

Length of the text (in bytes) of the placeholder. The value is defined only after a call to link::content and gives the length of the exported string in respect to the given export format. The length determined here therefore usually differs from the text length of the placeholder determined with link::length.

Name Type Default Description
Return int   Text length of the placeholder in bytes

-1 : Frame placeholder
lk Link - Valid Link object of a linklist

Version 1.15

priint:comet InDesign® Plug-Ins, comet_pdf

linklist
length
comet.CLink.getContent

static int link::pagenum(Link lk)

Page number (0 based) of the placeholder in the document. The value is only defined in the result lists of linklist::sync and linklist::collect.

Name Type Default Description
Return int   Page number of the placeholder in the document
lk Link - Valid Link object of a linklist


priint:comet InDesign® Plug-Ins, comet_pdf

linklist::sync
linklist::collect

static int link::pagestr(Link lk, char* result)

Page name of the placeholder in the document. The page name is not necessarily the same as the page number as a string, take care to allocate enough memory for the result when using char*. The value is only defined in the result lists of linklist::sync and linklist::collect.

Name Type Default Description
Return String or char*   (Depends on parameter result) Page name of the placeholder in the document, same as parameter result
lk Link - Valid Link object of a linklist
result String or char* - Reserved memory for the result


priint:comet InDesign® Plug-Ins, comet_pdf

linklist::sync
page
linklist::collect

static int link::prefix(Link lk, char* result)

Get the current prefix of the placeholder in the document. The value is only defined in the result lists of linklist::sync and linklist::collect.

You can configure prefixes and postfixes for a placeholder in the document in the panel Placeholder Option.

Name Type Default Description
Return String or char*   value
lk Link - Valid Link object of a linklist
result String or char* - Reserved memory for the result

v4.2 R30710, 11. Mai 2022

priint:comet InDesign® Plug-Ins, comet_pdf

linklist::collect
comet.CLink.getPrefix

static int link::prefix_if_empty(Link lk, char* result)

Get the current prefix of the placeholder if its content is empty. The value is only defined in the result lists of linklist::sync and linklist::collect.

You can configure prefixes and postfixes for a placeholder in the document in the panel Placeholder Option.

Name Type Default Description
Return String or char*   value
lk Link - Valid Link object of a linklist
result String or char* - Reserved memory for the result

v4.2 R30710, 11. Mai 2022

priint:comet InDesign® Plug-Ins, comet_pdf

linklist::collect
comet.CLink.getPrefixIfEmpty

static int link::postfix(Link lk, char* result)

Get the current postfix of the placeholder in the document. The value is only defined in the result lists of linklist::sync and linklist::collect.

You can configure prefixes and postfixes for a placeholder in the document in the panel Placeholder Option.

Name Type Default Description
Return String or char*   value
lk Link - Valid Link object of a linklist
result String or char* - Reserved memory for the result

v4.2 R30710, 11. Mai 2022

priint:comet InDesign® Plug-Ins, comet_pdf

linklist::collect
comet.CLink.getPostfix

static int link::postfix_if_empty(Link lk, char* result)

Get the current prefix of the placeholder if its content is empty. The value is only defined in the result lists of linklist::sync and linklist::collect.

You can configure prefixes and postfixes for a placeholder in the document in the panel Placeholder Option.

Name Type Default Description
Return String or char*   value
lk Link - Valid Link object of a linklist
result String or char* - Reserved memory for the result

v4.2 R30710, 11. Mai 2022

priint:comet InDesign® Plug-Ins, comet_pdf

linklist::collect
comet.CLink.getPostfixIfEmpty

static int link::isframe(Link lk)

Is the placeholder a frame placeholder? The value is only defined in the result lists of linklist::sync and linklist::collect.

Name Type Default Description
Return int  
  • 0 : Text placeholder
  • 1 : Frame placeholder
lk Link - Valid Link object of a linklist


priint:comet InDesign® Plug-Ins, comet_pdf

linklist::sync
linklist::collect
comet.CLink.getFrame
comet.CLink.getType

static char* link::layer(Link lk)

Name of the layer on which the placeholder is located.

Name Type Default Description
Return char*  
  • 0 : lk not defined
  • "" : Content of frame of lk is not defined
  • Otherwise : Name of the layer

The return value is read only, do NOT CHANGE. The result will be overridden on following calls to the function. See here to learn more about functions returning r/o char* values.

lk Link - Valid Link object of a linklist

Rapid use of the layer name

li = linklist::first (lli);
while (li) { showmessage ("%s", link::layer (li)); li = linklist::next (lli); }

Version 1.2.2 (20 October 2005)

priint:comet InDesign® Plug-Ins, comet_pdf

linklist::collect
comet.CLink.getLayer

static char* link::imagepath(Link lk)

Image of a frame placeholder or empty if the frame does not have a frame image.

Name Type Default Description
Return char*  
  • Complete image path
  • 0 : lk not defined
  • "" : Content of lk is not defined or the frame does not contain an image or frame is not an image frame

The return value is read only, do NOT CHANGE. The result will be overridden on following calls to the function. See here to learn more about functions returning r/o char* values.

lk Link - Valid Link object of a linklist

Rapid use of the image path¬

li = linklist::first (lli);
while (li) { showmessage ("%s", link::imagepath (li)); li = linklist::next (lli); }

Version 1.2.2 (20 October 2005)

priint:comet InDesign® Plug-Ins, comet_pdf

linklist::collect

static float link::left(Link lk)

The value is only defined in the result list linklist::collect.The function collect defines the surrounding frame for each detected frameholder. For frame placeholders this consists of the frame itself. For text placeholders, the frame will be detected which directly surrounds the actual text. Both frame specifications are ascertained page-relative in points (1/72 dpi).

Name Type Default Description
Return float   X-position of the frame
-10000.0 in the case of error
lk Link - Valid Link object of a linklist

Version 1.2.2 (20. Oktober 2005)

priint:comet InDesign® Plug-Ins, comet_pdf

linklist::collect
link::top
link::right
link::bottom
link::width
link::height
link::frame

static float link::top(Link lk)


priint:comet InDesign® Plug-Ins, comet_pdf

link::left
link::frame

static float link::right(Link lk)


priint:comet InDesign® Plug-Ins, comet_pdf

link::left
link::frame

static float link::bottom(Link lk)


priint:comet InDesign® Plug-Ins, comet_pdf

link::left
link::frame

static float link::width(Link lk)


priint:comet InDesign® Plug-Ins, comet_pdf

link::left
link::frame

static float link::height(Link lk)


priint:comet InDesign® Plug-Ins, comet_pdf

link::left
link::frame

static ItemRef link::frame(Link lk)

Returns the frame of frame placeholders. For text placeholders, the text-frame will be returned. If a text placeholder is (partial) in overset, the fuction returns the first frame of the frames chain. The value is only defined in the result list linklist::collect.

Name Type Default Description
Return ItemRef   Frames or (for text placeholders) text frames of a placeholder

The return variable may not be already be allocated. It may not be deleted with item::release. The contents of the variable will become invalid, if the object is deleted.
lk Link - Valid Link object of a linklist

Version 1.2.2 (20 October 2005)

priint:comet InDesign® Plug-Ins, comet_pdf

linklist::collect
comet.CLink.getFrame

static int link::set_ui_value(
  Link lk,
  int index,
  char* value)

Set the text to display in the dialog sortlinks_dialog.

Name Type Default Description
Return int   0 or ErrorCode
lk Link - Valid Link object
index int - Which column of the dialog should be set?
  • 1 - 4 : Set the text of the given column
  • Otherwise : Error
value char* oder String - Text to display. Please note that numbers have to be converted into strings beforehand (see itoa et al.).

v4.2 R30810, 28. Mai 2022

priint:comet InDesign® Plug-Ins

static char* link::get_ui_value(Link lk, int index)

Get the display text of a link in the dialog sortlinks_dialog. The text must have been set before with set_ui_value.

Name Type Default Description
Return char*   Text content

The return value is read only, do NOT CHANGE. The result will be overridden on following calls to the function. See here to learn more about functions returning r/o char* values.

lk Link - Valid Link object
index int - Which column text of the dialog should be determined?
  • 0 : Return the 0-based original index of the link in the list of the dialog. Attention : In this - and only in this case! - the return value is an int number!
  • 1 - 4 : Return the text content of the given column
  • Otherwise : Error

v4.2 R30810, 28. Mai 2022

priint:comet InDesign® Plug-Ins

static int link::override_sync(Link lk)

Overwrite the synchronization status stored in the placeholder with the status "override." This stores the current value in the document (text content for text placeholders rfesp. the image path for image placeholders) together with the currnt value in the data source in the document. If either of the two values changes, the synchronization status is marked as changed again during the next synchronization. Here you will find more information on the “Overwritten” status.

This function may only be called when gNewValue is not defined, else it will lead to endless recursion!

This function has no effect when the ID of the sync-action of placeholder is greater than -1.

Name Type Default Description
Return int   0 or ErrorCode
lk Link - Valid Link object of a linklist

Version 4.1 R10500

priint:comet InDesign® Plug-Ins, comet_pdf

link::remove_override_sync
linklist
linklist::sync
linklist::collect

static int link::remove_override_sync(Link lk)

Remove the "override" sync status which is stored in the placeholder. The stored values from the document and datasource will be removed. Here you will find more information on the “Overwritten” status.

Name Type Default Description
Return int   0 or ErrorCode
lk Link - Valid Link object of a linklist

Version 4.1 R10500

priint:comet InDesign® Plug-Ins, comet_pdf

link::override_sync
linklist
linklist::sync

static int link::count_funcvars(Link lk, int actionType)

Count the number of defined function variables of a script action of a placeholder.

The function returns valid values for objects from LinkList lists filled by a prior call to linklist::collect

Name Type Default Description
Return int   Number of defined function variables of a script action of a placeholder.
lk Link - Valid Link object The function returns valid values for objects from LinkList lists filled by a prior call to linklist::collect!
actionType int - Script of function variable
  • 1 : load script
  • 2 : save script
  • 3 : sync script
  • 4 : build script

Version 4.1.5 R21700

priint:comet InDesign® Plug-Ins, comet_pdf

linklist::collect
link::get_nth_funcvar
comet.CLink.getFuncVars

static int link::get_nth_funcvar(
  Link lk,
  int actionType,
  int nth,
  String name = 0,
  String value = 0)

Get the name and the current value of a function variable of a placeholders action script.

The function returns valid values for objects from LinkList lists filled by a prior call to linklist::collect

Name Type Default Description
Return int   0 or ErrorCode
lk Link - Valid Link object The function returns valid values for objects from LinkList lists filled by a prior call to linklist::collect!
actionType int - Script of function variable
  • 1 : load script
  • 2 : save script
  • 3 : sync script
  • 4 : build script
index int - Index of the variable
name String oder char* 0 Allocated String (string::alloc, char[N], alloc ()) for the name of the nth variable
value String oder char* 0 Allocated String (string::alloc, char[N], alloc ()) for the current value of the nth variable

Collect all placeholder of the first page of a document and write their current function variables of the load action to the log.¬

#include "internal/types.h"
#include "internal/text.h"
int main () { LinkList lli = linklist::alloc (); Link lk; int i; char name [512]; String value = string::alloc ();
linklist::collect (lli, 1, "", kFirstIgnore, kSortNo); for (lk = linklist::first (lli); lk; lk = linklist::next (lli)) { wlog ("", "Placeholder [%d, %d] with %d load funcvars\n",   link::pos (lk),   link::pos (lk) + link::length (lk),   link::count_funcvars (lk, 1)); for (i = 0; i < link::count_funcvars (lk, 1); i++) { link::get_nth_funcvar (lk, 1, i, name, value); wlog ("", " %d : '%s', '%s'\n", i+1, name, value); } }
return 0; }

Version 4.1.5 R21700

priint:comet InDesign® Plug-Ins, comet_pdf

linklist::collect
link::count_funcvars
comet.CLink.getFuncVars

static char* link::crossref::document(Link lk, int what = 1)

Document name (folder, path) of the cross reference destination. The result is only defined after a call to hyperlink::find. See also in Cross reference placeholder.

Name Type Default Description
Return char*   Document name (folder, path) of the cross reference destination

"" : Error

The return value is read only, do NOT CHANGE. The result will be overridden on following calls to the function. See here to learn more about functions returning r/o char* values.

lk Link - Link containing the information
what int 0
  • 0 : Complete path
  • 1 : Name
  • 2 : Folder

Version 2.1 R668, 9. April 2008

priint:comet InDesign® Plug-Ins, comet_pdf

hyperlink::find
linklist,
comet.CCrossRef.getDocumentName
comet.CCrossRef.getDocumentPath

static int link::crossref::page(Link lk, int what = 0)

Page number of the cross reference destination. The result is only defined after a call to hyperlink::find. See also in Cross reference placeholder.

Name Type Default Description
Return int   Page number of the cross reference destination (1-based)

0 : Error
lk Link - Link containing the information
what int 0
  • 0 : Page number used inside the book
  • 1 : Page number used inside the document

Version 2.1 R668, 9. April 2008

priint:comet InDesign® Plug-Ins, comet_pdf

hyperlink::find
linklist
comet.CCrossRef.getPageIndex

static char* link::crossref::pagename(Link lk, int what = 0)

Page name of the cross reference destination. The result is only defined after a call to hyperlink::find. See also in Cross reference placeholder.

Name Type Default Description
Return char*   Page name of the cross reference destination

"" : Error

The return value is read only, do NOT CHANGE. The result will be overridden on following calls to the function. See here to learn more about functions returning r/o char* values.

lk Link - Link containing the information
what int 0
  • 0 : Page name used inside the book
  • 1 : Page name used inside the document

Version 2.1 R668, 9. April 2008

priint:comet InDesign® Plug-Ins, comet_pdf

hyperlink::find
linklist
comet.CCrossRef.getPageName

static char* link::crossref::name(Link lk)

Name of the cross reference destination (may append by a number). The result is only defined after a call to hyperlink::find. See also in Cross reference placeholder.

Name Type Default Description
Return char*   Name of the cross reference destination (may append by a number)

"" : Error

The return value is read only, do NOT CHANGE. The result will be overridden on following calls to the function. See here to learn more about functions returning r/o char* values.

lk Link - Link containing the information

Version 2.1 R668, 9. April 2008

priint:comet InDesign® Plug-Ins, comet_pdf

hyperlink::find
linklist
comet.CCrossRef.getName

static char* link::crossref::destination(Link lk)

Comet ID of the cross reference destination (may append by a number). The result is only defined after a call to hyperlink::find. See also in Cross reference placeholder.

Name Type Default Description
Return char*   Comet ID of the cross reference destination (may append by a number)

"" : Error

The return value is read only, do NOT CHANGE. The result will be overridden on following calls to the function. See here to learn more about functions returning r/o char* values.

lk Link - Link containing the information

Version 2.1 R668, 9. April 2008

priint:comet InDesign® Plug-Ins, comet_pdf

hyperlink::find
linklist
comet.CCrossRef.getDestination

static float link::crossref::x(Link lk)

X coordinate of the of the cross reference destinations text position. The result is only defined after a call to hyperlink::find. See also in Cross reference placeholder.

Name Type Default Description
Return float   X coordinate of the of the cross reference destinations text position in points

-10000.0 : Error
lk Link - Link containing the information

Version 2.1 R668, 9. April 2008

priint:comet InDesign® Plug-Ins, comet_pdf

hyperlink::find
linklist
comet.CCrossRef.getPosition

static float link::crossref::y(Link lk)

Y coordinate of the of the cross reference destinations text position (baseline). The result is only defined after a call to hyperlink::find. See also in Cross reference placeholder.

Name Type Default Description
Return float   Y coordinate of the of the cross reference destinations text position (baseline) in points

-10000.0 : Error
lk Link - Link containing the information

Version 2.1 R668, 9. April 2008

priint:comet InDesign® Plug-Ins, comet_pdf

hyperlink::find
linklist
comet.CCrossRef.getPosition

static float link::crossref::left(Link lk)

Left coordinate of the of the cross reference destinations text frame. The result is only defined after a call to hyperlink::find. See also in Cross reference placeholder.

Name Type Default Description
Return float   Left coordinate of the of the cross reference destinations text frame in points

-10000.0 : Error
lk Link - Link containing the information

Version 2.1 R668, 9. April 2008

priint:comet InDesign® Plug-Ins, comet_pdf

hyperlink::find
linklist
comet.CCrossRef.getFrameBBox

static float link::crossref::top(Link lk)

Top coordinate of the of the cross reference destinations text frame. The result is only defined after a call to hyperlink::find. See also in Cross reference placeholder.

Name Type Default Description
Return float   Top coordinate of the of the cross reference destinations text frame in points

-10000.0 : Error
lk Link - Link containing the information

Version 2.1 R668, 9. April 2008

priint:comet InDesign® Plug-Ins, comet_pdf

hyperlink::find
linklist
comet.CCrossRef.getFrameBBox

static float link::crossref::right(Link lk)

Right coordinate of the of the cross reference destinations text frame. The result is only defined after a call to hyperlink::find. See also in Cross reference placeholder.

Name Type Default Description
Return float   Right coordinate of the of the cross reference destinations text frame in points

-10000.0 : Error
lk Link - Link containing the information

Version 2.1 R668, 9. April 2008

priint:comet InDesign® Plug-Ins, comet_pdf

hyperlink::find
linklist
comet.CCrossRef.getFrameBBox

static float link::crossref::bottom(Link lk)

Bottom coordinate of the of the cross reference destinations text frame. The result is only defined after a call to hyperlink::find. See also in Cross reference placeholder.

Name Type Default Description
Return float   Bottom coordinate of the of the cross reference destinations text frame in points

-10000.0 : Error
lk Link - Link containing the information

Version 2.1 R668, 9. April 2008

priint:comet InDesign® Plug-Ins, comet_pdf

hyperlink::find
linklist
comet.CCrossRef.getFrameBBox

static int link::crossref::pos(Link lk)

Anchor text position of the cross reference destination. The result is only defined after a call to hyperlink::find. See also in Cross reference placeholder.

Name Type Default Description
Return int   text position of the anchor

0 : Error
lk Link - Link containing the information

Version 2.1 R668, 9. April 2008

priint:comet InDesign® Plug-Ins, comet_pdf

hyperlink::find
linklist
comet.CCrossRef.getIndex

static int link::crossref::frame(Link lk)

Text frame reference of the cross reference destination. The result is only defined after a call to hyperlink::find. See also in Cross reference placeholder.

Name Type Default Description
Return ItemRef   frame of text anchor

0 : Error
lk Link - Link containing the information

Version 2.1 R668, 9. April 2008

priint:comet InDesign® Plug-Ins, comet_pdf

hyperlink::find
linklist
comet.CCrossRef.getFrame

static ItemRef link::crossref::src_frame(Link lk)

Frame of hyperlink source.

Name Type Default Description
Return ItemRef   Frame of hyperlink source.

0 : Error
lk Link - Link containing the information

v3.3 R3116, 13.08.2012

priint:comet InDesign® Plug-Ins, comet_pdf

hyperlink::find
linklist
comet.CCrossRef.getSourceFrame

static int link::crossref::src_textpos(Link lk)

Text position of start of hyperlink source.

Name Type Default Description
Return int   Text position of start of hyperlink source.

-1 : Error
lk Link - Link containing the information

v3.3 R3116, 13.08.2012

priint:comet InDesign® Plug-Ins, comet_pdf

hyperlink::find
linklist
comet.CCrossRef.getSourceIndex

static int link::crossref::src_textlen(Link lk)

Text length of hyperlink source.

Name Type Default Description
Return int   Text length of hyperlink source.

-1 : Error
lk Link - Link containing the information

v3.3 R3116, 13.08.2012

priint:comet InDesign® Plug-Ins, comet_pdf

hyperlink::find
linklist
comet.CCrossRef.getSourceLength

static ItemRef link::crossref::hyperlink_ref(Link lk)

Document reference of hyperlink.

Name Type Default Description
Return ItemRef   Document reference of hyperlink.

0 : Error
lk Link - Link containing the information

v3.3 R3116, 13.08.2012

priint:comet InDesign® Plug-Ins, comet_pdf

hyperlink::find
linklist

static ItemRef link::crossref::anchor_ref(Link lk)

Document reference of hyperlink destination.

Name Type Default Description
Return ItemRef   Document reference of hyperlink destination.

0 : Error
lk Link - Link containing the information

v3.3 R3116, 13.08.2012

priint:comet InDesign® Plug-Ins, comet_pdf

hyperlink::find
linklist
type
info

static int link::crossref::type(Link lk)

Type of hyperlink destination.

Name Type Default Description
Return int  
  • 0 : Text anchor
  • 1 : page
  • 2 : URL
  • 3 : external
lk Link - Link containing the information

v3.3 R3116, 13.08.2012

priint:comet InDesign® Plug-Ins, comet_pdf

hyperlink::find
linklist
info

static char* link::crossref::info(Link lk)

Information about the hyperlink destination (url, email, ...).

Name Type Default Description
Return char*   Information about the hyperlink destination (url, email, ...).
0 : error
lk Link - Link containing the information

v3.3 R3116, 13.08.2012

priint:comet InDesign® Plug-Ins, comet_pdf

hyperlink::find
linklist
info

static int link::crossref::key(Link lk)

Key of the hyperlink destination definition. The function only returns a defined value after calling hyperlink::find with the crossRefName prefixes "defns" and "defns_info".

Name Type Default Description
Return int   Key of the definition of the hyperlink destination

-1 : Error
lk Link - HyperlinkDestinationDef object from a call to hyperlink::find with the crossRefName perfixes "defns" or "defns_info"

Write all HyperlinkDestinationDefs of the current document to the logfile.

int main ()
{
    LinkList	lks		= linklist::alloc ();
    Link		lk;
wlog ("", "HyperlinkDestDefns by name:\n"); hyperlink::find (lks, 0, "defn:'*'"); for (lk = linklist::first (lks); lk; lk = linklist::next (lks)) { wlog ("", "'%s' [%d], type %d--> '%s'\n",   link::crossref::name (lk),   link::crossref::key (lk),   link::crossref::type (lk),   link::crossref::destination (lk)); }
wlog ("", "\nHyperlinkDestDefns by info:\n"); linklist::clear (lks); hyperlink::find (lks, 0, "defn_info:'*'"); for (lk = linklist::first (lks); lk; lk = linklist::next (lks)) { wlog ("", "'%s' [%d], type %d--> '%s'\n",   link::crossref::name (lk),   link::crossref::key (lk),   link::crossref::type (lk),   link::crossref::destination (lk)); }
return 0; }

v5.0 R37000

priint:comet InDesign® Plug-Ins, comet_pdf

hyperlink::find
linklist
hyperlink::get_next_unique_key

Since
1.0.19
See Also
linklist

Alphabetic index HTML hierarchy of classes or Java