This is the priint:cometserver extension of the InDesign® Server Scripting DOM.

It is intended for use with priint:cometserver, so usually you wont address this interface directly. Anyway, if for any reason you cannot use priint:cometserver or intend to build scripting based applications, this information will be useful.

The InDesign® Server Scripting DOM is exposed in JavaScript, VBScript, AppleScript and (via a generated CORBA client) Java. The priint:comet extensions can also be addresses via a SOAP WebService interface.

Some notes concerning the parameters

In comet_pdf of course there is no JavaScript interpreter available. To support Comet API calls here, please use option -j (--comet-api) instead. The option needs the path (absolut or relative to the renderer itself) to a XML file containing the definition of the Comet API calls. Files must follow this rules:

<?xml version="1.0" encoding="utf-8"?>
<js>
    <j method="methodName" ignoreError="1" activated="1">
        <paramter1>value1</paramter1>
        <paramter2>value2</paramter2>
     <!-- ... -->
    </j>
    <!-- next method call -->
</js>

where:

<?xml version="1.0" encoding="utf-8"?>
<js>
    <j method="elementTransform" ignoreError="1">
        <path></path>
        <elementID>222</elementID>
        <options>width:123.0;height:456.0;x:46.0;y:46.0;rotate:30.0</options>
    </j>
</js>

Attention I: Methods are working on the current document given by option -i always. The parameter path is ignored (but must be given!).

Attention II: Only a selected list of API calls are implemtented. See below for more informations, implemented methods are marked as available for comet_pdf.

Attention III: Only a sub set of API calls are implemented for now. Implemented functions are marked by a ★ at the left side bar. More functions will follow.

Please contact support@priint.com for more information, though only limited support for this API can be provided.

Here's a simple example on how to use the priint:comet Scripting DOM with AppleScripts (which in turn executes cScript):

tell application "Adobe InDesign CC 2019"
set visible of panel "Product Pool" to 1

set CT to comet 1 -- The 1 is important!!
tell CT
set sc to ""
set sc to sc & "int main () {"
set sc to sc & "    datapool::login (1, \"demo\", \"demo\", \"werk2demo\", \"comet_config_comic\", \"\", 1);"
set sc to sc & "    list::reload (3, 1);"
set sc to sc & "return 0;}"

eval cscript sc argument "" options ""
end tell
end tell
Return Synopsis
String about()
About priint.comet PlugIn
short adapt(double width, double height)
resize pages of current front document to a given size and apply all nails and magnets
boolean addSpreadOrPage(String path, int scope, int behind, int count, String masterPageName, String options)
add spreads or a pages behind a spread / page
boolean applicationShutdown(String options)
shut down indesign
boolean applyMasterpage(String path, int scope, int parent, String masterPageName, String options)
apply a masterpage or spread
int build(String path, int scope, int parent, String itemsXML, double x, double y, String options)
build products
int buildDynamic(String path, int scope, int parent, String itemsXML, String templatesXML, String options)
build products
boolean cometGroupDeleteGroup(String path, int groupUID, int reorganize, String options)
delete a comet group
String[] cometGroupGetPreviews(String path, int groupUID, double resolution, String tmpFile, String options)
get comet group previews
int cometGroupInsertAfter(String path, int groupUID, int templateID, String recordID, int reorganize, String options)
insert a template after ...
int cometGroupInsertBefore(String path, int groupUID, int templateID, String recordID, int reorganize, String options)
insert a template before ...
boolean cometGroupMoveBy(String path, int groupUID, double offsetX, double offsetY, String options)
relatively move a comet group
boolean cometGroupMoveTo(String path, int scope, int parent, int groupUID, double left, double top, String options)
move a comet group to ...
int cometGroupReplaceGroup(String path, int groupUID, int templateID, String recordID, int reorganize, String options)
comet group replace group
boolean deleteSpreadOrPage(String path, int scope, int first, int count, String options)
delete n spreads or a pages starting at spread / page
boolean documentClose(String path, String options)
close a document
boolean documentCreate(String path, String options)
create a document
boolean documentDuplicate(String path, String newPath, String options)
duplicate a document
boolean documentGeneratePDF(String path, String pdfProfile, String tmpFile, String options)
generate document PDF
String[] documentGetLayers(String path, String options)
get all document layer names
int documentGetPageCount(String path, String options)
get document page count
int[] documentGetPageIDs(String path, String options)
get document page IDs
int documentGetSpreadCount(String path, String options)
get document spread count
int[] documentGetSpreadIDs(String path, String options)
get document spread IDs
boolean documentOpen(String path, boolean openOriginal, String options)
open a document
boolean documentOpenCached(String path, boolean openOriginal, String[] cacheOptions, String options)
open a document with preview cache support
boolean documentReorganize(String path, int pageindex, int reorganize, String options)
document reorganize
boolean documentSave(String path, String options)
save a document
boolean documentSaveAs(String path, String newPath, String options)
save a document as ...
boolean documentSetup(String path, boolean applyAdaption, String options)
setup a document
boolean elementDelete(String path, int elementID, String options)
delete an element
boolean elementDeletePara(String path, int elementID, String elementFragment, String options)
delete a paragraph
boolean elementInsertPara(String path, int elementID, String elementFragment, boolean beforePara, String value, String options)
insert a paragraph
boolean elementMove(String path, int scope, int parent, int elementID, double left, double top, String options)
move an element relative or absolute
boolean elementSetImage(String path, int elementID, String imagePath, String options)
set an element image
boolean elementSetValue(String path, int elementID, String elementFragment, String value, String options)
set an element value
boolean elementTransform(String path, int elementID, String options)
transform an element
String eval(String cscript, String argument, String options)
Evaluate cscript statement
String exec(int actionID, String argument, String options)
Execute action (refered by action ID)
boolean execTemplate(int templateID, String recordID, String outPath, String options)
execute template
boolean generatePDF(String path, int scope, String pagesOrSpreads, String pdfProfile, String tmpFile, String options)
generate PDF
boolean generateSWF(String path, int scope, String pagesOrSpreads, String tmpFile, String options)
generate SWF
String getCometGroups(String path, int scope, int parent, String tmpFile, String options)
get comet groups
int getDocumentCount()
count openened documents
String[] getDocumentList()
openened documents
String getDocumentStyles(String path, int scope, int parent, String tmpFile, String options)
get document styles
String getElementsXML(String path, int scope, int parent, String tmpFile, String options)
get elements
int[] getGroupUIDs(String path, int scope, int parent, String options)
get group uids
String getIDML(String path, int scope, int parent, String idmlPart, String tmpFile, String options)
get IDML
String getItems(String path, int scope, int parent, String tmpFile, String options)
get items / products of document
double[] getNextGridPosition(String path, int scope, int parent, int groupUID, double directionX, double directionY, String options)
get the next suitable grid position for a comet group on a spread / page
String getNotes(String path, int scope, int parent, String tmpFile, String options)
get notes
String[] getPdfProfiles(String options)
get pdf profiles available for this InDesign® Server instance
String getPlaceholders(String path, int scope, int parent, boolean evalSyncStatus, boolean markChanges, String tmpFile, String options)
get placeholders
boolean getPreview(String path, int scope, int parent, double resolution, String tmpFile, String options)
get a page or spread preview
boolean getPreviewOfClipping(String path, int scope, int parent, double resolution, double x, double y, double width, double height, String tmpFile, String options)
get a JPEG preview of clipping
String getScriptIO()
Get ScriptIO
String getSpreads(String path, int scope, int parent, String tmpFile, String options)
get spread and pages info
String getTemplate(int parent, String tmpFile, String options)
get template
int getTemplateID(String path, int scope, int parent, String options)
get template ID
int importGroup(String path, String source, int scope, int parent, int groupUID, double left, double top, String options)
import a comet group to ...
String license()
license order
String matchItems(String path, int scope, int parent, String items, String tmpFile, String options)
compare a list of items to the items currently placed in the document
boolean modifyCometGroup(String path, int scope, int parent, int[] targetElements, String command, String options)
modify comet groups
boolean moveSpreadsOrPages(String path, int scope, int behind, int start, int count, String options)
move spreads or pages within a document
boolean pageApplyGrid(String path, int scope, int parent, int gridid, int reorganize, String options)
page apply grid
int ping()
ping
boolean placeholderLoad(String path, int scope, int parent, int[] placeholderIDs, String recordID, String options)
load a placeholder
boolean placeholderSetImage(String path, int scope, int parent, int placeholderID, String recordID, String imagePath, boolean execSaveMethod, String options)
set a placeholder image
boolean placeholderSetValue(String path, int scope, int parent, int placeholderID, String recordID, String value, boolean execSaveMethod, String options)
set a placeholder value
boolean placeholderSync(String path, int scope, int parent, int[] placeholderIDs, String recordID, String options)
sync placeholders
boolean placeholderUpdate(String path, int scope, int parent, String options)
update placeholders
int placeTemplate(String path, int scope, int parent, int templateID, String recordID, double x, double y, int reorganize, String options)
place template
boolean registerResource(String path, int tmpPath)
register resource file
boolean reloadConfig(String service, String config, String options)
reload config
int runPanelAction(String path, int scope, int parent, int actionID, String selection, String tmpFile, String options)
run a panel action
boolean setEnvironment(String initRoot, int instanceID, String pathResolvePattern)
set the application environment
boolean setItems(String path, int scope, int parent, String items, String tmpFile, String options)
set items / products of document, spread or page
boolean setNotes(String path, int scope, int parent, String notes, String tmpFile, String options)
set notes
void setScriptIO(String property)
Set ScriptIO
boolean setTemplateID(String path, int scope, int parent, int theTemplate, String options)
set template ID
boolean spreadGetCometGroupsPreview(String path, int scope, int parent, double resolution, int[] groups, String tmpFile, String options)
get a preview of a list of comet groups
boolean spreadGetCometGroupsSnippet(String path, int scope, int parent, int[] groups, String tmpFile, String options)
get a snippet of a list of comet groups
boolean spreadGetElementsPreview(String path, int scope, int parent, double resolution, int[] elements, String tmpFile, String options)
get a preview of a list of elements
boolean spreadGetElementsSnippet(String path, int scope, int parent, int[] elements, String tmpFile, String options)
get a snippet of a list of elements
int[] spreadGetPageIDs(String path, int spreadUID, String options)
get spread pages ids
int[] spreadGetPages(String path, int spreadUID, String options)
get spread pages indexes
int spreadPlaceDocument(String path, int scope, int parent, double x, double y, boolean createGroup, String tmpFile, String options)
place a document on a spread
boolean use(String service, String user, String password, boolean forceReconnect, String options)
use a predefined connection

