Functions for exporting and importing user profiles and program settings.

Functions for exporting and importing user profiles and program settings.

static int export_pdfstyles(char* destPath, StringList onlyThose = 0)

Export PDF profiles to an XML file.

The brace-surrounded [InDesign® default profiles] can be exported, but not imported. You may use the export to create your own profiles based on these definitions. Don't forget to remove the braces in this case.

Name Type Default Description
Return int   0 or ErrorCode
destPath String or char* - Destination path of the XML. File will be overwritten if it exists.
onlyThose StringList 0 Profiles to export?

0 or empty : All profiles
otherwise : only profiles given in the list

Export of all PDF profiles.

int main ()
{
    prefs::import_pdfstyles ("$DESKTOP/pfd_profiles_all.xml");
return 0; }

Export of some PDF profiles.

int main ()
{
    StringList		profiles = stringlist::alloc ();
stringlist::append (profiles, "Pauls PDF Profile"); stringlist::append (profiles, "Christophs PDF Profile");
prefs::import_pdfstyles ("$DESKTOP/pfd_profiles1.xml", profiles);
return 0; }

Version 3.1 R1760, 25. Feb. 2010

priint:comet InDesign® Plug-Ins

import_pdfstyles
list_pdfstyles

static int import_pdfstyles(
  char* destPath,
  StringList onlyThose = 0,
  int mode = 0)

Import PDF profiles from an XML file.

The brace-surrounded [InDesign® default profiles] can be exported, but not imported. You may use the export to create your own profiles based on these definitions. Don't forget to remove the braces in this case.

Name Type Default Description
Return int   0 or ErrorCode
srcPath String or char* - Full path of an XML file in the format written by export_pdfstyles
onlyThose StringList 0 Profiles to import?

0 or empty : All profiles
otherwise : only profiles give in the list
mode int 0 What to do if a profile already exists?

0 : override
1 : skip
2 : abort

Import all pdf profiles defined in a given xml file. Take care to release the list profiles before a next call to list_pdf_styles.

int main ()
{
    StringList		profiles;
    char		*	str;
wlog ("", "# Before import\n"); profiles = prefs::list_pdfstyles (""); for (str = stringlist::first (profiles); str; str = stringlist::next (profiles)) { wlog ("", "#\t'%s'\n", str); }
prefs::import_pdfstyles ("$DESKTOP/pfd_profiles1.xml", 0);
wlog ("", "# After import\n"); stringlist::release (profiles); // Delete list before! profiles = prefs::list_pdfstyles (""); for (str = stringlist::first (profiles); str; str = stringlist::next (profiles)) { wlog ("", "#\t'%s'\n", str); }
return 0; }

Version 3.1 R1760, 25. Feb. 2010

priint:comet InDesign® Plug-Ins

export_pdfstyles

static StringList list_pdfstyles(char* source = 0, StringList listToFill = 0)

List all available PDF profiles

Name Type Default Description
Return StringList   List of available profiles

If listToFill empty, a new StringList is created. In this case you should free the list using stringlist::release after you dont need it anymore.
source String or char* 0 Where to search for profiles

0 or "" : InDesign®-Preferences
otherwise : path to an XML file in the export_pdfstyles format
listToFill StringList 0 List of results. If empty, a new StringList is created (In this case you should free the list using stringlist::release after you dont need it anymore.) Otherwise the given list is filled with the resulting profile names.

Version 3.1 R1760, 25. Feb. 2010

priint:comet InDesign® Plug-Ins

export_pdfstyles
import_pdfstyles

static int export_printstyles(char* destPath, StringList onlyThose = 0)

Export printer profiles to an XML file.

The brace-surrounded [InDesign® default profiles] can be exported, but not imported. You cannot - like for PDF profiles - duplicate and rename entries of the XML. The included binary data in CDATA contains the name of the preset too.

Name Type Default Description
Return int   0 or ErrorCode
destPath String oder char* - Destination path of the XML. File will overridden if exists.
onlyThose StringList 0 Profiles to export?

0 or empty : All profiles
otherwise : only profiles give in the list

Export aller Drucker-Presets.

int main ()
{
    prefs::export_printstyles ("$DESKTOP/pfd_profiles_all.xml");
return 0; }

Export einiger Drucker-Presets.

int main ()
{
    StringList		profiles = stringlist::alloc ();
stringlist::append (profiles, "Pauls PDF Profile"); stringlist::append (profiles, "Christophs PDF Profile");
prefs::export_printstyles ("$DESKTOP/pfd_profiles1.xml", profiles); return 0; }

Version 3.1 R1760, 25. Feb. 2010

priint:comet InDesign® Plug-Ins

import_printstyles
list_printstyles

static int import_printstyles(
  char* srcPath,
  StringList onlyThose = 0,
  int mode = 0)

Import printer profiles from an XML file.

The brace-surrounded [InDesign® default profiles] can be exported, but not imported. You cannot - like for PDF profiles - duplicate and rename entries of the XML. The included binary data in CDATA contains the name of the preset too.

First time after program start this command may take a while. InDesign® needs a little bit time to scan all current print devices.

Name Type Default Description
Return int   0 or ErrorCode
srcPath String or char* - Full path of an XML file in the format written by export_printstyles
onlyThose StringList 0 Profiles to import?

0 or empty : All profiles
otherwise : only profiles give in the list
mode int 0 What to do, if a profile already exists?

0 : override
1 : skip
2 : abort

Import all printer presets of a given XML file.

int main ()
{
    StringList		profiles;
    char		*	str;
    int				res;
wlog ("", "# Before import\n"); profiles = prefs::list_printstyles (""); for (str = stringlist::first (profiles); str; str = stringlist::next (profiles)) { wlog ("", "#\t'%s'\n", str); }
res = prefs::import_printstyles ("$DESKTOP/print_profiles1.xml", 0); wlog ("", "# Import result %d\n", res);
wlog ("", "# After import\n"); stringlist::release (profiles); // Delete list before! profiles = prefs::list_printstyles (""); for (str = stringlist::first (profiles); str; str = stringlist::next (profiles)) { wlog ("", "#\t'%s'\n", str); }
return 0; }

Version 3.1 R1760, 25. Feb. 2010

priint:comet InDesign® Plug-Ins

export_printstyles

static StringList list_printstyles(char* source = 0, StringList listToFill = 0)

List all available printer profiles

Name Type Default Description
Return StringList   List of available profiles

If listToFill is empty, a new StringList is created. In this case you should free the list using stringlist::release after you don't need it anymore.
source String or char* 0 Where to search for profiles

0 or "" : InDesign®-Preferences
otherwise : path to an XML file in the export_printstyles format
listToFill StringList 0 List of results. If empty, a new StringList is created (In this case you should free the list using stringlist::release after you dont need it anymore.) Otherwise the given list is filled with the resulting profile names.

Version 3.1 R1760, 25. Feb. 2010

priint:comet InDesign® Plug-Ins

export_printstyles
import_printstyles

static int export_flattenerstyles(char* destPath, StringList onlyThose = 0)

Export transparency flattener profiles to an XML file.

The brace-surrounded [InDesign® default profiles] can be exported, but not imported. You may use the export to create your own profiles based on these definitions. Don't forget to remove the braces in this case.

