The renderer module executed renderer commands in the censhare Web UI. |
This section describes some of the most important renderer commands. Besides a short description what each command does, the method name and all special parameters are given. Parameters are normally defined as attributes of the command
node. All commands have the following two standard parameters.
Additionally, a short XML example is given of how to define each command.
This command can be used to change the size of all pages of a document. Therefore, one page width and one page height can be specified.
<command document_ref_id="1" method="change-page-size" page_width="300" page_height="500"/> |
This command can be used to check if a document contains any missing fonts. If so, an exception is thrown.
No special parameters are needed.
<command document_ref_id="1" method="check-missing-fonts"/> |
This command can be used to check if a document contains any missing image links. It aborts the current command sequence in case that any image link in the document is marked as missing. This command is typically included when creating a PDF. Note, that the command ignores missing text links, since texts are embedded into the layout anyway and hence missing or modified links do not lead to low quality print results as is the case for images.
No special parameters are needed.
<command document_ref_id="1" method="check-missing-links"/> |
This command can be used to check if a document contains any modified image links. It aborts the current command sequence in case that any image link in the document is marked as modified, i.e. a content update is outstanding. This command is typically included when creating a PDF. Note, that the command ignores modified text links, since texts are embedded into the layout anyway and hence missing or modified links do not lead to low quality print results as is the case for images.
No special parameters are needed.
<command document_ref_id="1" method="check-modified-links"/> |
This command can be used to check if all placements of a document, which are placed via a collection (layout group transformation), are still valid. If any significant attributes, e.g. the language, have changed, the collections are placed again. This is effectively the same as executing all layout group transformations again, but more efficient, since placements are only changed if necessary.
This command does not only check if the source asset of a placement has changed, but also if URL parameters of placements done via transformations are different (e.g. another target-asset-id or group-name). If so, the transformation must be re-executed. This command is typically used after the asset structure of a layout was duplicated.
centered
,centered-proportional
(this is used as default, if the parameter is not specified),fit
,fit-proportional
,fit-box
,top-left
.<command document_ref_id="1" method="check-placed-collections" picture_placement_rule="fit-proportional"/> |
This command can be used to close an previously opened document.
No special parameters are needed.
<command document_ref_id="1" method="close"/> |
This command can be used to copy the content of a pagearea asset on a page or into a target box (i.e. other pagearea) at given position in points (relative to parent component). Note: The pagearea asset is not actually placed (i.e. no relation is created), just it's content is copied.
<command document_ref_id="1" method="copy-pagearea-asset" uid="#1002" parent_uid="p1" place_asset_element_id="1" place_asset_id="502770" xoffset="11.943127" yoffset="11.943127"> <uid-mapping from="b282" to="#1005"/> <uid-mapping from="b281" to="#1004"/> </command> |
This command can be used to copy the content of a pagearea box from one document to another.
<command method="copy-pagearea" source_document_ref_id="1" source_uid="b100" document_ref_id="2" uid="#1002" parent_uid="p1" xoffset="12.6" yoffset="11.3"> <uid-mapping from="b282" to="#1005"/> <uid-mapping from="b281" to="#1004"/> </command> |
This command can be used to validate a document and correct it's slugs and child element relations, if necessary. Typically it is used for documents that were created by duplication or when applying a copy template.
true
the document is automatically corrected, if necessary, otherwise an exception is thrown. The default, if not defined, is false
.true
an existing/old layout document is always converted to use the virtual file system. The default, if not defined, is false
.<command document_ref_id="1" method="correct-document" force-correction="true", force-conversion="true"/> |
This command can be used to to debug the current request of the renderer and the currently open documents. If such a command is contained in the command sequence the document will not be opened in hidden mode - it will be opened visible. When the debug step is reached a confirmation dialog is shown and the execution will stop until the user has pressed either "ok" or "cancel".
Note that this command will be ignored if the renderer runs in headless mode. |
true
a document report is requested and written into XML logging window. The default, if not defined, is true
.true
a confirmation dialog is shown and the execution will stop until the user has pressed either "ok" or "cancel". The default, if not defined, is true
.<command document_ref_id="1" method="debug"/> |
This command can be used to to delete boxes from the document. Boxes can be specified either directly via a box element with a box uid or indirectly via a group element and a group id. All corresponding boxes (together with potentially child boxes) will then be deleted.
This command already takes care of updating the asset element structure (and synchronizing (element) relations with placements) after deleting boxes with placements. |
<command method="delete-boxes" document_ref_id="1"> <box uid="b220"/> <group id="1"/> <box uid="b221"/> <group id="2"/> </command> |
This command can be used to detach a placement from a specific box. The box itself will not be deleted.
<command document_ref_id="1" method="detach" uid="b220"/> |
This command can be used to detach a pagearea box and all of it's subcomponents from a document.
<command document_ref_id="1" method="detach-pagearea" uid="b220"/> |
This command can be used to dissolve the file link of a placed text (with or without a transformation). That text is than embedded into the document and the corresponding box is unlocked and can be freely modified regarding content and style.
Note that the embedded text looses its relation to the corresponding censhare text asset. So it's no longer possible to run a content update on the affected text box. |
<command document_ref_id="1" method="dissolve" uid="b220"/> |
This command can be used to change the scale, offset and rotation of a placement in a picture box.
<command method="edit-placement" document_ref_id="1" asset_element_id="24" rotation="90" xscale="0.2" yscale="0.2" xoffsetmm="50" yoffsetmm="20"/> |
This command can be used to replace all high resolution picture against OPI pictures or vice versa. That is all picture placements corresponding to a master storage of an asset are re-linked to the corresponding opi storage item (or vice versa).
opi
is used all high resolution pictures are replaced against OPI pictures. For any other option (e.g. master
) all OPI pictures are replaced against high resolution pictures.<command method="exchange-opi" document_ref_id="1" place_storage_key="opi"/> |
This command can be used to create a PDF, EPS, IDML or a preview file from a document. This file is then copied to the server and the corresponding file system and file path are returned.
JPEG
, TIFF
and GIFf
. If missing the default JPEG
is used.false
is used."
is used as default.1.0
is used.pict
, tiff
and none
. If missing the default pict
is used.low
, good
, excellent
and great
. If missing the value defined in the preferences (<create-preview jpeg-quality="good" ...
) is used. If this is missing as well the default excellent
is used.Input:
<command method="preview" format="JPEG" scale="0.5" document_ref_id="1"/> |
Output:
<command method="preview" format="JPEG" scale="0.5" document_ref_id="1"> <file element_idx="1" corpus:asset-temp-filepath="file:335008.jpg" corpus:asset-temp-filesystem="assets-temp"/> <file element_idx="2" corpus:asset-temp-filepath="file:335009.jpg" corpus:asset-temp-filesystem="assets-temp"/> </command> |
This command can be used to export a given document. The placed pictures/texts of the document are exported and the placements are exchanged (asset file paths are replaced by local paths), all slugs are removed from the document and the document file is exported itself. The whole export folder is then zipped and the ZIP file is copied to the server (file references are reported).
true
the placed pictures are exported and the placements are exchanged to the exported files. The default is false
.true
the placed (InCopy) texts are exported and the placements are exchanged to the exported files. The default is false
.true
the pictures and/or texts are exported into a "Links" subfolder. The default is false
.Input:
<command document_ref_id="1" method="export-document" export-placed-media="true" export-placed-texts="true" create-links-folder="true"/> |
Result:
<command document_ref_id="1" method="export-document" export-placed-media="true" export-placed-texts="true" create-links-folder="true"> <file corpus:asset-temp-filepath="file:275483.zip" corpus:asset-temp-filesystem="temp"/> </command> |
This command can be used to find boses that will be marked as "not printable". This command is typically executed before an output format (PDF, EPS) of the document is created. The target boxes, which must be marked, are identified by XPath filters, which filter either placed assets or boxes.
<command document_ref_id="1" method="mark-not-printable-boxes"> <box-filter condition=":element/@content='text' and element/@page='p3'"/> </command> |
This command can be used to move a pagearea or box and all of it's subcomponents within a document, optionally resizing the component.
<command document_ref_id="1" method="move-box" uid="b100" parent_uid="p1" xoffset="11.943127" yoffset="11.943127" width="90" height="100"/> |
This command can be used to open a document and is the beginning of every render command sequence.
minimal
, geometry
and maximal
. If missing the default geometry
is used.minimal
, structure
and content
. If missing the default structure
is used.<command method="open" asset_id="241110" document_ref_id="1"/> |
This command can be used to place a collection asset onto a document. Either into a dedicated target group or into any group.
centered
,centered-proportional
(this is used as default, if the parameter is not specified),fit
,fit-proportional
,fit-box
,top-left
.<command document_ref_id="1" method="place-collection" group_id="3" place_asset_id="241110" transformation_key="censhare:product-transformation" picture_placement_rule="fit-proportional"/> |
This command can be used to place an asset into a specific box.
key
, url
and format
).false
and if an older version of the asset is already placed, an exception is thrown. The default, if not defined, is false
.true
an existing content on the box should not be deleted. The default, if not defined, is false
.true
for an unlocked text box only the content of censhare content tags is updated, but style changes are kept as far as possible. The default, if not defined, is false
.<command method="place" document_ref_id="1" uid="b220" asset_element_id="13" place_asset_id="452370" place_asset_element_id="0" place_storage_key="master"/> |
This command can be used to place an InDesign snippet asset onto a page. Optionally, a content asset (e.g. a product) is additionally placed into every group of the placed snippet.
<command document_ref_id="1" method="place-snippet" parent_uid="p1" snippet_asset_element_id="0" snippet_asset_id="502770" xoffset="11.943127" yoffset="11.943127" place_asset_id="502771"/> |
This command can be used to change the name of a layout group.
<command document_ref_id="1" method="rename-group" group_id="3" group_name="Group C"/> |
This command can be used to request a document report.
minimal
, geometry
and maximal
. If missing the default geometry
is used.minimal
, structure
and content
. If missing the default structure
is used.<command document_ref_id="1" method="report" expand="minimal" structure="content"/> |
This command can be used to save a document into a file. This file is then copied to the server and the corresponding file system and file path are returned. Additionally, the application version of the document is written into the XML.
No special parameters are needed.
Input:
<command method="save" document_ref_id="1"/> |
Output:
<command method="save" document_ref_id="1" corpus:asset-temp-filepath="file:335010.indd" corpus:asset-temp-filesystem="assets-temp" corpus:app_version="8.1"/> |
This command can be used to execute an InDesign script (JavaScript, AppleScript or VBScript). It is possible to define two different script output results (using function app.scriptArgs.setValue
). With name "censhareResult" a general script output value can be defined which is then written into the result
attribute of the script
child node. With name "censhareResultFiles" an escaped XML string can be defined which is used to reference files and folders created during the script. The syntax of this files XML is like this:
<files> <file key="key1" path="/Users/xx/Desktop/fileFromScript.txt"/> <file key="key2" path="/Users/xx/Desktop/folderFromScript"/> </files> |
These files are then copied to the server and the corresponding file system and file path are returned in a files
child nodes of the script
node (see examples for details).
language
of this node the language of the script can be defined.name
and value
.box
which has an attribute uid
.Input:
<command document_ref_id="1" method="script" script_asset_id="35673"> <param name="input1" value="1"/> <param name="input2" value="2"/> <boxes> <box uid="b220"/> </boxes> </command> <command method="script" document_ref_id="1"> <script language="javascript"> app.scriptArgs.setValue("censhareResult", "This is the script result"); </script> </command> <command method="script" document_ref_id="1"> <script language="javascript"> /* use script to create a file /Users/xx/Desktop/file1FromScript.txt and a folder /Users/xx/Desktop/folderFromScript */ var resultFilesString = "<files><file key=\"key1\" path=\"/Users/xx/Desktop/fileFromScript.txt\"/><file key=\"key2\" path=\"/Users/xx/Desktop/folderFromScript\"/></files>"; app.scriptArgs.setValue("censhareResultFiles", resultFilesString); </script> </command> |
Output:
<command document_ref_id="1" method="script" script_asset_id="35673"> <param name="input1" value="1"/> <param name="input2" value="2"/> <boxes> <box uid="b220"/> </boxes> </command> <command method="script" document_ref_id="1"> <script language="javascript" result="This is the script result"> app.scriptArgs.setValue("censhareResult", "This is the script result"); </script> </command> <command method="script" document_ref_id="1"> <script language="javascript"> /* use script to create a file /Users/xx/Desktop/file1FromScript.txt and a folder /Users/xx/Desktop/folderFromScript */ var resultFilesString = "<files><file key=\"key1\" path=\"/Users/xx/Desktop/fileFromScript.txt\"/><file key=\"key2\" path=\"/Users/xx/Desktop/folderFromScript\"/></files>"; app.scriptArgs.setValue("censhareResultFiles", resultFilesString); <files> <file key="key1" path="/Users/xx/Desktop/fileFromScript.txt" corpus:asset-temp-filepath="file:335024.txt" corpus:asset-temp-filesystem="assets-temp"/> <file key="key2" path="/Users/xx/Desktop/folderFromScript" corpus:asset-temp-filesystem="assets-temp" folder="true" corpus:asset-temp-filepath="file:335025.zip"/> </files> </script> </command> |
This command can be used to export the text content of a document into into different files for one or every page. These files are then copied to the server and the corresponding file systems and file paths are returned.
Input:
<command document_ref_id="1" method="text-content" mimetype="application/vnd.adobe.indesign-idms"/> |
Output:
<command document_ref_id="1" method="text-content" mimetype="application/vnd.adobe.indesign-idms"> <file element_idx="1" corpus:asset-temp-filesystem="assets-temp" corpus:asset-temp-filepath="file:335024.idms" mimetype="application/vnd.adobe.indesign-idms"/> <file element_idx="2" corpus:asset-temp-filesystem="assets-temp" corpus:asset-temp-filepath="file:335025.idms" mimetype="application/vnd.adobe.indesign-idms"/> </command> |
This command can be used to update the asset elements (actual and optionally target) of the document asset to be in sync with the document structure.
false
and if not one of the previous render commands requires an updating of the asset element structure nothing is done here. The default is false
.true
target asset elements are synchronized from actual asset elements. The default is false
.true
and if sync-target-elements is false
all existing target elements with hierarchy level greater than one are deleted. The default is false
. If both sync-target-elements and delete-target-elements are false
all target elements are kept as they are.<command document_ref_id="1" method="update-asset-element-structure" force="true" sync-target-elements="true"/> |
This command can be used to update all layout geometry variants of the document asset. Therefore, the current document is closed, the original document is copied from server and opened. All elements (actual and target) from document are replaced with elements from the original document. All placed texts of current document, where any version of the text is placed on the master document too, are imported again with the current version of the text in the variant.
No special parameters are needed.
<command document_ref_id="1" method="update-auto-client-variant"/> |
This command can be used to update the content of all placements of either one or all placed assets.
true
and if asset_id is not given a placed asset where only the size has changed is ignored during for the content update. The default is false
.0.0
.true
unlocked text boxes are updated by synchronizing the censhare content tags and keeping but style changes as far as possible. If false
such boxes are ignored. If this parameter is not given the attribute update-content-elements-in-server-modeupdate-content-elements-in-server-mode
from the InDesign preferences is taken where false
is the default.uid
and transformation child node).<command method="update-content" document_ref_id="1" asset_id="241120"/> |
This command can be used to execute a geometry of a document layout asset.
true
(which is the default) after the geometry update all target element relations are deleted where the following conditions are met:<command method="update-geometry" document_ref_id="1"/> |
This command can be used to update the meta data (layout box tags) of a given tagged text box. Therefore, it is searched for elements of the form.
<censhare:content configurationAssetKey="id"> |
in the XML structure of the box's content.
meta-data
node can contain one or more child nodes with name item
having an attribute id
and a text child for the new value (see example).<command method="update-meta-data" document_ref_id="1" uid="b220"> <meta-data> <item id="censhare:layout-box-tag.name>Product A</item> <item id="censhare:layout-box-tag.price>12.99</item> </meta-data> </command> |
This command can be used to update XML tags of a given document from the attributes of the corresponding asset.
No special parameters are needed.
<command method="update-placeholder" document_ref_id="1"/> |
|