String getScriptIO()
		 throws IdsException
Get ScriptIO

Returns:
script IO (String)
Throws:
IdsException

void setScriptIO(String property)
throws IdsException
Set ScriptIO

Parameters:
property - script IO (String)
Throws:
IdsException

String about()
   throws IdsException
About priint.comet PlugIn

Returns:
About priint.comet PlugIn resp. comet_pdf string (String)
Throws:
IdsException
Available:
InDesign®, comet_pdf
Example:
<j method="about" ignoreError="1">
</j>

String license()
	 throws IdsException
license order

Returns:
license order (String)
Throws:
IdsException

String eval(String cscript,
  String argument,
  String resultPath, /* comet_pdf only */
  String options)
  throws IdsException
Evaluate cscript statement

Parameters:
cscript - cScript code to be evaluated (must be a valid cScript or Python script) (String)
[since v4.2 R33080] Local file paths can be given by file://path_to_script
path_to_script must be either a full path (possibly with a defined $ALIAS at the beginning)
or relative to the current front document
argument - Content of char* gArgument in script (String), Attention: gArgument is of type char* in cScript, not String.
resultPath - (String) comet_pdf only! Write results into this file. Existings files are overridden!
options - setup options (String)
Option Description
destination-path Content of global script variable gDestinationPath of type char*
publicationId Content of global script variable gPublicationId of type char*
publication-list XML formated publication llist. This list is provided by the script in the global variable gPublications of type PublicationList
suppress-log [false] false, 0 : Do not suppress final message in log

true, 1 : Suppress final message in log. This is helpful if the script should only adjust the progress bar, for example.
Returns:
The called cScript has get the globale variable gOutput of type char* and 32 MB (32*1024*1024) bytes allocated before execution (In other words: gOutput is defined by the plug-ins. Do NOT define this variable in youre script! Just use it.). Scripts may fill this buffer with any valid string shorter than 32 MB. Valid means: An ASCII 0 will terminate the string, do NOT put binary data into the string. app.comet.exec will return the contents of gOutput as Javascript String.
Throws:
IdsException
Available:
InDesign®, comet_pdf
Example:
<j method="documentGetLayers" ignoreError="1">
  <path></path>
  <cscript>
int main ()
{
  printf ("argument : '%s'\n", gArgument);
  strcpy (gOutput, gArgument);
  strcat (gOutput, "\n");
  strcat (gOutput, gDocumentPath);
  strcat (gOutput, "\n");
  strcat (gOutput, gDocumentID);
  
  return 0;
}
  </cscript>
  <argument>Hello world!</argument>
  <options></options>
  <resultPath>$DESKTOP/aaa/aaa.h</resultPath>
</j>

String exec(int actionID,
  String argument,
  String resultPath, /* comet_pdf only */
  String options)
  throws IdsException
Execute action (refered by action ID)

Parameters:
actionID - ID of action in actions(.xml) to be executed (Long Integer)
argument - Content of char* gArgument in script (String), Attention: gArgument is of type char* in cScript, not String.
resultPath - (String) comet_pdf only! Write results into this file. Existings files are overridden!
options - setup options (String)
Option Description
destination-path Content of global script variable gDestinationPath of type char*
publicationId Content of global script variable gPublicationId of type char*
publication-list XML formated publication llist. This list is provided by the script in the global variable gPublications of type PublicationList
suppress-log [false] false, 0 : Do not suppress final message in log

true, 1 : Suppress final message in log. This is helpful if the script should only adjust the progress bar, for example.
Returns:
The called cScript has the globale variable gOutput of type char* and 32 MB (32*1024*1024) bytes allocated. Scripts may fill this buffer by any valid string shorter than 32 MB. Valid means: An ASCII 0 will terminate the string, do NOT put binary data into the string. app.comet.exec will return the contents of gOutput as Javascript String.
Throws:
IdsException
Available:
InDesign®, comet_pdf
Example:
<j method="documentGetLayers" ignoreError="1">
  <path></path>
  <actionID>1011173</actionID>
  <argument>Hello world!</argument>
  <options></options>
  <resultPath>$DESKTOP/aaa/aaa.h</resultPath>
</j>

int getDocumentCount()
 throws IdsException
count openened documents

Returns:
number of documents opened with documentOpen (Long Integer)
Throws:
IdsException

String[] getDocumentList()
			   throws IdsException
openened documents

Returns:
documents opened with documentOpen (Array of Strings)
Throws:
IdsException

boolean documentOpen(String path,
 boolean openOriginal,
 String options)
 throws IdsException
Open a document given by its complete path. If the document is already open, this call makes it the current 'front' document.

Parameters:
path - path (String)
openOriginal - open original (true) or copy (false) (Boolean)
options - session options (String)
Option Description
require-native:true | false true : Can only open files of current InDesign® version
false : Can open files of current and prior InDesign® versions
auto-convert:true | false true : Save older documents in the current InDesign® version
false : Leave older documents untouched. WARNING : This will most probably cause problems when trying to save the document later.
Returns:
result true (success) | false (error) (Boolean)
Throws:
IdsException

boolean documentClose(String path,
  String options)
  throws IdsException
Close a document

[Since v4.3 R35200] Panel and Front Row scripts can be undone in one single step. Because saving or closing the current script document would end the 'recording' of this sequence, InDesign sometimes refuses to save or close the current document (Error 3590). However, once a document has been saved or closed, undo is no longer possible anyway. In these cases, you can also do without 'Recording'. To do this, add the note -- Disable Undo -- (in exactly this spelling!) in a comment anywhere in your script:

Parameters:
path - path (String)
options - session options (String)
Option Description
immediate:true | false true : Close document immediatelly. WARNING : In some cases this may crash InDesign®! You need to test it in your environment.
false : Close document at next idle time
Returns:
result true (success) | false (error) (Boolean)
Throws:
IdsException

String getSpreads(String path,
		int scope,
		int parent,
		String tmpFile,
		String options)
		throws IdsException
get XML of spread and pages info

Parameters:
path - path (String)
scope - scope (Scope enumerator)
parent - UID or index of parent in hierarchy (Long Integer)
tmpFile - tmp file path (String)
options - session options (String)
Option Description
xmlschema:true | false true : Add default schema
  xmlns:psc="http://comet.werk-ii.com/psc_~"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://comet.werk-ii.com/psc_~ psc_~.xsd"


false : Omit schema
xmlindent:true | false true : Normal indention in XML
false : Compact XML
Returns:
spread xml (String)
Throws:
IdsException

boolean documentGeneratePDF(String path,
		String pdfProfile,
		String pdfPath,
		String options)
		throws IdsException
generate document PDF

Parameters:
path - path (String)
pdfProfile - PDF Profile (String)
pdfPath - Complete path to PDF. Existing files will be overridden!. Must not be empty! (String)
options - session options (String)
Option Description
layers See here
Returns:
true | false (Boolean)
Throws:
IdsException

boolean documentCreate(String path,
   String options)
   throws IdsException
create a document

Parameters:
path - path (String)
options - setup options (String)
Option Description
pages : int Number of pages in document
pages-per-spread : int Pages per spread
Returns:
result true (success) | false (error) (Boolean)
Throws:
IdsException

boolean documentSetup(String path, boolean applyAdaption, String options) throws IdsException

setup a document
Parameters:
path - path (String)
applyAdaption - apply adaption (Boolean)
options - setup options (String)
Option Description
margin-top, margin-bottom, margin-left, margin-right, margin-outer, margin-inner, margin-insideleft, margin-outsideright Set the appropriate margin of every page of the document to the given value in points
bleed-top, bleed-bottom, bleed-left, bleed-right, bleed-outer, bleed-inner, bleed-insideleft, bleed-outsideright Set the document bleed or slug. Different setting for single pages are left untouched!

Attention : Currently all bleed/slug offsets must be supplied!
slug-top, slug-bottom, slug-left, slug-right, slug-outer, slug-inner, slug-insideleft, slug-outsideright
size, width : float Width of document pages in points
height : float Height of document pages in points
Returns:
result true (success) | false (error) (Boolean)
Throws:
IdsException
Available:
InDesign®, comet_pdf
Example:
<j method="documentSetup" ignoreError="1">
  <path></path>
  <applyAdaption>0</applyAdaption>
  <options>width:1000.0;height:1000.0;</options>
</j>

boolean documentDuplicate(String path,
	  String newPath,
	  String options)
	  throws IdsException
duplicate a document

Parameters:
path - path (String)
newPath - new path (String)
options - setup options (String)
Returns:
result true (success) | false (error) (Boolean)
Throws:
IdsException

boolean documentSave(String path,
 String options)
 throws IdsException
Save a document

[Since v4.3 R35200] Panel and Front Row scripts can be undone in one single step. Because saving or closing the current script document would end the 'recording' of this sequence, InDesign sometimes refuses to save or close the current document (Error 3590). However, once a document has been saved or closed, undo is no longer possible anyway. In these cases, you can also do without 'Recording'. To do this, add the note -- Disable Undo -- (in exactly this spelling!) in a comment anywhere in your script:

Parameters:
path - path (String)
options - setup options (String)
Returns:
result true (success) | false (error) (Boolean)
Throws:
IdsException

boolean documentSaveAs(String path,
   String newPath,
   String options)
   throws IdsException
save a document as ...

Parameters:
path - path (String)
newPath - new path (String)
options - setup options (String)
Returns:
result true (success) | false (error) (Boolean)
Throws:
IdsException

String[] documentGetLayers(String path,
				 String resultPath, /* comet_pdf only */
				 String options)
				 throws IdsException
get all document layer names

Parameters:
path - template path (String)
resultPath - (String) comet_pdf only! Write results into this file. Existings files are overridden!
options - session options (String)
Option Description
visible:true | false true : Export visible layers only
false : Export all layers
Returns:
array of document layers (Array of Strings)
Throws:
IdsException
Available:
InDesign®, comet_pdf
Example:
<j method="documentGetLayers" ignoreError="1">
  <path></path>
  <options>visible:false;</options>
  <resultPath>$DESKTOP/aaa/aaa.h</resultPath>