Name Type Default Description
Return int   0 or ErrorCode
destPath String or char* - Destination path of the XML. File will overwritten if it exists.
onlyThose StringList 0 Profiles to export?

0 or empty : All profiles
otherwise : only profiles give in the list

Version 3.1 R1760, 25. Feb. 2010

priint:comet InDesign® Plug-Ins

import_flattenerstyles
list_flattenerstyles

static int import_flattenerstyles(
  char* destPath,
  StringList onlyThose = 0,
  int mode = 0)

Import transparency flattener profiles from an XML file.

The brace-surrounded [InDesign® default profiles] can be exported, but not imported. You may use the export to create your own profiles based on these definitions. Don't forget to remove the braces in this case.

Name Type Default Description
Return int   0 or ErrorCode
srcPath String or char* - Full path of an XML file in the format written by export_flattenerstyles
onlyThose StringList 0 Profiles to import?

0 or empty : All profiles
otherwise : only profiles give in the list
mode int 0 What to do, if a profile already exists?

0 : override
1 : skip
2 : abort

Version 3.1 R1760, 25. Feb. 2010

priint:comet InDesign® Plug-Ins

export_flattenerstyles

static StringList list_flattenerstyles(char* source = 0, StringList listToFill = 0)

List all available transparency flattener profiles

Name Type Default Description
Return StringList   List of available profiles

If listToFill empty, a new StringList is created. In this case you should free the list using stringlist::release after you dont need it anymore.
source String or char* 0 Where to search for profiles

0 or "" : InDesign®-Preferences
otherwise : path to an XML file in the export_flattenerstyles format
listToFill StringList 0 List of results. If empty, a new StringList is created (In this case you should free the list using stringlist::release after you dont need it anymore.) Otherwise the given list is filled with the resulting profile names.

Version 3.1 R1760, 25. Feb. 2010

priint:comet InDesign® Plug-Ins

export_flattenerstyles
import_flattenerstyles

static int get_script_buffer()

Current script buffer size.

Name Type Default Description
Return int   Size of script buffer in kB

Version 3.1 R2021, 20. Juli 2010

priint:comet InDesign® Plug-Ins, comet_pdf

set_script_buffe
comet.prefs.getCScriptBuffer

static int set_script_buffer(int newSize)

Set the size of the script buffer. Values are given in kB and automatically ranged to 1024 - 16384 (1-16 MB). The changes will take effect from the next scripts.

The script buffer is used for all identifiers (stack) and their values (heap). Every script use its own buffer. A small buffer can lead to memory overflow (Symbol table full, Out of heap memory). A large buffer may increase the execution time or can bring InDesign® to a memory overflow. You may save script memory by using

    char * str = alloc (5000);

instead of

    char str [5000];

In the second case you need 5000 bytes of your script heap, in the first case only 4! (The 5000 bytes of the string are allocated in the big InDesign® memory).

To ensure that your scripts have enough memory space, call this function in the login script of your data connection.Default size is 128 kB.

Name Type Default Description
Return int   New script buffer size in kB
newSize int - New script buffer size in kB

Values are given in kB and automatically ranged to 1024 - 16384 (1-16 MB). The changes will take effect from the next scripts.

Version 3.1 R2021, 20. Juli 2010

v4.1.8 R27460, 9. Sep. 2020, range changed from 128 kB - 8 MB to 1 - 16 MB

priint:comet InDesign® Plug-Ins, comet_pdf

get_script_buffer
comet.prefs.setCScriptBuffer

static int sync_server_notes(int v = -1)

Synchronize Comet Notes with InDesignServer®?

This instruction only has effect with InDesignServer® and comet_pdf. In InDesign (Desktop) the function can be called, but doesn't have any effect (in InDesign Desktop notes are always synchronized, when the document is checked out from the publication panel).

By default, synchronizing notes with InDesignServer® and comet_pdf is not activated.

To activate it, the following two panelstatements must be adapted:

Please follow the instructions in the example below!
Please note:Calling this function does not synchronize notes. You only specify, that notes can be synchronized, when the document is opened on the server.
More precisely: If editing and processing notes in the server (rendering) environment is not relevant in your application, you should leave notes synchronization switched off (and the panel statements mentioned above be left unchanged). Requesting meta data and importing / exporting notes just causes unnecessary processing overhead in this case.

Name Type Default Description
Return int   curent value of this option

0 : notes will not be synchronized
1 : notes can be synchronized
v int - set or get status

-1 : get current status
0 : notes will not be synchronized
1 : notes can be synchronized

Necessary adaptions of panel statements

// Login / session::login (panel statement 92)
// Insert the following line
//
prefs::sync_server_notes (1);
// After Open / document:after open (panel statement 44) // // Replace the following section... if (system::is_server()) { strcpy(documentId, gDocumentID); result = xml::set_document_attribute(gDocument, "documentId", documentId); } else { xml::get_document_attribute(gDocument, "documentId", documentId); }
// ... by this code block: if (system::is_server()) { if (isPublicationDocument(gDocumentID)) { char * documentPath = alloc(4096); strcpy(documentPath, gDocumentPath); priint::checkout (gDocumentID, documentPath); release (documentPath); } strcpy(documentId, gDocumentID); result = xml::set_document_attribute(gDocument, "documentId", documentId); } else { xml::get_document_attribute(gDocument, "documentId", documentId); }

v4.2 R32300, 8. Feb 2023

priint:comet InDesign® Plug-Ins, comet_pdf

static int set_preserve_color_profiles(int state)

Color profile save insertion of Comet templates.

Due to an InDesign® bug, templates may change the color profile of InDesign documents : If the color profiles of the document and the template differs, the profile of the template is set to the document. Using a very old method of duplicating frames described in InDesign® 2.0 (the last version prior Creative Suite - it was in 2003!) can fix this problem.

Because inserting templates is a central feature of Comet plugins, we did not change the standard behavior. If you want to use color profile save insertions, you have to activate this by calling set_preserve_color_profiles.

Setting state to 1 will activate the feature until the datapool connection changes or by calling the function with state 0.

To ensure the feature is activated for a database connection, you may invoke it inside the login script.

Name Type Default Description
Return int   0 or ErrorCode
state int - 0 : Use standard behavior

1 : color profile save template insertions. The activation is turned off by changing the datapool connection automatically.

After more than eight years of transition, we are now deprecating the function and the color profile-preserving procedure for duplicating frames becomes the default.
Version 3.1 R2050, 5. Aug. 2010

priint:comet InDesign® Plug-Ins

static int get_preserve_color_profiles()

Current method for inserting templates.

Name Type Default Description
Return int   0 : standard
1 : color profile save insertion of templates

After more than eight years of transition, we are now deprecating the function and the color profile-preserving procedure for duplicating frames becomes the default.
Version 3.1 R2050, 5. Aug. 2010

priint:comet InDesign® Plug-Ins

set_preserve_color_profiles

static int add_idml_to_templates(int v = -1)

DEPRECATED! Save an IDML version of every template after creating or changing the templates data file. Using XML or SOAP, simply an IDML version of the template is generated in the same folder like the template (pageitems/data/NNN.idml in most cases). SQL connections using the panelstatement 121 to save the idml data. If this statement is empty or missing, update pageitems set dataIDML = LATIN1 ? where id = ? is used automatically whereby LATIN1 is replaced by its current value defined in table keywords.

The option is turned off automatically at logout time.

Normally you use your login script (panelstatement 92) to turn on the option.

Name Type Default Description
Return int   Current value

0 : Off
1 : On
v int - Get/set the state

-1 : get state
0 : set to 'off'
1 : set to 'on'

Since v4.1 R21213, 8. Dec 2017 IDML versions of the templates are never used by the priint:priint:comet InDesign® Plug-Ins. The statement has no effect on the saving of templates anymore.
Version 3.2 R2155, 29.09.2010

priint:comet InDesign® Plug-Ins, comet_pdf

static int add_w2ml_to_templates(int v = -1)

Save a W2ML version of every template after creating or changing the templates data file. Using XML or SOAP, simply an W2ML version of the template is generated in the same folder like the template (pageitems/data/NNN.w2ml in most cases). SQL connections using the panelstatement 137 to save the w2ml data. If this statement is empty or missing, update pageitems set dataW2ML = where id = ? is used automatically.

The option is turned off automatically at logout time.

Normally you use your login script (panelstatement 92) to turn on the option.

Name Type Default Description
Return int   Current value

0 : Off
1 : On
v int - Get/set the state

-1 : get state
0 : set to 'off'
1 : set to 'on'
2 : set to 'on' and also set add_metadata_to_templates to on

3.3.1 R3445, 21. Feb. 2013

priint:comet InDesign® Plug-Ins, comet_pdf

comet.prefs.setAddW2MLToTemplates
comet.prefs.getAddW2MLToTemplates

static int add_metadata_to_templates(int v = -1)

Save Metadata of every template after creating or changing the templates data file. Using XML or SOAP, a zipped folder of the template metadata with file extension meta.zip is generated in the same folder like the template (pageitems/data/NNN.w2ml in most cases). SQL connections using the panelstatement 146 to save the metadata. If this statement is empty or missing, update pageitems set metadata = where id = ? is used automatically. For page templates, the statement update pagetemplates set metadata = where id = ? is used

The option is turned off automatically at logout time.

Normally you use your login script (panelstatement 92) to turn on the option.

Name Type Default Description
Return int   Current value

0 : Off
1 : On
v int - Get/set the state

-1 : get state
0 : set to 'off'
1 : set to 'on'

4.1.6, R26027

priint:comet InDesign® Plug-Ins, comet_pdf

comet.prefs.setAddMetaDataToTemplates
comet.prefs.getAddMetaDataToTemplates

static int add_w2ml_to_snippets(int v = -1)

Save a W2ML version of every snippet after creating or changing the snippets.

The option is turned off automatically at logout time.

Normally you use your login script (panelstatement 92) to turn on the option.

Name Type Default Description
Return int   Current value

0 : Off
1 : On
v int - Get/set the state

-1 : get state
0 : set to 'off'
1 : set to 'on'

4.1.7 R26615

priint:comet InDesign® Plug-Ins, comet_pdf

comet.prefs.setAddW2MLToSnippets
comet.prefs.getAddW2MLToSnippets

static int snippet_match(int v = -1)

Set standard snippet match criteria

The value is reset automatically at logout time.

Normally you set this value in a login script (panelstatement 92)

Name Type Default Description
Return int   Current value

v int - Get/set the value

-1 : get value
0 : turn snippet usage off
> 0 : arbitrary combination of snippet match criteria (see productlist::establish), e.g. kSnippetMatchesTemplate + kSnippetMatchesProduct

4.1.7 R26615

priint:comet InDesign® Plug-Ins, comet_pdf

comet.prefs.getSnippetMatch
comet.prefs.setSnippetMatch

static char* snippet_filter(int fptr)

Standard filter function for snippet creation

When creating snippets, a callback function can be defined to decide, whether snippets should be created for certain products or not. This function will also be called, when snippets are created via user interface, e.g. using the product build dialog or the '+' button in the preview panel.

Name Type Default Description
Return char *   name of the active filter function
fptr int - function pointer 0 : deactivate

Snippet filter functions must follow this pattern

int myFilterFunction(Product p)
{
    if (certainConditions)
    {
        return 1; 	// => create snippets
    }
    return 0; 		// => don't create snippets
}

The following example illustrates, how to prevent from creating snippets based on page-specific templates:

#include "internal/types.h"
int disallowTypedTemplates(Product p) { int templatePageType = product::get_pageitem_type(p);
if (templatePageType != kUndefPage) { // optionally prompt user
return 0; } return 1; }

Usually you define this function in a Loginscript (Panelstatement 92) or include it via a script #include and activate it this way:

prefs::snippet_filter(disallowTypedTemplates);

4.1.7 R26615

priint:comet InDesign® Plug-Ins, comet_pdf

static int show_url_progress(int state = -1)

Show progress bar when downloading Web Images? For manually creating and updating Web Images using Web Images panel or the context menu Web Images the setting has no meaning.

The setting returns to the default setting No Progress Bar when the current data connection is terminated.

Name Type Default Description
Return int   Current value of setting

0 : Suppress progress
1 : Show progress
state int -1 0 : Suppress progress
1 : Show progress -1 : Ask for current state only

v4.1 R21112, 1. Dec 2017

priint:comet InDesign® Plug-Ins, comet_pdf, Illustrator

frame::link_url
frame::embed_url
comet.prefs.getShowURLProgress
comet.prefs.setShowURLProgress

static int get_tags_writeable()

Write Comet placeholders to tagged text or not? See also Export/Import of Comet placeholders.

Name Type Default Description
Return int   0 : Do not write Comet placeholders

1 : Write Comet placeholders to tagged text

v3.3 R2580, 2. Aug. 2011

priint:comet InDesign® Plug-Ins, comet_pdf

comet.prefs.getTagsWriteable

static int set_tags_writeable()

Write Comet placeholders to tagged text or not? Change state here. See also Export/Import of Comet placeholders.

The internal TaggedText exports of the priint:comet plug-ins in the formats kExportTT (placeholder not included) and kExportW2 (placeholder always included) are not affected by this setting.

Name Type Default Description
Return int   old state
newState int 1 new state

0 : Do not write Comet placeholders
1 : insert Comet placeholders in TaggedText
#include "internal/text.h"

v3.3 R2580, 2. Aug. 2011

priint:comet InDesign® Plug-Ins, comet_pdf

comet.prefs.setTagsWriteable

static int get_tags_readable()

Ignore Comet placeholders while importing tagged text or not? See also Export/Import of Comet placeholders.

Name Type Default Description
Return int   0 : Ignore Comet placeholders

1 : Create Comet placeholder in tagged text while importing

v3.3 R2580, 2. Aug. 2011

priint:comet InDesign® Plug-Ins, comet_pdf

comet.prefs.getTagsReadable

static int set_tags_readable(int newState)

Automatically create Comet placeholders while importing tagged text or not? See also Export/Import of Comet placeholders.

The state is ignored by priint:comet InDesign® Plug-Ins while importing %!TT texts.

Name Type Default Description
Return int   old state
newState int 1 new state

0 : ignore Comet placeholders
1 : apply Comet placeholders