</j>

int documentGetSpreadCount(String path,
	   String options)
	   throws IdsException
get document spread count

Parameters:
path - path (String)
options - session options (String)
Returns:
document spread count (Long Integer)
Throws:
IdsException
Available:
InDesign®, comet_pdf
Example:
<j method="documentGetSpreadCount" ignoreError="1">
  <path></path>
  <options></options>
  <resultPath>$DESKTOP/aaa.txt</resultPath>
</j>

int documentGetPageCount(String path,
	 String options)
	 throws IdsException
get document page count

Parameters:
path - path (String)
options - session options (String)
Returns:
document page count (Long Integer)
Throws:
IdsException
Available:
InDesign®, comet_pdf
Example:
<j method="documentGetPageCount" ignoreError="1">
  <path></path>
  <resultPath>$DESKTOP/aaa.txt</resultPath>
</j>

DEPRECATED

int[] documentGetSpreadIDs(String path,
	   String options)
	   throws IdsException
get document spread IDs

Parameters:
path - path (String)
options - session options (String)
Returns:
ids of all spreads in the document (Array of Long Integers)
Throws:
IdsException

DEPRECATED

int[] documentGetPageIDs(String path,
	 String options)
	 throws IdsException
get document page IDs

Parameters:
path - path (String)
options - session options (String)
Returns:
uids of all pages in the document (Array of Long Integers)
Throws:
IdsException

DEPRECATED

int[] spreadGetPages(String path,
 int spreadUID,
 String options)
 throws IdsException
get spread pages indexes

Parameters:
path - path (String)
spreadUID - spread UID (Long Integer)
options - session options (String)
Returns:
spread page indexes (Array of Long Integers)
Throws:
IdsException

DEPRECATED

int[] spreadGetPageIDs(String path,
   int spreadUID,
   String options)
   throws IdsException
get spread pages ids

Parameters:
path - path (String)
spreadUID - spread UID (Long Integer)
options - session options (String)
Returns:
spread page IDs (Array of Long Integers)
Throws:
IdsException

DEPRECATED

int[] getGroupUIDs(String path,
int scope,
int parent,
String options)
throws IdsException
get group uids

Parameters:
path - template path (String)
scope - scope (Scope enumerator)
parent - UID or index of parent in hierarchy (Long Integer)
options - session options (String)
Returns:
UIDs of groups in the specified scope (Array of Long Integers)
Throws:
IdsException

String getPlaceholders(String path,
			 int scope,
			 int parent,
			 boolean evalSyncStatus,
			 boolean markChanges,
			 String tmpFile,
			 String options)
			 throws IdsException
get placeholders

Parameters:
path - path (String)
scope - scope (Scope enumerator)
parent - UID or index of parent in hierarchy (Long Integer)
evalSyncStatus - evaluate sync status (Boolean)
markChanges - mark changes (Boolean)
tmpFile - tmp file path (String)
options - session options (String)
Option Description
xmlschema:true | false true : Add default schema
  xmlns:psc="http://comet.werk-ii.com/psc_~"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://comet.werk-ii.com/psc_~ psc_~.xsd"


false : Omit schema
xmlindent:true | false true : Normal indention in XML
false : Compact XML
Returns:
Placeholders xml (String)
Throws:
IdsException

String getCometGroups(String path,
			int scope,
			int parent,
			String tmpFile,
			String options)
			throws IdsException
get comet groups

Parameters:
path - path (String)
scope - scope (Scope enumerator)
parent - UID or index of parent in hierarchy (Long Integer)
tmpFile - tmp file path (String)
options - session options (String)
Option Description
xmlschema:true | false true : Add default schema
  xmlns:psc="http://comet.werk-ii.com/psc_~"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://comet.werk-ii.com/psc_~ psc_~.xsd"


false : Omit schema
xmlindent:true | false true : Normal indention in XML
false : Compact XML
Returns:
Comet Goups xml (String)
Throws:
IdsException

String getElementsXML(String path,
		 int scope,
		 int parent,
		 String tmpFile,
		 String options)
		 throws IdsException
get elements

Parameters:
path - path (String)
scope - scope (Scope enumerator)
parent - UID or index of parent in hierarchy (Long Integer)
tmpFile - tmp file path (String)
options - session options (String), Use content:tagged,properties; to export as comet_pdf's W2ML.
Option Description
content
xmlschema:true | false true : Add default schema
  xmlns:psc="http://comet.werk-ii.com/psc_~"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://comet.werk-ii.com/psc_~ psc_~.xsd"


false : Omit schema
xmlindent:true | false true : Normal indention in XML
false : Compact XML
Returns:
Elements xml (String)
Throws:
IdsException

String getNotes(String path,
	  int scope,
	  int parent,
	  String tmpFile,
	  String options)
	  throws IdsException
get notes

Parameters:
path - path (String)
scope - scope (Scope enumerator)
parent - UID or index of parent in hierarchy (Long Integer)
tmpFile - tmp file path (String)
options - session options (String)
Option Description
xmlschema:true | false true : Add default schema
  xmlns:psc="http://comet.werk-ii.com/psc_~"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://comet.werk-ii.com/psc_~ psc_~.xsd"


false : Omit schema
xmlindent:true | false true : Normal indention in XML
false : Compact XML
Returns:
Notes xml (String)
Throws:
IdsException

boolean setNotes(String path,
int scope,
int parent,
String notes,
String tmpFile,
String options)
throws IdsException
set notes

Parameters:
path - path (String)
scope - scope (Scope enumerator)
parent - UID or index of parent in hierarchy (Long Integer)
notes - notes (String)
tmpFile - tmp file path (String)
options - session options (String)
Returns:
success (true) or not (false) (Boolean)
Throws:
IdsException

String getTemplate(int parent,
		 String tmpFile,
		 String options)
		 throws IdsException
get template

Parameters:
parent - UID or index of parent in hierarchy (Long Integer)
tmpFile - tmp file path (String)
options - session options (String)
Option Description
xmlschema:true | false true : Add default schema
  xmlns:psc="http://comet.werk-ii.com/psc_~"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://comet.werk-ii.com/psc_~ psc_~.xsd"


false : Omit schema
xmlindent:true | false true : Normal indention in XML
false : Compact XML
Returns:
Templates xml (String)
Throws:
IdsException

int getTemplateID(String path,
int scope,
int parent,
String resultPath, /* comet_pdf only */
String options)
throws IdsException
get template ID

Parameters:
path - path (String) // ignored by comet_pdf
scope - scope (Scope enumerator), one of PAGE or SPREAD
parent - 0-based index of spread or page (Long Integer)
resultPath - (String) comet_pdf only! Write result into this file. Existings files are overridden!
options - session options (String) // ignored
Returns:
template ID (Long Integer)
Throws:
IdsException
Available:
InDesign®, comet_pdf
Example:
<j method="getTemplateID" ignoreError="1">
  <path></path>
  <scope>PAGE</scope>
  <parent>3</parent>
  <resultPath>$DESKTOP/aaa/aaa.txt</resultPath>
  <options></options>
</j>

boolean setTemplateID(String path,
  int scope,
  int parent,
  int templateID,
  String options)
  throws IdsException