v3.3 R2580, 2. Aug. 2011

priint:comet InDesign® Plug-Ins, comet_pdf

comet.prefs.setTagsReadable

static int install_image(
  int rsrcID,
  char* path,
  char* destination = 0,
  int results [12] = 0)

Install an image in the executing InDesign®. The image can be used by its ID as an icon in the Front Row panel or in the Product Pool.

The function is a significant security risk. You better use one of the 1,5000 built-in icons instead.

The statement modifies the priint:comet plugins of the executing InDesigns® and are made locally only.

By installing the images, the plugins lose their status as verified software and can cause further security request when restarting InDesign!

When reinstalling the priint:comet plugins your changes will be lost.

For InDesign® Server and comet_pdf the function ha no meaning and returns the error 1.

Images can be defined as PNGs with alpha channel or (since InDesign® 2022) as SVGs. However, please make sure that the rsrcIDs are unique across both image formats in any case .

For the installation of a PNG icon at least two images are required: One image for the dark background (UI) of InDesign® and one for the light background.

For rollovers or selected icons, separate icons can be defined. Additionally, each of these four icons can be displayed in three resolutions : standard (72 dpi), 150% resolution and High Resolution. So, one icon can thus consist of up to 12 images. If a rollover is missing, the normal image is used. If an image for the current resolution is missing, the standard resolution is used.

The following table shows the naming convention for the image files of the icon variants. The red marked cells indicate required files, all other files are optional (but desirable for a better appearance).

No special icons are used by InDesign® for the grey intermediate levels of its UI. Light grey uses the icons of the light UI, dark grey uses the icons of the dark UI. Unfortunately, this restriction also means that you can only use a very limited number of colors for your icons. Orange or green you will be able to see well on both black and white, but not on grey, etc. The sample image in the upper left corner of the table contains the colors we preferably used in our icons and which are sufficiently clearly visible on all background colours.

Name suffix Image size in Pixel
UI Resolution Normal Rollover Front Row Products
Dark Standard _D _DR 36 x 36 12 x 13
150% _hires150_D _hires150_DR 54 x 54 18 x 20
High _hires_D _hires_DR 72 x 72 24 x 26
Light Standard _L _LR 36 x 36 12 x 13
150% _hires150_L _hires150_LR 54 x 54 18 x 20
High _hires_L _hires_LR 72 x 72 24 x 26

SVG icons are supported in InDesign® 2022 and later. In versions prior to 2022, the function returns the error -1199. As a vector format, SVG images do not require custom variants for different resolutions.

InDesign can independently adjust the color of black images to match the color of the UI. To do this, use the following style definition (in exactly this notation!) in your SVGs.

<style type="text/css">
.fill{fill-rule:evenodd;clip-rule:evenodd;fill:#404040;}
</style>

Unfortunately, except for the automatic black adjustment, InDesign doesn't provide any way to specify custom SVG images for the different UIs - so you should use colors that are easily visible in all UIs only. We currently using the following colors:

For SVG images with own colors you should not use the style definition .fill at all!

In total, this means you only need a maximum of two versions of the icon, a normal and an (optional) rollover. The image sizes may vary slightly depending on the displayed content:

Name Suffix Front Row Products
Normal 52-56 px 24-32 px
Rollover _R

Name Type Default Description
Return int   Fehlercode or 0

An error not equal to 0 means that the installation of at least one sub-icon failed. Specific error specifications for the variants are made in the parameter results.
rsrcID int - ID of the resource by which the image can be accessed. The ID must be ≥ 100000!
path String oder char* - Image path and base name of the images. The base name is given without any of the extensions declared in the table above. Using

   "$DESKTOP/aaa.png"

will look for the images

   "$DESKTOP/aaa_D.png"
   "$DESKTOP/aaa_DR.png"
   "$DESKTOP/aaa_hires150_D.png"
   ...

The images ~_D~.~ and ~_L.~ must be present. All other images are optional (but desirable). Please also note:
  • The images must be in PNG format and may contain alpha channels with grayscale.
  • Images are not scaled when inserted. You should therefore use the values in the above table for the images sizes.
  • When choosing colors, make sure that the images on both light and dark UIs are clearly visible.
  • Do not use icons that are too filigree. Use as simple and speaking pictures as possible!
destination String oder char* "frontrow" Aim of the installation

"frontrow" : Front Row
"products" : Produktrecherche
results int[12] 0 The int array must be 0 or at least 12 numbers big and contains the return codes for the individual icon variants in the order of the table above after return of the function.

Installation of a PNG icon. You can find a testicon here.

prefs::install_image (100000, "$DESKTOP/testicons/myicon.png");

Installation of a SVG icon. You can find a testicon here.

prefs::install_image (100001, "$DESKTOP/testicons/myicon.svg");

The function is a significant security risk. You better use one of the 1,5000 built-in icons instead.
v3.3 R2580, 2. Aug. 2011
Parameter destination and results seit v4.1.6 R26630, 10. Feb 2020
SVGs seit v4.2 R32970, 22. Mai 2023 und ab InDesign 2022

priint:comet InDesign® Plug-Ins

static int eps_import_options(
  int createPreview = -1,
  int createFrame = -1,
  float resolution = -1.0,
  int readOPI = -1)

Preference for reading EPS images. The priint:comet InDesign® Plug-Ins changing the InDesign® defaults to the following settings:

Name Type Default Description
Return int   0 or ErrorCode
createPreview int -1 Create preview?

-1 : Leave untouched
0 : no
1 : if needed
2 : always
createFrame int -1 Create frame from clipping path, if EPS contains Photoshop clipping path?

-1 : Leave untouched
0 : no
1 : yes
resolution float -1.0 Preview resolution

<= 0.0 : Leave untouched
otherwise : dpi
readOPI int -1 Read embedded OPI comments - required to be on to perform OPI.

-1 : Leave untouched
0 : no
1 : yes

v3.3 R2718, 18. Nov. 2011

priint:comet InDesign® Plug-Ins

static int set_fitframe_precision(float prec)

Set the precision for frame::fit. frame::fit has an additional parameter for the precision of the resulting frame height since v3.3 R3728. If this value is smaller 0.00005, a global value is used for the precision. If this value is smaller 0.00005 too, the InDesign® standard method is used for fitting text frames.

On logout the value is resetted to 0.0 automatically.

Name Type Default Description
Return 0    
prev float 0.0 new global precision for frame::fit. The vakue is used only if frame::fit is called without a precision or a precision smaller 0.00005

<0.00005 use InDesign® standard method

v3.3 R3860, 11. Jun 2013

priint:comet InDesign® Plug-Ins, comet_pdf

frame::fit
get_fitframe_precision

static float get_fitframe_precision()

Currently used default precision for frame::fit.

Name Type Default Description
Return float   currently used default precision for frame::fit if frame::fit is called without a precision or a precision smaller 0.00005

v3.3 R3860, 11. Jun 2013

priint:comet InDesign® Plug-Ins, comet_pdf

frame::fit
set_fitframe_precision

static int enable_magnets(
  int state,
  int action,
  int cometGroupID = 0)

Dis/Enable the appliance of magnets.Magnest are updated in the following situations:
Situation Description
kMagnetsPlaceholder After loading placeholders
kMagnetsCScript Function call to frame::apply_magnets
kMagnetsBuildProducts Building and reorganizing products
kMagnetsToDoList Updating placeholders using panel "ToDos"
kMagnetsChangeTemplate Change of template
kMagnetsLayoutRule Layoutrule "Update magnets"
All situations are activated by default after restarting InDesign®.

Name Type Default Description
Return int   old settings
state int kMagnetsAll State to change or ask?

kMagnetsPlaceholder : After loading placeholders
kMagnetsCScript : Function call to frame::apply_magnets
kMagnetsBuildProducts : Building and reorganizing products
kMagnetsToDoList : Updating placeholders using panel "ToDos"
kMagnetsChangeTemplate : Change of template
kMagnetsLayoutRule : Layoutrule "Update magnets"

kMagnetsAll : all
kMagnetsNothing : nothing
what int kMagnetsEnable What to do this the value?

kMagnetsEnable : Activate
kMagnetsDisable : Deactivate
kMagnetsToggle : Toggle
kMagnetsAsk : ask only
cometGroup int 0 In same rare cases you may wish to suppress magnets of a single Comet group while loading. Here you can define this groups. The blocker will reset on next idle time. If the values is != 0, the first two parameters are ignored.
#include "internal/types.h"

Activate all

prefs::enable_magnets (kMagnetsAll, kMagnetsEnable);

Update magnets after loading placeholders?

if (bit_and (prefs::enable_magnets (kMagnetsAll, kMagnetsAsk), kMagnetsPlaceholder) == 0)
  wlog ("", "Suppress magnets after loading placeholders\n");
else
  wlog ("", "Apply magnets after loading placeholders\n");

v3.3.1 R4330, 28.08.2913

cometGroupID since v3.4 R5200, 24. Feb 2014

priint:comet InDesign® Plug-Ins, comet_pdf

comet.prefs.getMagnetState
comet.prefs.setMagnetState

static int show_note_history(int state, int importMode)

State and behavior for showing the history of Comet notes. In the panel "Comet note" there is a check box Auto-prompt different comments. The statement will change this check box.
From R7277 3.4 and 4.0.4 also: set import mode. The optional 2nd parameter importMode controls the way, empty paragraphs are processed when importing notes.
The following values are valid:

Additionally, the flag kNotifyAutoFitNotes allows to fit note frames to the text content automatically.

Name Type Default Description
Return int   0
state int 2 0 : Do not show history prompt. This means, the check box is deselected and disabled.

1 : Always show history prompt. This means, the check box is selected but disabled.

2 : Ceck box is enabled and shows/changes the state of the first selected note in the document.
importMode int 0 import behaviour for empty paragraphs. Description see above.
#include "internal/types.h"

Convert empty paragraphs and auto fit note frames (e.g. in a login script)

int main ()
{
    prefs::show_note_history(1, kNotifyConvertEmptyParagraphs + kNotifyAutoFitNotes);
    return 0;
}

v3.4 R5321, 8. May 2014

priint:comet InDesign® Plug-Ins

static int get_remove_old_masters()

Remove localized parent page items on parent page changes or not? The value equates to the menu

Plug-Ins -> Comet -%gt; Remove localized frames on parent page changes

InDesign® does NOT remove localized parent page frames after applying a new parent page. This may lead to serioous erros espacially while building products or reorganizing pages.

Imagine you have a parent page frame F. Localize it! You will get frame F'. Then apply a different parent page to this page. Now you have the new parent frames AND the old localized frame F'. Set back the the parent page back agian to the first item - oops, now you have F and F' on the page. This can not be okay, or?

Thats why the priint:comet InDesign® Plug-Ins removing localized parent page frames after parent page changes automatically. But in some rare circumstances one prefer the default InDesign® behavior. So you can turn off the Comet fix. Here you can get the current state of the behavior.

Name Type Default Description
Return int   0 : Do NOT remove localized parent page items
1 : remove localized parent page items
-1 : error

Toggle the current state for auto-removing localized parent frames

int main ()
{
    int			remove	= prefs::get_remove_old_masters ();
wlog ("", "BEFORE : remove parents : %d\n", remove); prefs::set_remove_old_masters (!remove); wlog ("", "AFTER : remove parents : %d\n", prefs::get_remove_old_masters ());
return 0; }

v3.4 R5678, 10. Sep 2014

priint:comet InDesign® Plug-Ins, comet_pdf

static int set_remove_old_masters(int state = 1)

Remove localized parent page items on parent page changes or not? Change the value of the menu

    Plug-Ins --> Comet --> Remove localized frames on parent page changes

InDesign® does NOT remove localized parent page frames after applying a new parent page. This may lead to serioous erros espacially while building products or reorganizing pages.

Imagine you have a parent page frame F. Localize it! You will get frame F'. Then apply a different parent page to this page. Now you have the new parent frames AND the old localized frame F'. Set back the the parent page back agian to the first item - oops, now you have F and F' on the page. This can not be okay, or?

Thats why the priint:comet InDesign® Plug-Ins removing localized parent page frames after parent page changes automatically. But in some rare circumstances one prefer the default InDesign® behavior. So you can turn off the Comet fix. Here you can get the current state of the behavior.

Name Type Default Description
Return int   -1 : error
otherwise : old state
state int 1 Remove localized master page frames or not?

0 : Do NOT remove
1 : Remove

Toggle the current state for auto-removing localized parent frames

int main ()
{
    int			remove	= prefs::get_remove_old_masters ();
wlog ("", "BEFORE : remove parents : %d\n", remove); prefs::set_remove_old_masters (!remove); wlog ("", "AFTER : remove parents : %d\n", prefs::get_remove_old_masters ());
return 0; }

v3.4 R5678, 10. Sep 2014

priint:comet InDesign® Plug-Ins, comet_pdf

static int get_convert_quotas(int domain = 0)

Replace typographic quotas or not while importing tagged text?

Comet_pdf does not support automatic typographic quotas. The function therefor does not effect to the text import.

Name Type Default Description
Return int   kOn (= 1) : Yes, typographic quotas are used
kOff (= 2) : Nein
domain int kLocal kLocal : Local settings from the priint:comet InDesign® Plug-Ins
kGlobal : InDesign® setting from the Import Options dialog
#include "internal/types.h"

v3.4 R7022, 21. Nov 2014

priint:comet InDesign® Plug-Ins, comet_pdf

static int set_convert_quotas(int state = 0, int domain = 0)

Replace typographic quotas (or not) while importing tagged text. You may change the settings locally only inside the priint:comet InDesign® Plug-Ins or in InDesign®. Local changes are valid only until you change the data connection. After changeing the data connection, the priint:comet InDesign® Plug-Ins using the InDesign® behavior by default again.

Comet_pdf does not support automatic typographic quotas. The function therefor does not effect to the text import.

Name Type Default Description
Return int   0 or ErrorCode
state int kSystem kSystem : Use InDesign® setting from the Import Options
kOn : replace into typographic quotas
kOff : import unchanged
domain int kLocal kLocal : Chang priint:comet InDesign® Plug-Ins behavior
kGlobal : Change InDesigns® Import Options

Local changes are resetted to kSystem after logout. Global changes are changing the behavior of ALL text imports!

#include "internal/types.h"
#include "internal/types.h"
int ttt (int doAll) { char txt [8000];
strcpy (txt, "%!TT12"); strcat (txt, ""); strcat (txt, ""); strcat (txt, ""); strcat (txt, ""); strcat (txt, "\""); strcat (txt, ""); strcat (txt, " Nagel");
textmodel::append ("\nSystem (pre)\t"); textmodel::append (txt);
if (!doAll) return 0;
prefs::set_convert_quotas (kOn); textmodel::append ("\nTypografic\t"); textmodel::append (txt);
prefs::set_convert_quotas (kOff); textmodel::append ("\nNo conversion\t"); textmodel::append (txt);
prefs::set_convert_quotas (kSystem); textmodel::append ("\nSystem (post)\t"); textmodel::append (txt);
return 0; }
int main () { int oldState = prefs::get_convert_quotas (kGlobal);
textmodel::append ("==== Local ===="); ttt (1);
textmodel::append ("\n\n==== Global no conversion ===="); prefs::set_convert_quotas (kOff, kGlobal); ttt (1);
textmodel::append ("\n\n==== Global typographic ===="); prefs::set_convert_quotas (kOn, kGlobal); ttt (1);
textmodel::append ("\n\n==== Back ===="); prefs::set_convert_quotas (oldState, kGlobal); prefs::set_convert_quotas (kSystem, kLocal); ttt (0);
return 0; }

v3.4 R7022, 21. Nov 2014

priint:comet InDesign® Plug-Ins, comet_pdf

static int set_logstate(int what, int how)

Write additional log information. The log messages should be used especially for debugging.

With the menu command Plug-Ins -> Comet -> More Log Output you can switch on and off all additional log outputs.

Additional log messages should only be activated for a short time. Writing the messages can take a long time and significantly reduce performance. Very large log files may be involved. If additional log messages are written, confidential customer data can be written to the log file! The additional log messages are automatically switched off again after restarting InDesign ®.

Name Type Default Description
Return int   Old state
what int - Which additional log information should be changed?

1 : Write log information about inserting TaggedText using textmodel::insert, textmodel::replace, ..., frame::insert, ... . Texts longer than 1,000,000 characters are shortened.

2 : Single steps of frame::fit and frame::fit_better
how int - News status

0 : Turn off
1 : Turn on
2 : what=1 only Write line delimiters as \n and \r

v4.0.4, 27. Okt 2015

priint:comet InDesign® Plug-Ins, comet_pdf

comet.prefs.getLogState
comet.prefs.setLogState

static int enable_panel(
  int panelID,
  int state,
  char* signature)

Block Comet panels. Calls to the function should preferably be made in the after-login script (panelstatement 92). After disconnecting the current data connection, all active locks are canceled.

The blocking of panels serves only to protect against unintentional changes of configuration data. Of course, we do not reveal how, but a reasonably skilled user can cancel the block at any time.

Locked panels can be opened further (or remain visible), but all controls are disabled. Important menus like updating placeholders in the placeholder panel are still available. Locked panels are marked with a wide text band:



The function needs the following include

#include "internal/panels.h"

Name Type Default Description
Return int   0 or ErrorCode
panelID int - Class ID of panel or -1.

The following panels are supported:

kPanelProducts (3)
kPanelPreviews (6)
kPanelPageitems (8)
kPanelPageitemsBehavior (402)
kPanelPublications (9)
kPanelPublicationInfo (418)
kPanelToDoList (10)
kPanelPlaceholder (125)
kPanelPlaceholderValues (401)
kPanelPlaceholderValuesInfo (413)
kPanelPageTemplates (403)
kPanelPageElements (404)
kPanelCometAdmin (405)
kPanelTableModule (406)
kPanelTranslations (407)
kPanelLayoutRules (408)
kPanelFrameTags (409)
kPanelAreaBuild (410)
kPanelPriintAdjust (411)
kPanelPriintAdjustList (412)
kPanelFrontRow (414)
kPanelNotes (415)
kPanelPreviewDetails (416)
kPanelProductsOfDocument (417)
kPanelSettings (419)
kPanelCometTests (420)
kPanelURLLink (421)

-1 : all
state int - Lock state

0 : Block panel
1 : Enable panel
signature char* - Who blocked the panel?

The text is shown behind Panel blocked by and must not be empty and not longer than 255 characters. Unicode letters are encoded by <0x00FC>.
If this value starts with the '@' character, the prefix Panel blocked by is omitted.
#include "internal/panels.h"

This line will create the lock hint shown above:

prefs::enable_panel (kPanelPlaceholder, 0, "admin <0x2601><0x2665>.");

v4.1, 1. Mar 2018

priint:comet InDesign® Plug-Ins, comet_pdf, Illustrator

comet.panel.isEnabled
comet.panel.setEnabled

static int show_panel(
  int panelID,
  int state = 1,
  int* currentState = 0)

Show/Hide Comet panels.

The function needs the following include

#include "internal/panels.h"

Name Type Default Description
Return int   0 or ErrorCode

-1199 : In comet_pdf the function always returns the error -1199.}
panelID int - Class ID of panel.