Set the page template ID of the given page(s).
Parameters:
path - path (String), ignored from comet_pdf
scope - scope (Scope enumerator, one of PAGE or SPREAD
parent - 0-based index of page or spread (Long Integer)
theTemplate - Page template ID
options - session options (String)
Option Description
apply-master:true | false Apply the (first available) master page defined in the given page template to the page too?
apply-following: false | true | empty Apply the given page template (and possible master pages) to all following pages too? Use "empty" to left pages with page template != 0 untouched.
Returns:
success or not (Boolean)
Throws:
IdsException
Available:
InDesign®, comet_pdf
Example:
<j method="setTemplateID" ignoreError="1">
  <path></path>
  <scope>PAGE</scope>
  <parent>3g</parent>
  <templateID>24</templateID>
  <options>apply-master:true;apply-following:empty;</options>
</j>

DEPRECATED

double[] getNextGridPosition(String path,
		 int scope,
		 int parent,
		 int groupUID,
		 double directionX,
		 double directionY,
		 String options)
		 throws IdsException
get the next suitable grid position for a comet group on a spread / page

Parameters:
path - template path (String)
scope - scope (Scope enumerator)
parent - UID or index of parent in hierarchy (Long Integer)
groupUID - group UID (Long Integer)
directionX - direction x (Real)
directionY - direction y (Real)
options - session options (String)
Returns:
coords or NULL, if there is no suitable grid position (Array of 2 Reals)
Throws:
IdsException

boolean getPreview(String path,
int scope,
int parent,
double resolution,
String tmpFile,
String options)
throws IdsException
get a page or spread preview

Parameters:
path - path (String)
scope - scope (Scope enumerator)
parent - UID or index of parent in hierarchy (Long Integer)
resolution - resolution (Real)
tmpFile - tmp file path (String)
options - session options (String)
Option Description
scalex: float
scaley: float
greek-below: float Gray text smaller than then the given limit
bleed: float
transparency maximum
high
medium
low

otherwise : Turn off transparency
format jpeg
gif
tiff
png
encoding baseline
progressive
quality low
good
great
excellent
color-space rgb
cmyk
lab
gray
antialiasing :true | false
fullres :true | false
interlaced :true | false
add-alpha :true | false For tif and png the default is true, otherwise false
compression : int 0-10
palette exact/adaptive
mac
win
web
no, none
Returns:
success (true) or not (false) (Boolean)
Throws:
IdsException

boolean getPreviewOfClipping(String path,
		 int scope,
		 int parent,
		 double resolution,
		 double x,
		 double y,
		 double width,
		 double height,
		 String tmpFile,
		 String options)
		 throws IdsException
get a JPEG preview of clipping

Parameters:
path - path (String)
scope - scope (Scope enumerator)
parent - UID or index of parent in hierarchy (Long Integer)
resolution - resolution (Real)
x - x (Real)
y - y (Real)
width - width (Real)
height - height (Real)
tmpFile - tmp file path (String)
options - session options (String)
Returns:
success (true) or not (false) (Boolean)
Throws:
IdsException

int placeTemplate(String path,
int scope,
int parent,
int templateID,
String recordID,
double x,
double y,
int reorganize,
String resultPath, /* comet_pdf only */
                  String options)
throws IdsException
place template
Parameters:
path - path (String), ignored from comet_pdf
scope - scope (Scope enumerator), SPREAD or PAGE
parent - 0-based index of page or spread (Long Integer)
templateID - template ID (Long Integer)
recordID - record ID (String), in the format 1, 0, 0, ""
x - x (Real), Initial x-position, reorganization may change the position. In scope SPREAD the value is used to find the page in the spread.
y - y (Real), Initial y-position, reorganization may change the position.
reorganize - reorganize level (FULL, NONE, PAGE, SPREAD, SUBSEQUENT) (ReorganizeLevel enumerator)
resultPath - (String) comet_pdf only! Write result into this file. Existings files are overridden!
options - session options (String)
Option Description
snap-to-template:true Place and load the template and reorganize page(s).

The destination page must have a page template defined already!
page template settings Set the current page template to the following pages too? For more informations see here.
build settings Options for building the product, see here.
build-prescript:int ID of pre-script, see parameter preScript of productlist::establish for more informations.
build-pageitem:int ID default template, see parameter pageItem of productlist::establish for more informations. The value is used only if parameter templateID is <= 0.
snap-to-template:false Place and load the template and possible reorganize page(s).

In case of reorganizations, all effected pages must have a page template defined already!

Use this option and set parameter reorganize to NONE if you wish to place and load the product to a given xy-position only. In this case no "continuation templates" are created.
check-pagetype:true | false true (recommended!) : If available, use page type versions of templates
false : Do not check for page types.
auto-load:true | false See parameter autoLoad of dopcument::insert_macro for more informations.
layer:string Name of layer to place the product on.
prefer-existing-pages:true | false Only used if parameter reorganize = SUBSEQUENT. See flag kPreferExistingPages of productlist::reorganize for more informations.
Returns:
the new group UID (Long Integer)
Throws:
IdsException
Available:
InDesign®, comet_pdf
Example:
<j method="placeTemplate" ignoreError="1">
  <path></path>
  <scope>SPREAD</scope>
  <parent>2</parent>
  <templateID>5</templateID>
  <recordID>2, 0, 0, ""</recordID>
  <x>36.0</x>
  <y>36.0</y>
  <reorganize>NONE</reorganize>
  <resultPath>$DESKTOP/abc.txt</resultPath>
  <options>snap-to-template:false;layer:Ebene 6;build-prescript:0;build-pageitem:0;</options>
</j>

int build(String path,
int scope,
int parent,
String itemsXML,
double x,
double y,
String resultPath, /* comet_pdf only */
String options)
throws IdsException
Build products. If there is a page template defined in the destination page, the Comet 3 page template based building machine (productlist::establish) is used. Otherwise the Comet 2 grid based machine (document::build_products) is used.
Attention: Grid based product builds are not implemented in comet_pdf.
Parameters:
path - path (String) // IGNORED by comet_pdf
scope - scope, SPREAD or PAGE (Scope enumerator)
parent - 0-based index of spread or page in document (Long Integer)
itemsXML - (String : path to file or string starting with "<" with items, see here for xml format.)
x - x (Real), only used for scope SPREAD to determine the page in spread, use -1000.0 or 0.0 for first page
y - y (Real), for backward compatibility only, set value to 0.0 always
resultPath - (String) comet_pdf only! Write results into this file. Existings files are overridden!
options - session options (String)
Option Description
layer:string; Name of layer to place the products on.
build-prescript:int; ID of pre-script, see parameter preScript of productlist::establish for more informations.
build-pageitem:int; ID default template, see parameter pageItem of productlist::establish for more informations.
build-snippet-matches:string; Use existing snippets for products? String can consists of any number of the words

never

document
template
product
fallback-allowed
strict
tolerant

See parameter snippet_matches of productlist::establish for more informations.
prefer-existing-pages:true | false See kPreferExistingPages of productlist::establish
prefer-default-pageitem:true | false See kPreferDefaultPageItem of productlist::establish
skip-empty-templates:true | false See kSkipEmptyTemplates of productlist::establish
auto-detect-type:true | false See kAutoDetectType of productlist::establish
localize-masteritems:true | false See kLoadMasterItems of productlist::establish
Returns:
pages resp. spreads generated (Long Integer)
Throws:
IdsException
Available:
InDesign®, comet_pdf
Example:
<j method="documentGetLayers" ignoreError="1">
  <path></path>
  <scope>SPREAD</scope>
  <parent>1</parent>
  <itemsXML>%DESKTOP/items.xml</itemsXML>
  <x>700.0</x>
  <y>0.0</y>
  <options></options>
  <resultPath>$DESKTOP/aaa/aaa.h</resultPath>
</j>

boolean cometGroupDeleteGroup(String path,
		  int groupUID,
		  int reorganize,
		  String options)
		  throws IdsException
delete a comet group

Parameters:
path - path (String)
groupUID - group UID (Long Integer)
reorganize - reorganize level (one of FULL, NONE, PAGE, SUBSEQUENT, SPREAD) (ReorganizeLevel enumerator)
options - session options (String)
Returns:
success (true) or not (false) (Boolean)
Throws:
IdsException
Available:
InDesign®, comet_pdf
Example:
<j method="cometGroupDeleteGroup" ignoreError="1">
  <path></path>
  <groupUID>237</groupUID>
  <reorganize>NONE</reorganize>
  <options></options>
</j>

String[] cometGroupGetPreviews(String path,
					 int groupUID,
					 double resolution,
					 String tmpFile,
					 String resultPath, /* comet_pdf only */
					 String options)
					 throws IdsException
get comet group previews

Parameters:
path - path (String)
groupUID - group UID (Long Integer)
resolution - resolution (Real)
tmpFile - tmp file path (String)
resultPath - (String) comet_pdf only! Write results into this file. Existings files are overridden!
options - session options (String)
Returns:
names of generated preview files (Array of Strings)
Throws:
IdsException
Available:
InDesign®, comet_pdf
Example:
<j method="cometGroupGetPreviews" ignoreError="1">
  <path></path>
  <groupUID>237</groupUID>
  <resolution>360</resolution>
  <tmpFile>/Users/paul/Desktop/myPreviews/aaa.jpg</tmpFile>
  <options></options>
</j>

int cometGroupInsertAfter(String path,
	  int groupUID,
	  int templateID,
	  String recordID,
	  int reorganize,
	  String resultPath, /* comet_pdf only */
	  String options)
	  throws IdsException
insert a template after ...
Parameters:
path - path (String)
groupUID - group UID (Long Integer)
templateID - template ID (Long Integer)
recordID - record ID (String) in format "1, 0, 0, \"116007\""
reorganize - reorganize level (FULL, NONE, SPREAD, PAGE or SUBSEQUENT) (ReorganizeLevel enumerator)
resultPath - (String) comet_pdf only! Write result into this file. Existings files are overridden!
options - session options (String)
Option Description
check-pagetype:true | false true (recommended!) : If available, use page type versions of templates
false : Do not check for page types.
auto-load:true | false See parameter autoLoad of dopcument::insert_macro for more informations.
layer:string Name of layer to place the product on.
prefer-existing-pages:true | false Only used if parameter reorganize = SUBSEQUENT. See flag kPreferExistingPages of productlist::reorganize for more informations.
Returns:
the new group UID (Long Integer)
Throws:
IdsException
Available:
InDesign®, comet_pdf
Example:
<j method="cometGroupInsertAfter" ignoreError="1">
  <path></path>
  <groupUID>574</groupUID>
  <templateID>1</templateID>
  <recordID>1, 0, 0, "116007"</recordID>
  <reorganize>FULL</reorganize>
  <resultPath>$DESKTOP/abcd.txt</resultPath>
  <options>layer:de;</options>
</j>
var gOptions = app.comet.ping() + ";-1;";
app.comet.setEnvironment ("/Users/paul/Desktop/fifo/priint 5.5/xmldata", 1401, ""); app.comet.use ("demo", "", "", false, "");
app.comet.documentOpen ("/Users/paul/Desktop/bbb.indd", true, gOptions);
app.comet.cometGroupInsertAfter ( "/Users/paul/Desktop/bbb.indd", 574, 1, "1, 0, 0, \"116007\"", ReorganizeLevel.FULL, gOptions+"layer:Ebene 1;");

int cometGroupInsertBefore(String path,
	   int groupUID,
	   int templateID,
	   String recordID,
	   int reorganize,
	   String resultPath, /* comet_pdf only */
	   String options)
	   throws IdsException
insert a template before ...

Parameters:
path - path (String)
groupUID - group UID (Long Integer)
templateID - template ID (Long Integer)
recordID - record ID (String) in format "1, 0, 0, \"116007\""
reorganize - reorganize level (FULL, NONE, SPREAD, PAGE or SUBSEQUENT) (ReorganizeLevel enumerator)
resultPath - (String) comet_pdf only! Write result into this file. Existings files are overridden!
options - session options (String)
Option Description
check-pagetype:true | false true (recommended!) : If available, use page type versions of templates
false : Do not check for page types.
auto-load:true | false See parameter autoLoad of dopcument::insert_macro for more informations.
layer:string Name of layer to place the product on.
prefer-existing-pages:true | false Only used if parameter reorganize = SUBSEQUENT. See flag kPreferExistingPages of productlist::reorganize for more informations.
Returns:
the new group UID (Long Integer)
Throws:
IdsException
Available:
InDesign®, comet_pdf
Example:
<j method="cometGroupInsertBefore" ignoreError="1">
  <path></path>
  <groupUID>574</groupUID>
  <templateID>1</templateID>
  <recordID>1, 0, 0, "116007"</recordID>
  <reorganize>FULL</reorganize>
  <resultPath>$DESKTOP/abcd.txt</resultPath>
  <options>layer:de;</options>
</j>
var gOptions = app.comet.ping() + ";-1;";
app.comet.setEnvironment ("/Users/paul/Desktop/fifo/priint 5.5/xmldata", 1401, ""); app.comet.use ("demo", "", "", false, "");
app.comet.documentOpen ("/Users/paul/Desktop/bbb.indd", true, gOptions);
app.comet.cometGroupInsertBefore ( "/Users/paul/Desktop/bbb.indd", 574, 1, "1, 0, 0, \"116007\"", ReorganizeLevel.FULL, gOptions+"layer:Ebene 1;");

int cometGroupReplaceGroup(String path,
	   int groupUID,
	   int templateID,
	   String recordID,
	   int reorganize,
	   String resultPath, /* comet_pdf only */
	   String options)
	   throws IdsException
comet group replace group
Parameters:
path - path (String)
groupUID - group UID (Long Integer)
templateID - template ID (Long Integer), use -1 for product changes only
recordID - record ID (String) in format "1, 0, 0, \"116007\"", use "0, 0, 0, \"\"" for template changes only
reorganize - reorganize level (FULL, NONE, SPREAD, PAGE or SUBSEQUENT) (ReorganizeLevel enumerator)
resultPath - (String) comet_pdf only! Write result into this file. Existings files are overridden!
options - session options (String)
Option Description
check-pagetype:true | false true (recommended!) : If available, use page type versions of templates
false : Do not check for page types.
auto-load:true | false See parameter autoLoad of dopcument::insert_macro for more informations.
layer:string Name of layer to place the product on.
prefer-existing-pages:true | false Only used if parameter reorganize = SUBSEQUENT. See flag kPreferExistingPages of productlist::reorganize for more informations.
Returns:
the new group UID (Long Integer)
Throws:
IdsException
Available:
InDesign®, comet_pdf
Example:
<j method="cometGroupReplaceGroup" ignoreError="1">
  <path></path>
  <groupUID>574</groupUID>
  <templateID>188</templateID>
  <recordID>0, 0, 0, ""</recordID>
  <reorganize>FULL</reorganize>
  <resultPath>$DESKTOP/abcd.txt</resultPath>
  <options>layer:de;</options>
</j>

boolean cometGroupMoveBy(String path,
	 int groupUID,
	 double offsetX,
	 double offsetY,
	 String options)
	 throws IdsException
relatively move a comet group

Parameters:
path - template path (String)
groupUID - group UID (Long Integer)
offsetX - x offset (Real)
offsetY - y offset (Real)
options - session options (String) - ignored by this function
Returns:
success (true) or not (false) (Boolean)
Throws:
IdsException
Available:
InDesign®, comet_pdf
Example:
<?xml version="1.0" encoding="utf-8"?>
<js>
  <j method="cometGroupMoveBy" ignoreError="1">
    <path></path>
    <groupUID>237</groupUID>
    <offsetX>20</offsetX>
    <offsetY>20.0</offsetY>
    <options></options>
  </j>
</js>

boolean cometGroupMoveTo(String path,
	 int scope,
	 int parent,
	 int groupUID,
	 double left,
	 double top,
	 String options)
	 throws IdsException
move a comet group to ...

Parameters:
path - template path (String)
scope - scope (Scope enumerator)
parent - UID or index of parent in hierarchy (Long Integer)
groupUID - group UID (Long Integer)
left - left (Real)
top - top (Real)
options - session options (String) - ignored by this function
Returns:
success (true) or not (false) (Boolean)
Throws:
IdsException
Available:
InDesign®, comet_pdf
Example:
<?xml version="1.0" encoding="utf-8"?>
<js>
  <j method="cometGroupMoveBy" ignoreError="1">
    <path></path>
    <scope>PAGE</scope>
    <groupUID>237</groupUID>
    <left>20</left>
    <top>20.0</top>
    <options></options>
  </j>
</js>

int importGroup(String path,
String source,
int scope,
int parent,
int groupUID,
double left,
double top,
String options)
throws IdsException
import a comet group to ... from ...

Parameters:
path - template path (String)
source - source document (String)
scope - scope (Scope enumerator)
parent - UID or index of parent in hierarchy (Long Integer)
groupUID - group UID (Long Integer)
left - left (Real)
top - top (Real)
options - session options (String)
Returns:
id of the new group (Long Integer)
Throws:
IdsException

boolean execTemplate(int templateID,
 String recordID,
 String outPath,
 String options)
 throws IdsException
execute template

Parameters:
templateID - template ID (Long Integer)
recordID - record ID (String)
outPath - out path (String)
options - session options (String)
Option Description
width : float Width of template in points
margin-left, margin-right : float If no width is specified: crop to width of generated frames + margins
height : float Height of template in points
margin-top, margin-bottom : float If no height is specified: crop to height of generated frames + margins
offset-x : floatoffset-y : float
Offset of frames in points
Returns:
success (true) or not (false) (Boolean)
Throws:
IdsException

boolean documentReorganize(String path,
	   int pageIndex,
	   int reorganize,
	   String options)
	   throws IdsException
document reorganize

Parameters:
path - path (String)
pageindex - page index (Long Integer)
reorganize - reorganize level (FULL, NONE, PAGE, SUBSEQUENT, SPREAD) (ReorganizeLevel enumerator)
options - session options (String)
Option Description
prefer-existing-pages:0 | 1 Like kPreferExistingPages in productlist::reorganize
localize-masteritems:0 | 1 Like kLoadMasterItems in productlist::reorganize
Returns:
success (true) or not (false) (Boolean)
Available:
InDesign®, comet_pdf
Throws:
IdsException
Example:
<j method="documentReorganize" ignoreError="1">
  <path></path>
  <pageIndex>0</pageIndex>
  <reorganize>FULL</reorganize>
  <options></options>
</j>

boolean pageApplyGrid(String path,
  int scope,
  int parent,
  int gridid,
  int reorganize,
  String options)
  throws IdsException
page apply grid

Parameters:
path - path (String)
scope - scope (Scope enumerator)
parent - UID or index of parent in hierarchy (Long Integer)
gridid - grid ID (Long Integer)
reorganize - reorganize level (full, none, current page or subsequent pages) (ReorganizeLevel enumerator)
options - session options (String)
Returns:
success (true) or not (false) (Boolean)
Throws:
IdsException

boolean applyMasterpage(String path,
	int scope,
	int parent,
	String masterPageName,
	String options)
	throws IdsException
apply a masterpage or spread

Parameters:
path - path (String)
scope - scope (Scope enumerator : SPREAD, PAGE)
parent - Index of parent in hierarchy (Long Integer)
masterPageName - maste page name (String)
options - session options (String)
Returns:
success (true) or not (false) (Boolean)
Throws:
IdsException
Available:
InDesign®, comet_pdf
Example:
<j method="applyMasterpage" ignoreError="1">
 <path></path>
 <scope>SPREAD</scope>
 <parent>1</parent>
 <masterPageName>B-KUGEL</masterPageName>
 <options></options>
</j>

short adapt(double width,
double height)
throws IdsException
Resize pages of current front document to a given size and apply all nails and magnets. To change documents not currently in front, use doc.adapt or doc.adaptBy.

Parameters:
width - width (Real)
height - height (Real)
Returns:
result code true (success) | false (error) (Short Integer)
Throws:
IdsException
Available:
InDesign®, comet_pdf
Throws:
IdsException
Example:
<j method="adapt" ignoreError="1">
  <width>1000.0</width>
  <height>1000.0</height>
</j>

boolean modifyCometGroup(String path,  // ignored by comet_pdf
	 int scope,
	 int parent,
	 int[] targetElements,
	 String command,
	 String options)
	 throws IdsException
modify comet groups

Parameters:
path - path (String) // ignored by comet_pdf
scope - scope (Scope enumerator), DOCUMENT or ELEMENT
parent - UID of frame (Long Integer)
targetElements - target elements (Array of Long Integers)
command - command
Value Description
add Add the frames given in targetElements to the Comet group of parent

scope must have the value ELEMENT
parent must have the UID of a frame of Comet group
join Similar to "add", but the frames are added to the first entry of targetElements, and, if one of this frames has its own Comet group, the whole list is added as sub group to group of the first frame.

scope must have the value DOCUMENT
parent is ignored. Set it to 0.
remove Remove the frames given in targetElements from the Comet group of parent

scope must have the value ELEMENT
parent must have the UID of a frame of Comet group
resolve Get the Comet group given in parameter parents and resolve this group.

scope must have the value ELEMENT
parent must have the UID of a frame of Comet group
show Make the frames given in targetElement visible.

scope must have the value DOCUMENT
parent is ignored. Set it to 0.
hide Hide the frames given in targetElement.

scope must have the value DOCUMENT
parent is ignored. Set it to 0.
options - session options (String)
Option Description
subgroups:true | false; Take care on sub Comet groups (or not)

Available only for the commands resolve and add.
Returns:
success (true) or not (false) (Boolean)
Throws:
IdsException
Available:
InDesign®, comet_pdf
Throws:
IdsException
Example:
<j method="modifyCometGroup" ignoreError="1">
  <path></path>
  <scope>ELEMENT</scope>
  <parent>261</parent>
  <targetElements>
    <i>284</i>
    <i>289</i>
  </targetElements>
  <command>add</command>
  <options></options>
</j>
<j method="modifyCometGroup" ignoreError="1">
  <path></path>
  <scope>DOCUMENT</scope>
  <parent></parent>
  <targetElements>
    <i>284</i>
  </targetElements>
  <command>show</command>
  <options></options>
</j>
<j method="modifyCometGroup" ignoreError="1">
  <path></path>
  <scope>DOCUMENT</scope>
  <parent></parent>
  <targetElements>
    <i>284</i>
  </targetElements>
  <command>hide</command>
  <options></options>
</j>
<j method="modifyCometGroup" ignoreError="1">
  <path></path>
  <scope>ELEMENT</scope>
  <parent>231</parent>
  <targetElements></targetElements>
  <command>resolve</command>
  <options>subgroups:true;</options>
</j>
<j method="modifyCometGroup" ignoreError="1">
  <path></path>
  <scope>ELEMENT</scope>
  <parent>231</parent>
  <targetElements>
    <i>284</i>
    <i>254</i>
  </targetElements>
  <command>remove</command>
  <options></options>
</j>
<j method="modifyCometGroup" ignoreError="1">
  <path></path>
  <scope>DOCUMENT</scope>
  <parent></parent>
  <targetElements>
    <i>372</i>
    <i>308</i>
    <i>343</i>
  </targetElements>
  <command>join</command>
  <options></options>
</j>

boolean placeholderLoad(String path,
	int scope,
	int parent,
	int[] placeholderID,
	String recordID,
	String options)
	throws IdsException
load a placeholder

Parameters:
path - path (String), ignored by comet_pdf
scope - scope (Scope enumerator), use one of DOCUMENT, SPREAD, PAGE.
parent - 0-based index of spread or page. Ignored for scope DOCUMENT (Long Integer)
placeholderID - placeholder ID (Array of Long Integers), For all place holder use 0.
For comet_pdf add any number of sub-elements
to the XML element placeholderID.
The sub-elements may have any name you want
but must contain integers as direct values.
recordID - record ID (String), format 1, 0, 0, "". For all products use 0, 0, 0, "".
options - session options (String)
Returns:
success (true) or not (false) (Boolean)
Throws:
IdsException
Available:
InDesign®, comet_pdf
Example:
<j method="cometGroupDeleteGroup" ignoreError="1">
  <path></path>
  <scope>SPREAD</scope>
  <parent>2</parent>
  <placeholderID>
    <i>10</i>
    <i>40</i>
  </placeholderID>
  <recordID>0,0,0,""</recordID>
  <options></options>
</j>

boolean placeholderSync(String path,
	int scope,
	int parent,
	int[] placeholderIDs,
	String recordID,
	String options)
	throws IdsException
sync placeholders

Parameters:
path - path (String)
scope - scope (Scope enumerator)
parent - UID or index of parent in hierarchy (Long Integer)
placeholderIDs - placeholder ID (Array of Long Integers)
recordID - record ID (String)
options - session options (String)
Returns:
success (true) or not (false) (Boolean)
Throws:
IdsException

boolean placeholderSetValue(String path,
		int scope,
		int parent,
		int placeholderID,
		String recordID,
		String value,
		boolean execSaveMethod, // ignored by comet_pdf
		String options)
		throws IdsException
set a text placeholders content

Parameters:
path - path (String), ignored by comet_pdf
scope - scope (Scope enumerator), one of DOCUMENT, SPREAD, PAGE
parent - 0-based index of spread or page, ignored for scope DOCUMENT (Long Integer)
placeholderID - placeholder ID (Long Integer)
recordID - record ID (String), format 1, 0, 0, "".
value - new value (String)
execSaveMethod - execute save method (Boolean), ignored by comet_pdf
options - session options (String)
Returns:
success (true) or not (false) (Boolean)
Throws:
IdsException
Available:
InDesign®, comet_pdf
Example:
<j method="placeholderSetValue" ignoreError="1">
  <path></path>
  <scope>PAGE</scope>
  <parent>0</parent>
  <placeholderID>3</placeholderID>
  <recordID>1,0,0,"1010097"</recordID>
 <value>%!TT&lt;cColor:Red&gt;Hall&ouml;chen&lt;cColor:&gt; and Hi!</value>
 <execSaveMethod>0</execSaveMethod>
  <options></options>
</j>

boolean placeholderSetImage(String path,
		int scope,
		int parent,
		int placeholderID,
		String recordID,
		String imagePath,
		boolean execSaveMethod, // ignored by comet_pdf
		String options)
		throws IdsException
set an image placeholders image

Parameters:
path - path (String), ignored by comet_pdf
scope - scope (Scope enumerator), one of DOCUMENT, SPREAD, PAGE
parent - 0-based index of spread or page, ignored for scope DOCUMENT (Long Integer)
placeholderID - placeholder ID > 0 (Long Integer)
recordID - record ID (String), format 1, 0, 0, "", For all products use 0, 0, 0, "".
imagePath - image path (String)
execSaveMethod - execute save method (Boolean), ignored by comet_pdf
options - session options (String)
Returns:
success (true) or not (false) (Boolean)
Throws:
IdsException
Available:
InDesign®, comet_pdf
Example:
<j method="placeholderSetImage" ignoreError="1">
  <path></path>
  <scope>SPREAD</scope>
  <parent>2</parent>
  <placeholderID>70</placeholderID>
  <recordID>2,0,0,""</recordID>
 <imagePath>$DESKTOP/Bilder/here_we_are.png</imagePath>
 <execSaveMethod>0</execSaveMethod>
  <options></options>
</j>

boolean placeholderUpdate(String path,
	  int scope,
	  int parent,
	  String options)
	  throws IdsException
update placeholders

Parameters:
path - path (String)
scope - scope (Scope enumerator)
parent - UID or index of parent in hierarchy (Long Integer)
options - session options (String)
Returns:
success (true) or not (false) (Boolean)
Throws:
IdsException

boolean elementSetValue(String path,
	int elementID,
	String elementFragment,
	String value,
	String options)
	throws IdsException
set an element value

Parameters:
path - path (String)
elementID - element ID (Long Integer)
elementFragment - element fragment (String)
value - new value (String)
options - session options (String)
Returns:
success (true) or not (false) (Boolean)
Throws:
IdsException

boolean elementSetImage(String path,
	int elementID,
	String imagePath,
	String options)
	throws IdsException
set an element image

Parameters:
path - path (String, ignored on comet_pdf
elementID - element ID (Long Integer), uid of frame
imagePath - image path (String)
options - session options (String)
Option Description
image-pos Image position. One of the following:

top-left, topleft
top-center[ed], topcenter[ed]
top-right, topright
middle-left, middleleft
middel, center[ed]
middle-right, middleright
bottom-left, bottomleft
bottom-center[ed], bottomcenter[ed]
bottom-right

Default : topleft
image-scale Image position. One of the following:

none (This means : Place like existing.)
fit-Frame, fitFrame (Take care on the upper case F!)
fit-Content, fitContent (Take care on the upper case C!)
fit-content-width, fitcontentwidth
fit-content-height, fitcontentheight
fit-frame-width, fitframewidth
fit-frame-height, fitframeheight
best
best-centered, bestcentered

Default : none
Returns:
success (true) or not (false) (Boolean)
Throws:
IdsException
Available:
InDesign®, comet_pdf
Throws:
IdsException
Example:
<j method="elementSetImage" ignoreError="1">
  <path></path>
  <elementID>937</elementID>
  <imagePath>$DESKTOP/Bilder/here_we_are.png</imagePath>
  <options>image-pos:bottomright;image-scale:fitFrame;</options>
</j>

boolean use(String service,
String user,
String password,
boolean forceReconnect,
String options)
throws IdsException
Use a predefined connection or login directly.
Parameters:
service - service name (as defined in connections.xml) (String)
user - username (if empty: as supplied in connections.xml) (String)
password - password (if empty: as supplied in connections.xml) (String)
forceReconnect - force reconnection (Boolean)
options - setup options (String)
Option Description
playback Playback mode for connection, see here for more informations. Use one of the following:

inherited
off
record
on

playback-path Path to playback folder, see here for more informations. If empty or missing, the default path in $CACHE/DATA is used.
userdata Complete path to an XML file of type userproperties.xml containing some additional user data.
Returns:
result code true (success) | false (error) (Boolean)
Throws:
IdsException

There are three types of logins available:
  1. Predefined
  2. By endpoint
  3. Direct login [since v4.1 R21457]

The predefined method is done in two steps:

  1. First an environment is set by using the first parameter of app.comet:setEnvironment .

  2. Then a connection defined in this environment is used to login by the first parameter app.comet.use.

The environment must be an valid Comet XML folder. For performance reasons, the XML folder should be as empty as possible.

CometEnvironment.zip is a complete and usable example of an Comet XML folder.

Here's a valid connection.xml with a defined connection to a mySQL database:

<connection>
<id>1</id>
<name>demo</name>
<type>odbc_utf8</type>
<server>demo</server>
<password>***</password>
<db>comet_config</db>
<lang></lang>
<client></client>
<passcredentials></passcredentials>
</connection>

Example of predefined method to login:

var gOptions = app.comet.ping() + ";-1;";

app.comet.setEnvironment ("/Users/paul/priint_test/xmldata", 1401, "");
app.comet.use ("demo", "", "", false, gOptions);

Endpoint connections are defined only for SOAP/Publishing Server connetions. The endpoint connection is done in two steps:

  1. First the endpoint is defined by using the third app.comet:setEnvironment .

  2. The following call to app.comet:.use will then connect to the endpoint using the given user name and password. Please note, endpoint connections cannot set a specific language!

Example of endpoint connection to login:

var gOptions = app.comet.ping() + ";-1;";

app.comet.setEnvironment ("", 1401, "http://localhost_40080_CometBridge_Comet3Service");
app.comet.use ("", "user", "password", false, gOptions);

Direct login can be done by a single call to app.comet.use. After a trailing ##, the connection is described in the first parameter of the function by a semicolon delimited key-values list. The following keywords are supported:


Example of direct login:

app.comet.use (
"##server:demo;type:odbc_utf8;db:comet_config",
"demo",
"***",
false,
gOptions);



boolean setEnvironment(String initRoot,
   int instanceID,
   String pathResolvePattern)
   throws IdsException
set the application environment, see app.comet.use for more informations.

Parameters:
initRoot - root path of the initialization project (String)
instanceID - ID of the server instance,must be unique (Long Integer)
pathResolvePattern - pattern to resolve paths provided by comet server (String)
Returns:
result code true (success) | false (error) (Boolean)
Throws:
IdsException

DEPRECATED

boolean registerResource(String path,
	 int tmpPath)
	 throws IdsException
register resource file

Parameters:
path - virtual path of the resource (String)
tmpPath - path where the resource file is currently stored (Long Integer)
Returns:
result code true (success) | false (error) (Boolean)
Throws:
IdsException

int ping()
throws IdsException
ping

Returns:
ping (Long Integer)
Throws:
IdsException

DEPRECATED

boolean applicationShutdown(String options)
		throws IdsException
shut down indesign

Parameters:
options - session options (String)
Returns:
true if the applcation will likely shutdown on next idle time (Boolean)
Throws:
IdsException

DEPRECATED

boolean reloadConfig(String service,
 String config,
 String options)
 throws IdsException
reload config

Parameters:
service - service name (as defined in connection.xml) (String)
config - config (String)
options - setup options (String)
Returns:
result code true (success) | false (error) (Boolean)
Throws:
IdsException

boolean elementMove(String path, // ignored by comet_pdf
int scope,
int parent,
int elementID,
double left,
double top,
String options)
throws IdsException
move an element relative or absolute

Parameters:
path - template path (String), ignored by comet_pdf
scope - scope (Scope enumerator : PAGE, SPREAD)
parent - Spread ot page index for destination (Long Integer), 0-based, used only if move-relative:1;
elementID - element ID (Long Integer)
left - left (Real)
top - top (Real)
options - session options (String)
Option Description
move-relative:0 | 1; Move frame relative or absolut?
Returns:
success (true) or not (false) (Boolean)
Available:
InDesign®, comet_pdf
Throws:
IdsException
Example:
<j method="elementMove" ignoreError="1">
  <path></path>
  <scope>SPREAD</scope>
  <parent>2</parent>
  <elementID>222</elementID>
  <left>46.0</left>
  <top>46.0</top>
  <options>move-relative:0;</options>
</j>

boolean elementDelete(String path, // ignored by comet_pdf
  int elementID,
  String options)
  throws IdsException
delete an element (a frame)
Parameters:
path - template path (String) ignored by comet_pdf
elementID - element UID (Long Integer)
options - session options (String)
Returns:
success (true) or not (false) (Boolean)
Throws:
IdsException
Available:
InDesign®, comet_pdf
Throws:
IdsException
Example:
<j method="elementDelete" ignoreError="1">
  <path></path>
  <elementID>905</elementID>
  <options></options>
</j>

boolean elementTransform(String path,
	 int elementID,
	 String options)
	 throws IdsException
Transform an element. If multiple transformings are given, transforming is done in multiple steps in the following order:
  1. resize
  2. scale
  3. rotate
  4. moveto
Parameters:
path - template path (String), ignored from comet_pdf
elementID - UID of requested frame
options - session options (String) :
Option Description
width:float;
height:float;

Resize frame to the given size. Default fix point is lefttop.

See here for more informations about the new frame sizes.

scale-x:float;
scale-y:float;
Scale frame by the given percentages. Values must be greater 0.0. 1.0 means 100%. Default fix point is the left top corner of the bounding box.
rotate:float; Rotate frame by the given degrees (0.0-360.0) clock wise. Default fix point is center.
x:float;
y:float;
[page-num:int;]
Move frame to the given position, and (if given and >= 0) to the given page. Page numbers are 0-based.
reference-point:fixpoint - optional

Resizes, scales and roations can be done at one of the nine referenz points of the frame. Supported values are:

  • lefttop | lt | tl
  • centertop | ct | tc
  • righttop | rt | tr

  • leftcenter | lc | cl
  • center | c
  • rightcenter | rc | cr

  • leftbottom | lb | bl
  • centerbottom | cb | bc
  • rightbottom | rb | br
Returns:
success (true) or not (false) (Boolean)
Available:
InDesign®, comet_pdf
Throws:
IdsException
Example:
<j method="elementTransform" ignoreError="1">
  <path></path>
  <elementID>222</elementID>
  <options>width:100.0;height:100.0;reference-point:rb</options>
</j>
var gOptions = app.comet.ping() + ";-1;";
var myPath = "/Users/paul/Desktop/resize_frame.indd";

app.comet.setEnvironment ("/Users/paul/Desktop/fifo/5. print.day/xmldata", 1401, "");
app.comet.use ("printday5.5", "", "", false, "");
app.comet.documentOpen (myPath, true, gOptions);
app.comet.elementTransform (myPath, 225, gOptions+";width:100.0;height:100.0;reference-point:rb");

boolean elementInsertPara(String path,
	  int elementID,
	  String elementFragment,
	  boolean beforePara,
	  String value,
	  String options)
	  throws IdsException
insert a paragraph

Parameters:
path - path (String)
elementID - element ID (Long Integer)
elementFragment - element fragment (String)
beforePara - before paragraph (true) or after (false) (Boolean)
value - new value (String)
options - session options (String)
Returns:
success (true) or not (false) (Boolean)
Throws:
IdsException

boolean generatePDF(String path,
int scope,
String pagesOrSpreads,
String pdfProfile,
String tmpFile,
String options)
throws IdsException
generate PDF

Parameters:
path - path (String)
scope - scope (Scope enumerator)
pagesOrSpreads - Comma seperated list of pages resp spreads (String)
pdfProfile - PDF Profile (String)
tmpFile - tmp file path (String)
options - session options (String)
Returns:
true | false (Boolean)
Throws:
IdsException

DEPRECATED

boolean generateSWF(String path,
int scope,
String pagesOrSpreads,
String tmpFile,
String options)
throws IdsException
Generate an SWF Adobe Multi Media Flash File.

No longer supported since InDesign® 2020!
In this case the function will return the error -2020.

Parameters:
path - path (String)
scope - scope (Scope enumerator)
pagesOrSpreads - Comma seperated list of pages resp spreads (String)
tmpFile - tmp file path (String)
options - session options (String)
Option Description
package-format swf : Create a SWF formated package
package : Create a InDesign® package
package-images:true | false valid only for package-format:package

true : Add images to package
false : Do not add images to package
package-color-profiles:true | false valid only for package-format:package

true : Add color profiles to package
false : Do not add color profiles to package
package-hidden-layers:true | false valid only for package-format:package

true : Add hidden layers to package
false : Do not add hidden layers to package
package-ignore-errors:true | false valid only for package-format:package

true : Stopp packiging on any errors
false : Ingore missing fonts, images, profiles, ...
package-report:true | false valid only for package-format:package

true : Write a package report
false : Do not write a package report.
package-include-idml:true | false valid only for package-format:package

true : Include an IDML verison of the document into the package
false : Do not include an IDML verison of the document into the packag
package-include-pdf:true | false valid only for package-format:package

true : Include a PDF verison of the document into the package
false : Do not include a PDF verison of the document into the packag
package-pdf-profile valid only for package-format:package and package-include-pdf:true

Name of PDF profile used to create the PDF
package-folder-name valid only for package-format:package

Destination folder for the package. If the folder does not exist, it is created.
package-document-name valid only for package-format:package

Name of package result folder
Returns:
true | false (Boolean)
Throws:
IdsException

DEPRECATED

int buildDynamic(String path,
int scope,
int parent,
String itemsXML,
String templatesXML,
String options)
throws IdsException
build products

Parameters:
path - path (String)
scope - scope (Scope enumerator)
parent - UID or index of parent in hierarchy (Long Integer)
itemsXML - xml with list of items (String)
templatesXML - xml with list of items (String)
options - session options (String)
Returns:
pages resp. spreads generated (Long Integer)
Throws:
IdsException

boolean elementDeletePara(String path,
	  int elementID,
	  String elementFragment,
	  String options)
	  throws IdsException
delete a paragraph

Parameters:
path - path (String)
elementID - element ID (Long Integer)
elementFragment - element fragment (String)
options - session options (String)
Returns:
success (true) or not (false) (Boolean)
Throws:
IdsException

boolean spreadGetElementsPreview(String path,
			 int scope,
			 int parent,
			 double resolution,
			 int[] elements,
			 String tmpFile,
			 String options)
			 throws IdsException
get a preview of a list of elements

Parameters:
path - path (String)
scope - scope (Scope enumerator)
parent - UID or index of parent in hierarchy (Long Integer)
resolution - resolution (Real)
elements - element IDs (Array of Long Integers)
tmpFile - tmp file path (String)
options - session options (String)
Returns:
success (true) or not (false) (Boolean)
Throws:
IdsException

boolean spreadGetCometGroupsPreview(String path,
				int scope,
				int parent,
				double resolution,
				int[] groups,
				String tmpFile,
				String options)
				throws IdsException
get a preview of a list of comet groups

Parameters:
path - path (String)
scope - scope (Scope enumerator)
parent - UID or index of parent in hierarchy (Long Integer)
resolution - resolution (Real)
groups - group IDs (Array of Long Integers)
tmpFile - tmp file path (String)
options - session options (String)
Returns:
success (true) or not (false) (Boolean)
Throws:
IdsException

boolean spreadGetElementsSnippet(String path,
			 int scope,
			 int parent,
			 int[] elements,
			 String tmpFile,
			 String options)
			 throws IdsException
get a snippet of a list of elements

Parameters:
path - path (String)
scope - scope (Scope enumerator)
parent - UID or index of parent in hierarchy (Long Integer)
elements - element IDs (Array of Long Integers)
tmpFile - tmp file path (String)
options - session options (String)
Returns:
success (true) or not (false) (Boolean)
Throws:
IdsException

boolean spreadGetCometGroupsSnippet(String path,
				int scope,
				int parent,
				int[] groups,
				String tmpFile,
				String options)
				throws IdsException
get a snippet of a list of comet groups

Parameters:
path - path (String)
scope - scope (Scope enumerator)
parent - UID or index of parent in hierarchy (Long Integer)
groups - group IDs (Array of Long Integers)
tmpFile - tmp file path (String)
options - session options (String)
Returns:
success (true) or not (false) (Boolean)
Throws:
IdsException

int spreadPlaceDocument(String path,
	int scope,
	int parent,
	double x,
	double y,
	boolean createGroup,
	String tmpFile,
	String options)
	throws IdsException
place a document on a spread

Parameters:
path - path (String)
scope - scope (Scope enumerator)
parent - UID or index of parent in hierarchy (Long Integer)
x - x (Real)
y - y (Real)
createGroup - create comet group (Boolean)
tmpFile - path of document (String)
options - session options (String)
Option Description
layer Target layer
Returns:
ID of the generated comet group or 0 if one was created (Long Integer)
Throws:
IdsException

boolean setItems(String path,
int scope, // IGNORED
int parent,// IGNORED
String items,
String tmpFile,
String options)
throws IdsException
set items / products of document

Parameters:
path - path (String) // IGNORED by comet_pdf
scope - scope (Scope enumerator) // IGNORED
parent - UID or index of parent in hierarchy (Long Integer) // IGNORED
items - new item list (String : path to file or string starting with "<" with items, see here for xml format.)
options - session options (String)
Option Description
prefer-existing-pages:true | false See kPreferExistingPages of productlist::establish
prefer-default-pageitem:true | false See kPreferDefaultPageItem of productlist::establish
skip-empty-templates:true | false See kSkipEmptyTemplates of productlist::establish
auto-detect-type:true | false See kAutoDetectType of productlist::establish
localize-masteritems:true | false See kLoadMasterItems of productlist::establish
allow-doubles:true | false true : Allow double products false : Only use the first product in case of multiple products with the same id
preserve-manual-groups:true | false true : Remove products with empty id false : Import products with empty id too
Returns:
boolean / success or not (Boolean)
Throws:
IdsException
Available:
InDesign®, comet_pdf
Throws:
IdsException
Example:
<j method="setitems" ignoreError="1">
  <path></path>
  <scope>PAGE</scope>
  <parent>0</parent>
  <items>$DESKTOP/pp.xml</items>
  <options>localize-masteritems:true;</options>
</j>

String getItems(String path,
int scope,
int parent,
String tmpFile,
String options)
throws IdsException
get items / products of document

Parameters:
path - path (String)
scope - scope (Scope enumerator)
parent - UID or index of parent in hierarchy (Long Integer)
tmpFile - tmp file path (String)
options - session options (String)
Option Description
hide-manual-groups:true | false true : Don't add manually inserted Comet groups into the result
false : Add manually inserted Comet groups into the result
xmlschema:true | false true : Add default schema
  xmlns:psc="http://comet.werk-ii.com/psc_~"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://comet.werk-ii.com/psc_~ psc_~.xsd"


false : Omit schema
xmlindent:true | false true : Normal indention in XML
false : Compact XML
Returns:
Items xml (String)
Throws:
IdsException

boolean documentOpenCached(String path,
	   boolean openOriginal,
	   String[] cacheOptions,
	   String options)
	   throws IdsException
open a document with preview cache support

Parameters:
path - path (String)
openOriginal - open original (true) or copy (false) (Boolean)
cacheOptions - cache options (Array of Strings)
options - session options (String)
Returns:
boolean / success or not (Boolean)
Throws:
IdsException

boolean addSpreadOrPage(String path, // IGNORED by comet_pdf
	int scope,
	int behind,
	int count,
	String masterPageName,
	String options)
	throws IdsException
add spreads or a pages behind a spread / page

Parameters:
path - path (String) // IGNORED by comet_pdf
scope - scope (Scope enumerator: SPREAD or PAGE)
behind - 0-based index of spread or page (Long Integer)
count - how many spreads / pages to create (Long Integer)
masterPageName - master page name (String)
options - session options (String)
Option Description
pages-per-spread : int Number of pages or spreads to create. Valid only for scope SPREAD.
reshuffle : true | false true : Reshuffle pages if needed
false : Suppress reshuffling pages
Returns:
success (true) or not (false) (Boolean)
Throws:
IdsException
Available:
InDesign®, comet_pdf
Example:
<j method="addSpreadOrPage" ignoreError="1">
  <path></path>
  <scope>SPREAD</scope>
  <parent>1</parent>
  <masterPageName>B-Masterpage</masterPageName>
  <options>pages-per-spread:2;</options>
</j>

boolean deleteSpreadOrPage(String path,  // IGNORED by comet_pdf
	   int scope,
	   int first,
	   int count,
	   String options)
	   throws IdsException
delete n spreads or a pages starting at spread / page

Parameters:
path - path (String) // IGNORED by comet_pdf
scope - scope (Scope enumerator)
first - 0-based index of spread or page (Long Integer)
count - how many spreads / pages to delete (Long Integer), use -1 to remove all
options - session options (String)
Option Description
reshuffle: true | false true : Reshuffle pages if needed
false : Suppress reshuffling pages
Returns:
success (true) or not (false) (Boolean)
Throws:
IdsException
Available:
InDesign®, comet_pdf
Example:
<j method="deleteSpreadOrPage" ignoreError="1">
  <path></path>
  <scope>SPREAD</scope>
  <parent>2</parent>
  <count>-1</count>
  <options></options>
</j>

String matchItems(String path,
		int scope,
		int parent,
		String items,
		String tmpFile,
		String options)
		throws IdsException
compare a list of items to the items currently placed in the document

Parameters:
path - template path (String)
scope - scope (Scope enumerator), one of SPREAD or PAGE
parent - 0-based index of spread or page (Long Integer)
items - new item list (String : path to file or string starting with "<" with items, see here for xml format. )
tmpFile - tmp file path (String)
Value Description
treshold=int Due to a bug in the older CORBA interface of InDesign® Server, InDesign® Server may crash, if functions called through this interface returning values longer than 512 kB. Therefor we limit the return values of functions that may call through this interface to 512 kB. Using the treshold, you can try to increase this limit by your own risk. Values longer than the treshold are not returned and the functions return string is empty in this case.

Use -1 to disable range checkings here.

Ignored by comet_pdf!
full_path A better way to set your own treshold is the command line option

-cometthreshold your_global_threshold_in_bytes (-1 for "any")

In this case results longer then the treshold are written to the given file and you have to check the function result in your JavaScript : If the result is undefined, use this file to read the result from.

Ignored by comet_pdf!
!full_path Write the result to the file given by the path. Take care for the trailing exclamation mark!
options - session options (String)
Option Description
xmlschema:true | false true : Add default schema
  xmlns:psc="http://comet.werk-ii.com/psc_~"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://comet.werk-ii.com/psc_~ psc_~.xsd"


false : Omit schema
xmlindent:true | false; Indent the result XML or not.
hide-manual-groups:true | false; Include manually created Comet groups in the result or not?
Returns:
list of how the items in the document would have to be reorganized to reflect the order stated in the items argument (String)
Throws:
IdsException
Available:
InDesign®, comet_pdf
Example:
<j method="matchItems" ignoreError="1">
  <path></path>
  <scope>PAGE</scope>
  <parent>0</parent>
  <items>$DESKTOP/ccc.xml</items>
  <tmpFile>!$DESKTOP/ccc_new.xml</tmpFile>
  <options>xmlindent:true;</options>
</j>

boolean moveSpreadsOrPages(String path,
	   int scope,
	   int behind,
	   int start,
	   int count,
	   String options)
	   throws IdsException
move spreads or pages within a document
Parameters:
path - template path (String)
scope - scope, SREAD or PAGE (Scope enumerator)
behind - 0-based index of parent in hierarchy (Long Integer)
start - 0-based index of first parent in hierarchy to be moved (Long Integer)
count - how many spreads / pages to move (Long Integer)
options - session options (String)
Returns:
true on success, false otherwise (Boolean)
Throws:
IdsException
Available:
InDesign®, comet_pdf
Example:
<j method="matchItems" ignoreError="1">
  <path></path>
  <scope>PAGE</scope>
  <start>3</start>
  <count>4</count>
  <parent>8</tmpFile>
  <options></options>
</j>

String[] getPdfProfiles(String options)
			  throws IdsException
get pdf profiles available for this InDesign® Server instance

Parameters:
options - session options (String)
Returns:
array of pdf profiles (Array of Strings)
Throws:
IdsException

DEPRECATED

String getDocumentStyles(String path,
			   int scope,
			   int parent,
			   String tmpFile,
			   String options)
			   throws IdsException
get document styles
Parameters:
path - path (String)
scope - scope (Scope enumerator)
parent - UID or index of parent in hierarchy (Long Integer)
tmpFile - tmp file path (String)
options - session options (String)
Option Description
xmlschema:true | false true : Add default schema
  xmlns:psc="http://comet.werk-ii.com/psc_~"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://comet.werk-ii.com/psc_~ psc_~.xsd"


false : Omit schema
xmlindent:true | false true : Normal indention in XML
false : Compact XML
Returns:
xml with document styles (String)
Throws:
IdsException

int runPanelAction(String path,
int scope,
int parent,
int actionID,
String selection,
String tmpFile,
String options)
throws IdsException
run a panel action

Parameters:
path - path (String)
scope - scope (Scope enumerator)
parent - UID or index of parent in hierarchy (Long Integer)
actionID - action to be executed (Long Integer)
selection - xml defining the current selection (String)
tmpFile - tmp file path (String)
options - session options (String)
Returns:
result code (Long Integer)
Throws:
IdsException

String getIDML(String path,
	 int scope,
	 int parent,
	 String idmlPart,
	 String tmpFile,
	 String options)
	 throws IdsException
get IDML

Parameters:
path - path (String)
scope - scope (currently unused) (Scope enumerator)
parent - UID or index of parent in hierarchy (currently unused) (Long Integer)
idmlPart - idml part (such as "styles", "graphics" etc.) (String)
tmpFile - tmp file path (String)
options - session options (String)
Returns:
IDML or part of xml (String)
Throws:
IdsException

String doc.frameSetOrigin(int frameUID, int originUID) throws IdsException

Set the origin UID in master of a given frame. The function is required only for synchronizations. It defines the corresponding frame in the master of a frame of a variant.

Please note: This function is not handled in the comet suite but directly by a document!

Parameters:
frameUID - UID of an existing frame in the document (Long Integer)
originUID - UID of the origin frame in master or 0 (Long Integer)
Throws:
IdsException

int doc.frameSetOrigin(int frameUID)

Get the origin frame UID in master of a given frame. The function is required only for synchronizations. It returns the corresponding frame in the master of a frame of a variant.

Please note: This function is not handled in the comet suite but directly by a document!

Parameters:
frameUID - UID of an existing frame in the document (Long Integer)

String doc.pageSetOrigin(int pageUID, int originUID) throws IdsException

Set the origin UID in master of a given page. The function is required only for synchronizations. It defines the corresponding page by UID in the master of a page of a variant.

Please note: This function is not handled in the comet suite but directly by a document!

Parameters:
pageUID - UID of an existing page in the document (Long Integer)
originUID - UID of the origin page in master or 0 (Long Integer)
Throws:
IdsException

int doc.pageGetOrigin(int frameUID)

Get the origin page UID in master of a given page. The function is required only for synchronizations. It returns the corresponding page UID in the master of a page of a variant.

Please note: This function is not handled in the comet suite but directly by a document!

Parameters:
pageUID - UID of an existing frame in the document (Long Integer)

int doc.getTemplateID()

[Since v4.1.6 R26580] The function determines whether the document is a priint:comet template or not.

Return Values

Please note: This function is not handled in the comet suite but directly by a document!


int doc.getPageTemplateID()

[Since v4.1.6 R26580] The function determines whether the document is a priint:comet page template or not.

Return Values

Please note: This function is not handled in the comet suite but directly by a document!