The following panels are supported:

kPanelProducts (3)
kPanelPreviews (6)
kPanelPageitems (8)
kPanelPageitemsBehavior (402)
kPanelPublications (9)
kPanelPublicationInfo (418)
kPanelToDoList (10)
kPanelPlaceholder (125)
kPanelPlaceholderValues (401)
kPanelPlaceholderValuesInfo (413)
kPanelPageTemplates (403)
kPanelPageElements (404)
kPanelCometAdmin (405)
kPanelTableModule (406)
kPanelTranslations (407)
kPanelLayoutRules (408)
kPanelFrameTags (409)
kPanelAreaBuild (410)
kPanelPriintAdjust (411)
kPanelPriintAdjustList (412)
kPanelFrontRow (414)
kPanelNotes (415)
kPanelPreviewDetails (416)
kPanelProductsOfDocument (417)
kPanelSettings (419)
kPanelCometTests (420)
kPanelURLLink (421)
state int 1 Lock state

-1 : Request visibility only
0 : Hide panel
1 : Show panel
currentState int* 0 Current visibility. The parameter is only evaluated at state = -1.
#include "internal/panels.h"

v4.2 R33044, 9. June 2023

priint:comet InDesign® Plug-Ins, comet_pdf, Illustrator

comet.panel.isVisible
comet.panel.setVisible

static int enable_unicode_escapes(int state = -1)

Disable/Enable automatic conversion of Unicode escapes of the form \XXXX into Unicode letters if calls toConversion frame::replace, textmodel::replace, ... .

Conversion is enabled by default and is reset to this state on logout always.

Name Type Default Description
Return int   Current state

1 : Yes, convert Unicode escapes
0 : No
state int -1 Nwe state

1 : Yes, convert Unicode escapes
0 : No
int main ()
{
    int  oldState = prefs::enable_unicode_escapes (0);
frame::replace (gFrame, "\\\\TextModule\\Text5\\de8005.xml");
prefs::enable_unicode_escapes (oldState);
return 0; }

v4.1 R22423, 25. Apr 2018

priint:comet InDesign® Plug-Ins, comet_pdf

static int webimage_get_proxy(
  int fromSoapflags = 0,
  int* activated = 0,
  int* useSoapflags = 0,
  String adr = 0,
  int* port = 0,
  String user = 0,
  String pwd = 0,
  String excepts = 0)

Get the current (or the soapflags.ini) proxy settings for Web Images.

Name Type Default Description
Return int   0 or ErrorCode
fromSoapflags int 0 Which proxy data should be determined?

0 : Current proxy
1 : The settings from soapflags.ini. In this case, the results of activated and useSoapflags are undefined.
activated int* 0 After successful execution, the variable contains the values 0 (not activated) or 1 (activated).

0 : Ignore result
useSoapflags int* 0 NAfter successful execution, the variable contains the values 0 (do not use soapflags.ini) or 1 (use soapflags.ini).

0 : Ignore result Please note that soapflags.ini is read at program start only and later changes to the file are ignored!
adr char* oder String 0 After successful execution the variable contains the searched proxy address.

0 : Ignore result
port int* 0 After successful execution the variable contains the searched proxy port.

0 : Ignore result
user char* oder String 0 After successful execution the variable contains the searched proxy user.

0 : Ignore result
pwd char* oder String 0 After successful execution the variable contains the searched unencrypted proxy password.

0 : Ignore result
excepts char* oder String 0 After successful execution, the variable contains the list of exceptions for the proxy.

0 : Ignore result

v4.2 R31045, 28. Jun 2022

priint:comet InDesign® Plug-Ins, Illustrator

comet.prefs.getWebImageProxy

static int webimage_set_proxy(
  String adr = 0,
  int* port = 0,
  String user = 0,
  String pwd = 0,
  String excepts = 0)

Set the proxy for Web Images. For Proxy exceptions see here.

Proxy settings are retained even after disconnecting the current data connection and are restart-resistant!

Name Type Default Description
Return int   0 or ErrorCode
adr char* oder String 0 After successful execution the variable contains the searched proxy address.

0 : Ignore result
port int* 0 After successful execution the variable contains the searched proxy port.

0 : Ignore result
user char* oder String 0 After successful execution the variable contains the searched proxy user.

0 : Ignore result
pwd char* oder String 0 After successful execution the variable contains the searched unencrypted proxy password.

0 : Ignore result
excepts char* oder String 0 After successful execution, the variable contains the list of exceptions for the proxy.

0 : Ignore result

v4.2 R31045, 28. Jun 2022

priint:comet InDesign® Plug-Ins, Illustrator

comet.prefs.setWebImageProxy

static int webimage_proxy_dialog()

Set the proxy for Web Images using the Proxy dialog. The same dialog can also be opened manually using the flyout menu Proxy... of the panel Web Images.

Proxy settings are retained even after disconnecting the current data connection and are restart-resistant!

Name Type Default Description
Return int   0 or ErrorCode

v4.2 R31045, 28. Jun 2022

priint:comet InDesign® Plug-Ins, Illustrator

static int set_updatetype(int update_type = 0)

Defining the method for handling or determining placeholder content.

Name Type Default Description
Return int   0 or ErrorCode
update_type int 0 0 : Default behavior. Placeholders are loaded using the current data pool.

1 : Store data Placeholders are loaded using the current data pool.

After the data has been inserted into the document, the data is additionally stored in the current data folder:

If the placeholder is a cScript, the content of the char* variable gExportValue is used. The content must not be longer than 6 MB. Longer content leads to an InDesign® crash!

On Direct statements (select, get, ...) the content of the first column of the first result row is stored.

2 : Use update folder

Please note: The data folder does not have to contain data for all placeholders. But if it contains data for one placeholder, data for all products must be there.

v4.1 R23000, 8. May 2018

priint:comet InDesign® Plug-Ins, comet_pdf

get_updatetype
set_updatepath
get_updatepath
comet.prefs.setUpdateType

static int get_updatetype()

Get the current placeholder load behavior.

Name Type Default Description
Return int   0 : Default behavior. Placeholders are loaded using the current data pool.

1 : Store data Placeholders are loaded using the current data pool.

After the data has been inserted into the document, the data becomes additional stored in the current data folder:

If the placeholder is a cScript, the content of the char* variablegExportValue is used. The content must not be longer than 6 MB. Longer content leads to an InDesign® crash!

On Direct statements (select, get, ...) the content of the first column of the first result row is stored.

2 : Use update folder

Please note: The data folder does not have to contain data for all placeholders. But if it contains data for one placeholder, data for all products must be there.

v4.1 R23000, 8. May 2018

priint:comet InDesign® Plug-Ins, comet_pdf

set_updatetype
set_updatepath
get_updatepath
comet.prefs.getUpdateType

static int set_updatepath(char* newpath, int askFor = 0)

Set the update folder for placeholder loadings.

The data folder is used only if update type 2 ("use data") is set, see set_updatetype.

Name Type Default Description
Return int   0 or ErrorCode
newpath char* oder String - Complete path to a valid update folder
askFor int 0 Use dialog to ask for the folder?

0 : No
1 : Yes, open folder selection dialog

v4.1 R23000, 8. May 2018

priint:comet InDesign® Plug-Ins, comet_pdf

set_updatetype
get_updatetype
get_updatepath
comet.prefs.setUpdatePath

static char* get_updatepath()

Get the path to current update folder for placeholder loadings.

Name Type Default Description
Return char*   Complete path to the current update folder for placeholders loadings.

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.

v4.1 R23000, 8. May 2018

priint:comet InDesign® Plug-Ins, comet_pdf

set_updatetype
get_updatetype
set_updatepath
comet.prefs.getUpdatePath

static int set_urllink_timeout(float newTimeout)

Please use the functions prefs::webimage_connect_timeout, prefs::webimage_header_timeout und prefs::webimage_timeout instead.

static float webimage_connect_timeout(float newTimeout)

Set the timeout for connecting the server of a Web Image. The function only sets the timeout for the connection. To set the download timeouts please use the functions prefs::webimage_header_timeout and prefs::webimage_timeout festlegen.

Name Type Default Description
Return int   -2.0 : Error
Otherwise : Old timeout
newTimeout float - Timeout for connecting for Web Images in seconds. If the parameter is missing, the function returns the current connection timeout only.

<= 0.0 : 3.0 seconds
Otherwise : Timeout in seconds

Attention: It's a float, not an integer!

v4.1.8 R230464, 23. March 2022

priint:comet InDesign® Plug-Ins, comet_pdf, Illustrator

webimage_header_timeout
webimage_timeout
comet.prefs.getWebImageTimeout
comet.prefs.setWebImageTimeout

static float webimage_header_timeout(float newTimeout)

Set the timeout for the header downloads of Web Images. The header download is used to check the image and should usually be done within 3 seconds or less.

Name Type Default Description
Return int   -2.0 : Error
Otherwise : Old timeout
newTimeout float - Timeout for the header download of Web Images in seconds. If the parameter is missing, the function returns the current header timeout only.

<= 0.0 : No timeout
Otherwise : Timeout in seconds

Attention: It's a float, not an integer!

v4.1.8 R230464, 23. March 2022

priint:comet InDesign® Plug-Ins, comet_pdf, Illustrator

webimage_connect_timeout
webimage_timeout
comet.prefs.getWebImageTimeout
comet.prefs.setWebImageTimeout

static float webimage_timeout(float newTimeout)

Set the timeout for the download of Web Images.

Name Type Default Description
Return int   -2.0 : Error
Otherwise : Old timeout
newTimeout float - Timeout for downloading for Web Images in seconds. If the parameter is missing, the function returns the current dowenload timeout only.

<= 0.0 : No timeout
Otherwise : Timeout in seconds

Attention: It's a float, not an integer!

v4.1.8 R230464, 23. March 2022

priint:comet InDesign® Plug-Ins, comet_pdf, Illustrator

webimage_connect_timeout
webimage_header_timeout
comet.prefs.getWebImageTimeout
comet.prefs.setWebImageTimeout

static int set_urllink_folder(char* path)

Set the fallback folder for Web Image downloads.

Please note, the function is a workaround for the missing implementation for panelstatement 141 in older versions of ISON/Pubserver. Usually you can find the script here:

    

See here for more information about image caching!

The path set by this function is only used if panelstatement 141 is empty and is reset to "" on logoff time always!

Name Type Default Description
Return int   0 or ErrorCode
path String or char* - New fallback path for Web Image downloads

v4.1.6 R25445, 2. July 2019

priint:comet InDesign® Plug-Ins, comet_pdf, Illustrator

get_urllink_folder
Web Image download folder, comet.prefs.setURLLinkFolder

static char* get_urllink_folder()

Get the currently set fallback folder for Web Image downloads, see set_urllink_folder.

Name Type Default Description
Return char*   Currently used fallback folder for Web Image downloads.

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.

v4.1.6 R25445, 2. July 2019

priint:comet InDesign® Plug-Ins, comet_pdf, Illustrator

set_urllink_folder
Web Image download folder, comet.prefs.getURLLinkFolder

static int get_xml_parsertype()

Which XML parser is used for reading XML? The setting is used globally for all XML files. The return value of the function corresponds to the program setting Plug-Ins -> Comet -> XML Parser in InDesign®, the program option -cometxmlparser in InDesign® Server resp. the program options -r or --xmlread in comet_pdf.

An XML parser is the part of the program that reads XML text and the content into internal data structures, the so-called XML trees (see here).

More information about the XML-Parser type can be found here

Name Type Default Description
Return int   Cuurently sed pasrer for reading XML

-1 : Error in determination

1 : Classic Windows : msxml, Mac : built-in CoreFoundation-Parser CFXMLParser

2 : Optimized Under Windows the setting is the same as 'Classic'. Under Mac, it fixes a bug in the CoreFoundation parser that caused &lt;...&gt; in running text to be interpreted as separate entities and all white spaces before and after this part of the text are lost. With 'Optimized' whitespaces around Unicode characters of the form <0xXXXX> are protected.
WARNING: Only entities of type <0xXXXX> are considered! In the Tagged Text "aaa<cSize:72.000000> <cSize:>bbb" the space between aaa and bbb is still lost.

3 : Fast In th plug-ins and in comet_pdf integrated fast and system-independent XML parser. The parser is about 50% faster than the CoreFoundation parser and msxml.

v4.1.6, R25445, 10. July 2019

priint:comet InDesign® Plug-Ins, comet_pdf

set_xml_parsertype
xmlquery

static int set_xml_parsertype(int newType)

Set the type of XML parser to be used for reading XML. The setting of the function corresponds to the program setting Plug-Ins -> Comet -> XML Parser in InDesign®, the program option -cometxmlparser in InDesign® Server resp. the program options -r or --xmlread in comet_pdf.

An XML parser is the part of the program that reads XML text and the content into internal data structures, the so-called XML trees (see here).

More information about the XML-Parser type can be found here

The setting is reset to the parser type previously defined in the program when the current data connection is disconnected.

Name Type Default Description
Return int   0 or ErrorCode
newType int - Which parser should be used when reading XML?

-1 : Error in determination

1 : Classic Windows : msxml, Mac : built-in CoreFoundation-Parser CFXMLParser

2 : Optimized Under Windows the setting is the same as 'Classic'. Under Mac, it fixes a bug in the CoreFoundation parser that caused &lt;...&gt; in running text to be interpreted as separate entities and all white spaces before and after this part of the text are lost. With 'Optimized' whitespaces around Unicode characters of the form <0xXXXX> are protected.
WARNING: Only entities of type <0xXXXX> are considered! In the Tagged Text "aaa<cSize:72.000000> <cSize:>bbb" the space between aaa and bbb is still lost.

3 : Fast In th plug-ins and in comet_pdf integrated fast and system-independent XML parser. The parser is about 50% faster than the CoreFoundation parser and msxml.

v4.1.6, R25445, 10. July 2019

priint:comet InDesign® Plug-Ins, comet_pdf

get_xml_parsertype
xmlquery

static int get_transform_settings(
  int* changeScaleFactor = 0,
  int* scaleStrokes = 0,
  int* scaleEffects = 0)

Get the current InDesign® program settings for frame scalings General : Object Editing : When Scaling.

Name Type Default Description
Return int   0 or ErrorCode
changeScaleFactor int* 0 Option Adjust Scaling percentage activated?
scaleStrokes int* 0 Option Include Stroke Weight activated?
scaleEffects int* 0 Option Include Effects activated?

v4.1.6, R25679, 2. Sept. 2019

priint:comet InDesign® Plug-Ins, comet_pdf

static int set_transform_settings(
  int changeScaleFactor = -1,
  int scaleStrokes = -1,
  int scaleEffects = -1)

Set the current InDesign® program settings for frame scalings General : Object Editing : When Scaling.

Using comet_pdf the function has no meaning!

Name Type Default Description
Return int   0 or ErrorCode
changeScaleFactor int -1 Change option Adjust Scaling percentage

0 : Turn off
1 : Turn on
-1 : Leave untouched
scaleStrokes int -1 Change option Include Stroke Weight

0 : Turn off
1 : Turn on
-1 : Leave untouched
scaleEffects int -1 Change option Include Effects

0 : Turn off
1 : Turn on
-1 : Leave untouched

v4.1.6, R25679, 2. Sept. 2019

priint:comet InDesign® Plug-Ins, comet_pdf

static int enable_preflights(int scope = 0, int state = -1)

Switch on/off preflights.

The function corresponds to the "On" checkbox of the Preflights panel. Turning on the preflights does not automatically mean that the rules will be executed immediately.

Name Type Default Description
Return int   New status:

0 : Preflights turned off
1 : Preflights enabled otherwise : Fehler

Using comet_pdf the function is defined, but will return an error always.
scope int 0 Scope of impact

0 : Global for all documents

1 : Current document. Please note that the preflights state is not stored in the document. So the next time you open the document, the global preflight state will apply to this document again!
state int -1 Preflight state

-1 : Ask only
0 : Turn off preflights
1 : Enable preflights

v4.2 R33044, 9. June 2023

priint:comet InDesign® Plug-Ins, comet_pdf

Since
Version 3.1, R1760, 25. Feb. 2010

Alphabetic index HTML hierarchy of classes or Java