Comet_pdf is a stand-alone programm to generate PDFs based on files created by Adobe® InDesign® enhanced Comet plug-ins. For the composition of the PDFS you can use nearly the whole width of Comet technologies:
The resulting file is exported with the help of PDFLib from PDFLib.com.
We kindly ask for youre understandig that productive projects should be devoloped by close contacts to WERK II only: The huge range of Adobe® InDesign® and Comet plugins functionalities require additions and corrections on comet_pdf from time to time. A draft of not yet implemented functions can be found here.
Please proof your PDFs carefully before printing it! WERK II AND PARTNERS EXPRESSLY DISCLAIMS ALL WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY WITHOUT LIMITATION FOR WRONG OR DEFECT PDFS AND PRINTS.
Comet_pdf shows its current version and a short help for the following three situations:
Version:
comet_pdf v4.1.6 R27000, based on Comet 4.1.7 and PDFlib 9.2.0, 64bit
Usage:
comet_pdf
-c | --conn path [app_path] Path to connections.xml
-l | --login name [empty] Entry for connection data in connections.xml
-x | --cache path [app_path/XCache/Upid] Path to XCache folder.
| --config-cache [no] Cache downloaded config
-v | --log path [empty] Write logfile
| --logx path [empty] Write extra logfile for API calls
| --logger path [empty] Logger configuration XML, full path or folder of log.xml
-i | --in path [empty] Input file or template
-o | --out path [empty] Output path for PDF, if empty path of input or product list
-y | --layer name [Layer 1] Default layer for frames
-u | --pdflog name [empty] Write log of PDFlib calls
-p | --products path [empty] Path to products list (items.XML)
-q | --product string [empty] One product id in format "1 0 0 ''"
-t | --template string [empty] TemplateID (and position) in format "12 36.0 36.0"
-e | --exec ID [0] Action to execute, keyword "place" or path to script
-Q | --params string [empty] gParamN~ for script in option -e
-g | --global var=val [empty] Temporary change a global variable of the pool
-L | --launch [off] Auto launch resulting PDF
-N | --nolaunch [off] Suppress auto launch resulting PDF
-H | --config_path path [app_path] Folder with configuration files (change app_path)
-H | --hyphens path [app_path/hyphenations] Folder with hyphenation files
-P | --psnames path [empty] XML file with font names
| --fontfolders path [empty] XML file with more font folders
| --fontfolder path [empty] Additional folder to search for fonts
-E | --eps_esc path [empty] XML file with EPS escapes
-V | --verbose flags [empty] Print internal infos, any of 'bcedioqrstw*X'
-C | --crop [off] Crop pages, "l [t r b]", width of white strips in points
-f | --folders path [empty] Additional image search path(s)
-r | --xmlread string [classic] XML parser type : classic, optimized, fast
-z | --pdfset string [empty] pdf preset
| --pdfsets string [empty] list pdf presets into file
| --compression int [9] 0 (no compression), ..., 9 (best compression)
-A | --annot [no] Draw annotations (Comet Notes)
-a | --adorns tofFuUepcih [empty] Various kinds of adornments
| --preview string [empty] Preview options (NOT USED FOR NOW)
| --spreadwise [off] Spread wise export of pages
| --autosave [off] Save the input w2ml to outpath.w2ml
| --save path [empty] Save changes made on input W2ML to path
| --metadata int [0] 0 : Off,
1 : Create
2 : Preview groups
4 : Zip
8 : Next to w2ml
16 : Next to PDF
32 : Suppress
| --docid string [empty] priint document id
| --l_type string [empty] Login : type
| --l_service string [empty] Login : service (path, name, or URL)
| --l_user string [empty] Login : user name
| --l_pwd string [empty] Login : password
| --l_PWD string [empty] Login : password (crypted)
| --l_db string [empty] Login : database
| --l_client string [empty] Login : client
| --crypto string [empty] Crypt password
-m | --merge path [empty] path to xml to compose PDF file
| --scriptin path [empty] path to script argument (gArgument) file
| --scriptout path [empty] path to script result string (gOutput)
| --pidstart path [empty] path to file indicating program start
| --piddone path [empty] path to file indicating program end
-j | --comet-api path [empty] path to XML with Comet API call
| --interactive string [empty] Interactive PDF flags (1: on,2:tab order,4:article order)
| --icc string [app_path/colorprofiles.xml] Path to colorprofiles.xml
| --apply_icc string [off] Apply color profiles of document
| --working_icc string [empty] name of working CMYK color profile for PDFX/4, 5 conform PDFs
| --w2lic_path string [app_path/w2.lic] path to priint:suite license (w2.lic)
| --pdflic_path string [app_path/licensekeys.txt] path to PDFlib license (licensekeys.txt)
| --w2lic [no] Validate priint license : 0=DEMO, 1=Preview, 2=Okay
| --pdflic [no] Validate PDFLib license : 0=Failed, 1=Watermark, 2=Okay
| --no_bash_colors [off] Suppress colored messages (usefull for output redirections)
| --playback [off] Playback mode (off | record | on)
| --playback_path string [empty] Path to playback data folder
| --soaplog [off] if given, dump soap traffic to $DESKTOP/_soap*.log
| --fontscale float [1.0] Scale all text by the given amount (1.0 is 100%)
| --urllink_update string [off] Update Web Images of input file (off | missing | all)
| --update_path string [empty] Path to folder for update data -- since v4.1.5
| --upr string [off] Write a Unix PostScript Resource (UPR) file only
| --typographics [off] Use typographics quotas (on, off)
| --awesome path [empty] Path to file with additional 'Awesome' icon names
| --awesometest fontname [empty] Test this Awesome font (given by Postscript name)
| --desttype keyword [pdf] Type of destination file (pdf, html)
| --htmlhead path [empty] Path to additional html header stuff before </head>
| --htmlfoot path [empty] Path to additional html footer stuff before </body>
| --htmloptions path [empty] Path to file with html export options
| --deepl path [empty] Path to file with deepl.com Authentication key
| --lang keyword [empty] Destination language (EN, DE, FR, ES, PT, IT, NL, PL, RU)
| --checkfonts int [0] Dump missing font definitions
1 : psfonts C++
2 : psfonts XML
3 : fontdb C++
4 : fontDB XML
| --font-policy int [63] Allow / disallow font mapping, bitmap, see details below.
| --report path [empty] Write document issues report to XML file.
| --legalnotes [off] Show Legal Notes in browser
| --lazyfit int [0] 0 : Off, 1 : On - Avoid superflous FitFrames
| --check-webimages int [1] 0 : Off, 1 : On - Should Web Images checked before use?
| --unused-styles int [0] 0 : Off, 1 : On - Show unused styles at the end
| --linearize int [0] 0 | no | off : Off, 1 | yes | on : On
| --pdflayers int [0] 0 | no | off : Off, 1 | yes | on : On
| --debugpy int [0] Start the Python debuger server on this port.
| --shorcuts path [app_path/shortcuts.xml] Complete path to shortcuts XML (optionally with :name)
-s | --shorcut name [empty] Name of shortcut in shortcuts XML
-h | --help [no] Priints this help
Hints:
Incomplete paths are resolved relative to the current application path.
You may use the following abbreviations:
\$DESKTOP Your desktop folder
\$HOME Your home directory
\$DOCUMENTS Your documents folder
\$CACHE Current path to current XCache sub folder
\$PLUGINS Current path to comet_pd
Shortcuts:
demo_build Build some comics
demo_place Place one comic using action 120399
demo_place2 Place one comic default placing
Examples:
comet_pdf -s hello
comet_pdf -s demo_build -L
comet_pdf -s demo_place -L
comet_pdf -s demo_place2 -L
Legal notes:
Legal notes for used third party software see here:
Path_To_Comet_Offline_Doku/enEN/legal_notes.html
Attention: Do NOT \-escape the $ in Windows.
For setting the program parameters, please also refer to the notes on Shortcuts.
All options are strictly interpreted in the order they are listed. The first options are overwritten by options listed afterwards. The only exception is the -f option. In this case, all parameters are added. The same counts for the shortcut option: Old parameters are overwritten by parameters of a shortcut option. Empty informations in a shortcut will reset to their default. Options that follow a shortcut will change the option as well.
Use the settings from the shortcut named test. As a result, the generated PDF file will be loaded.
comet_pdf -s test -L
As connection name demo will be chosen first. Then the shortcut test overwrites the setting. The last information sets the name demo2. And will then be used.
comet_pdf -l demo -s test -l demo2
Also the option -a is an exception. This option is additive, this means, information will be added. The information <a></a> of a shortcut resets the value. If a shortcut contains more definitions for <a></a> the last one will be used.
A complete list of changes you will find here.
Product lists are transfered to the InDesign® Server in the same format. Product lists can be created directly in InDesign®. To do this, product lists can be created by using the plalette products of document. By pressing the button in the bottom right corner of the palette, the generated list can be exported as an XML file.
After clicking the Save button you will see ast first the product buildings option dialog (since v3.4 R5678). Although nearly all fields are disabled you will see some checkboxes at the top of the dialog there you can set your build options. Activate the required options. For more informations see here.
Also, lists can be created by external programmes.
The list below (items.xml) displays just one single product. The first entry defines which page templates to be used.
<?xml version="1.0" encoding="utf-8"?> <items version="3.4" pluginRevision="5678" ref="document" documentID="" spreadID="" pageID="" groupID="" elementID="" importFlags="0x20000000" documentPath="/Users/paul/Desktop" documentName="aaa.indd" sMissingPlugIns="0" isConverted="0" isModified="0" isReadOnly="0"> <item> <ID>1</ID> <ID2>0</ID2> <ID3>0</ID3> <stringID/> <pageitemID>0</pageitemID> <type>pagetemplate</type> <pageType>1</pageType> <layout_layers/> <document-position>-1</document-position> <groupID>0</groupID> <classID>3</classID> <status>normal</status> <elementID>0</elementID> <preruleID>0</preruleID> <preruleParams/> <postruleID>0</postruleID> <postruleParams/> </item> <item> <ID>1</ID> <ID2>1</ID2> <ID3>0</ID3> <stringID/> <pageitemID>1</pageitemID> <type>product</type> <pageType>-1</pageType> <layout_layers/> <document-position>-1</document-position> <groupID>0</groupID> <classID>3</classID> <status>inserted</status> <elementID>0</elementID> <preruleID>0</preruleID> <preruleParams/> <postruleID>0</postruleID> <postruleParams/> </item> </items>
Options must be given as hexadecimal bit fields.
Option | Value | Remarks |
Prefer existing pages and templates |
0x20000000 |
|
Apply page templates of products | 0x40000000 | This option is only certain for reorganizations and therfor not needed by the renderer at this time. |
Override and load parent page items |
0x80000000 |
To support the Adobe Experiance Managers (AEM), product lists can be loaded directly from the assets of the AEM. To do this, please use the complete URL to the product list and prefix it by a trailing aem@. An asterix (*) at the very end of the URL is replaced automatically by documentId.txt with documentId as to be the document ID of the input W2ML.
Here' s a complet example:
comet_pdf
-l demo
-i ${file}
-o${directory}\${basename}.pdf
-p aem@http://admin:****@localhost:4502/content/dam/products-of-documents/*
--metadata 16
-v C:\Users\paul\Desktop\aaa.log
InDesign® documents are saved as binary files. The format of these files is not public and can (and must) be read and written exclusively by InDesign®. We have developed the W2ML format as an exchange format therefore.
So please note that InDesign® documents can neither be read nor written by comet_pdf. The document exchange between both programs is always done via W2ML.
There is no W2ML support for Illustrator®.
W2ML contains all important information of an InDesign® document and can be read and written by InDesign® and comet_pdf as well. A list of known limitations can be found here.
Here is how to create files in W2ML format:
Method | Description |
Automatic |
While saving templates, the belonging W2ML files can be created automatically. For this, the AfterLogin script (Panelstatement 92) has to be extended by the following line: prefs::add_w2ml_to_templates (1); After reconnecting, every time a template is saved the corresponding W2ML files will be put into the same folder as the INDD template files. |
Manual | Menu File->Export..., then choose format
Comet Interchange Format (w2ml) in the Export dialog. |
Programmatic |
cScript : server::get_elements using the options xmlversion:3.1;content:tagged,properties; |
comet_pdf | Options --autosave and --save path |
Since comet_pdf uses the same data connections (and the same implementation) as the Comet-Plugins (see here), changes to placeholders and other actions can be applied directly. Because of the possibility to update W2ML versions of templates while saving them, templates can be applied directly in InDesign® after changing them.
The W2ML format will "grow" along with the development of comet_pdf. Therefore it is important that W2ML exports are always created with an up to date version of the Comet-Plugins. The following requirements apply:
Comet-Version | |
Minimum |
v3.3.1 R4444 |
Support of all features | Comet-Release >= comet_pdf-Release |
Version and release of the Comet-Pluigns, can be found in the attributes of a created W2ML file
psc:elementlist.version and psc:elementlist.pluginRevision
are noted in the first line.
The version of comet_pdf can be viewed by starting the programme without any options, see here.
W2ML templates will not be automatically updated along with the plugins. All templates used by comet_pdf have to be manually updated.
W2ML cannot (and never will) support all the features of an InDesign® file. Here is a list of known limitations:
Shortend TaggedText (%!TT) is the base format for formatted text in comet_pdf. The current font is defined by two tags always: The cFont tag contains the font family name whilethe cTypeface tag contains the name of the font face.
Typical font setting in TaggedText
<cFont:WILO Plus Global><cTypeface:Italic>
To use such a font/face description in PDF, both parts have to be combined. Unfortunately the used PDFlib expects system-dependent different spellings:
It is therefore necessary to define mappings between the font names for TaggedText and PDF. Comet_pdf looks for these mappings at different places. Later assignments override earlier ones:
The XML files describing the fonts must have the following format:
<?xml version="1.0" encoding="utf-8"?> <fontnames> <!-- pswin, linux, asc and desc are optional --> <fontname id="ID_FONT ID_STYLE" ps="PDF_NAME" pswin="PDF_NAME_WINDOWS" linux="PDF_NAME_LINUX" asc="7.5" desc="2.05" /> </fontnames>
The attribute id contains the font family name and the used font face. Both are delimited by one (!) blank. The font family name corresponds to the cFont tag, the face corresponds to the cTypeface tag. Both are identical to the font shown in InDesign®.
The attributes pswin and linux are used on Windows resp. Linux only. They contain system-specific definitions of the font. If the information is missing, the value of the ps attribute is used.
The attributes asc and desc are also optional. If missing, the values provided by PDlib are used. See here for details.
See here for an example of a font mapping.
[Since v4.1.6 R26667] Fonts are searched in the usual font locations for the operating system: Fonts pulled from the Windows or OS X/macOS operating system (host fonts), as the PDFlib documentation says (PDFlib-Tutorial.pdf, paragraph Searching for Fonts). A little bit more information can be found here. You can also search for fonts in any number of other locations. Use the --fontfolders your_folders.xml option to do that.
The XML file must have the following format:
<?xml version="1.0" encoding="utf-8"?> <paths> <path name="$DESKTOP/folder1" /> <path name="/Users/Du/MoreFonts" /> </paths>
Paths must be complete, but may begin with the usual and defined alias names. Font searches are done in the order of definition in the XML file and are not recursive.
In the notation (without s), you can define additional font folders even without an additional configuration XML. Paths with alias names at the beginning are also allowed here. (Make sure to mask the $ sign with \ under Mac and Linux!) The parameter can be specified as often as you like. The folders are then searched in the order of the parameters. --fontfolder fontfolder
This is how you can find the font names:
As an alternative to the methods described above, you can start the program comet_pdf with option--upr path. If this option is set, all available fonts of the computer are searched and from this a so-called Unix PostScript Resource (UPR) file is written. You can find the necessary name of the font you are looking for in this file.
Fonts are searched for at the following locations:
If the --fontfolders option is set, the upr-search will also search in all folders specified in the given XML file:
Here is an example that also searches for fonts in all folders that are defined in myfonfolders.xml
comet_pdf --fontfolders myfontfolders.xml --upr uuu.txt
With PDFlib v9.0.6 or higher comet_pdf can also produce PDFs in Chinese, Japanese and other languages with so-called multibyte fonts. With PDFlib 9.0.4, the embedding of multi-byte fonts doesn’t work properly some characters are not displayed at all, or wrongly displayed, and Acrobat actually raises an error message.
To check whether a font can be displayed correctly, you should test the PDF on a computer on which the fonts used are not installed. It is important to test the PDFs in different applications. The results vary greatly depending on the application, but at least Acrobat Reader, Chrome, Firefox, Edge and Safari should show correct results.
Normally the ascender height of the used font(s) is used as the base line for text rendering:
Strange to say, but the ascenders and descenders calculated by InDesign® and PDFLib may differ on some fonts. Different values will lead to different output. To avoid this errors, you can define own ascenders and descenders in one of you fontname XMLs.
The values are given in the attributes asc and desc of the font name XMLs and are given in points relative to the font size 10.0. The asc and desc attributes are optional,if missing, the values provided by the PDFlib are used.
Here's an example
<fontname id="WILO Plus Global Regular" ps="WILOPlusGlobal-Regular" asc="7.001953" desc="2.177582" />
To get ascender and descender of a font call system::font_info in InDesign®.
Here's an example
int main () { char psname [512]; float asc, desc; system::font_info ("WILO Plus Global Regular", 0, psname, &asc, &desc); printf ("%s, %f %f\n", psname, asc, desc); return 0; }
Since Comet 4.0.4 R7777 of the priint:comet plug-ins you may use this menue too:
Plug-Ins -> Product pool -> Miscellaneous ->Fontinfo ...
If the TaggedText name of a font is not found at the locations described above, Arial is used. This setting can be overridden by defining the empty ("") TaggedText font name.
Use Geneva as to be the defualt font
<fontname id="" ps="Geneva"/>
Using undef_ in ps (resp. pswin or linux) you can suppress using a default font:
<fontname id="" ps="undef_"/>
After the renderer found a system font name it checks whether the font is installed on the machine. If not, Arial is used automatically too. To override this behavior, insert a missing_font definition into the fontnames XML. Here's an example:
Use Desdemona if a requested system font is not installed. Color all text red, that uses this fall back:
<missing_font ps="Desdemona" pswin="Courier" color="red"/>
pswin is optional too here.
If you want stopp the execution in case of missing fonts, set ps (or pswin) to the value undef_. In this case no output is generated.
<missing_font ps="undef_" pswin="" color=""/>
If the attribute color is not empty ("") all occurances of the text using the fall back font are colored by the given fill color. The following table describes how to define this color:
Keyword | Additional values | Examples |
gray | single float value in the range of [0, 1] for the grayscale color space |
gray 0.0 (black) |
HTML color name or hexadecimal values for an RGB color | #FF0000 (red) yellowgreen (A list of html color names you can find here.) |
|
rgb | three float values in the range of [0, 1] for the RGB color space | rgb 1 0.5 0 (orange) |
cmyk | four float values in the range of [0, 1] for the CMYK color space | { cmyk 0 0.9 0 0 } |
lab | three float values in the range for the Lab color space [0 - 100] [-127 - 128] [-127 - 128] |
{ lab 100 50 30 } |
Wrong color definitions will stopp building the PDF . No output is generated in this case.
[Since R19501, 7.7.2017] Although the differences in the widths of the texts between InDesign® and comet_pdf are very small, text frames that have been fitted to their contents in InDesign® can create an overset in comet_pdf. Using the programm option
--fontscale float
you can force to scale all fonts and line spacing in the PDF accordingly. The font scaling has no influence on the document content itself.
The scaling factor must be a point-delimited floating number. 1.0 means 100%.
Important note: The following descriptions for the treatment of fonts and the fontDB apply to comet_pdf and priint: comet plugins!
When converting HTML to TaggedText, e.g. with the function html::to_tagged or with%!TT_html_ and some HTML tags <b> and <i> it is necessary to find the appropriate font matching the current font. In addition to the current font family, the stretching of the font must also be taken into account. Here are the effects of <b> and <i> when using different font settings:
font-family:Helvetica Neue LT Std; font-stretch:condensed; font-weight:100;
Montage à base de 3 roulements, italicbolditalic corps trempé et rectifié , très haute précision de concentricité, défaut de concentricité maxi. 0,005, vitesse élevée, grande capacité de charge, graissée à vie, longue durée de vie.
font-family:Helvetica Neue LT Std; font-stretch:expanded; font-weight:100;
Montage à base de 3 roulements, italicbolditalic corps trempé et rectifié , très haute précision de concentricité, défaut de concentricité maxi. 0,005, vitesse élevée, grande capacité de charge, graissée à vie, longue durée de vie.
font-family:Helvetica Neue LT Std; font-stretch:normal; font-weight:400;
Montage à base de 3 roulements, italicbolditalic corps trempé et rectifié , très haute précision de concentricité, défaut de concentricité maxi. 0,005, vitesse élevée, grande capacité de charge, graissée à vie, longue durée de vie.
font-family:Courier;
Montage à base de 3 roulements, italicbolditalic corps trempé et rectifié , très haute précision de concentricité, défaut de concentricité maxi. 0,005, vitesse élevée, grande capacité de charge, graissée à vie, longue durée de vie.
Since the current font settings are known only at runtime, the calculation of the font face is made right before inserting into the document. For this, of course, it must be known which font faces a font family has and how it looks like. This information could be read directly from the font file (ttf, otf, ttc, Type1, ...). We did that and sadly found that around 10% of all fonts contain serious bugs.
We therefore decided to integrate a so-called fontDB. This "database" contains a table of available typefaces for each font family defined in it:
Name of font family |
-4 Ultra-condensed |
-3 Extra-condensed |
-2 Condensed |
-1 Semi-condensed |
0 Medium (normal) |
1 Semi-expanded |
2 Expanded |
3 Extra-expanded |
4 Ultra-expanded |
100 Thin |
|||||||||
200 Extra-light (Ultra-light) |
|||||||||
300 Light |
|||||||||
400 Normal (Regular) |
|||||||||
500 Medium |
|||||||||
600 Semi-Bold (Demi-Bold |
|||||||||
700 Bold |
|||||||||
800 Extra-bold (Ultra-bold) |
|||||||||
900 Heavy (Black) |
Each cell of the table contains a "normal" font and an italic font.
If a fontDB table is defined, it is filled by all available font faces at first. After this is done, all empty entries are filled automatically. The fontDB is automatically loaed when it is needed for the first time.
About 350 font families with nearly 1,000 faces are predefined for the plug-ins and for comet_pdf. The current contents of the fontDB can be read using the script functionssystem::fontdb_~ . With the help of text::find_styled_font, the font style of a font family can be calculated directly.
The standard fontDB can be extended and overwritten with the help of the files fontdb.xml. The InDesign® plugins and comet_pdf looking for this file at the following places (and in that order). Later definitions will override earlier:
The file must have the following format:
<?xml version="1.0" encoding="utf-8"?> <fontdb> <!-- One variant corresponds to one font face. All information is case-sensitive! font : font family name, e.g Verdana face : existing font face of font family, e.g. Bold style : n | i weight : 100, 200, ..., 900 stretch : -4, -3, ... , 3, 4 --> <variant font="Verdana" face="Italic" style="i" weight="400" stretch="0" /> </fontdb>
font is the family name of the font.
face is the name of the font face.
For more informations about family and face names see here.
For possible values for weight and stretch see here.
Please take care to define the regular entry style="n" weight="400" stretch="0" at least!
It sounds more complicated than it is. Here's an example of the Windows font family Corporate S.
At first we have to define the PDF font names. To do this, write a little text in InDesign® and give it the font Corporate S. You now can see ten font faces for the font family . We need an entry for all of them in fontnames_default.xml or a fontnames.xml:
<fontname id="Corporate S Regular" ps="Corporate S"/> <fontname id="Corporate S Regular Italic" ps="Corporate S,Italic"/> <fontname id="Corporate S Light" ps="Corporate S Light"/> <fontname id="Corporate S Light Italic" ps="Corporate S Light,Italic"/> <fontname id="Corporate S Medium" ps="Corporate S Medium"/> <fontname id="Corporate S Demi" ps="Corporate S Demi"/> <fontname id="Corporate S Bold" ps="Corporate S,Bold"/> <fontname id="Corporate S Bold Italic" ps="Corporate S,Bold,Italic"/> <fontname id="Corporate S ExtraBold" ps="Corporate S ExtraBold"/> <fontname id="Corporate S ExtraBold Italic" ps="Corporate S ExtraBold,Italic"/>
If you want to be compatible with other systems, wirte these definitions into the attribute pswin and fill in the ps attributes with the Postscript names of the font faces. You can get the Postscript names by double clicking the font and looking for their font informations.
To edit more than one or two fonts, it may be a good idea, to create an UPR file at first and taking all these font face from this file.
The names of the font styles are pretty clear. The extension of the fontdb.xml should be easy therefor too:
<variant font="Corporate S" face="Regular" style="n" weight="400" stretch="0"/> <variant font="Corporate S" face="Regular Italic" style="i" weight="400" stretch="0"/> <variant font="Corporate S" face="Light" style="n" weight="300" stretch="0"/> <variant font="Corporate S" face="Light Italic" style="i" weight="300" stretch="0"/> <variant font="Corporate S" face="Medium" style="n" weight="500" stretch="0"/> <variant font="Corporate S" face="Demi" style="n" weight="600" stretch="0"/> <variant font="Corporate S" face="Bold" style="n" weight="700" stretch="0"/> <variant font="Corporate S" face="Bold Italic" style="i" weight="700" stretch="0"/> <variant font="Corporate S" face="ExtraBold" style="n" weight="800" stretch="0"/> <variant font="Corporate S" face="ExtraBold Italic" style="i" weight="800" stretch="0"/>
[seit v4.1.7 R26929] Checking whether font names or entries in FontDB are missing is even easier with the --checkfonts N option. The missing definitions are written to the console as program output and can be inserted directly into the corresponding XML configuration files. But please note : Fonts are defined rather carelessly - you should check the given definitions especially with regard to the font style (normal, italic), weight and stretch. The specifications for N correspond to the cScript call system::fontdb_check.
[since v4.2 R28457] Usually, the following sources and order is used to search for postscript names of fonts:
With --font-policy, certain sources can be enabled or disabled. The parameter must be provided as an integer value, values for certain sources can just be added up. Default is the former behaviour (63, support all sources).
[since v4.1.5 R24842] comet_pdf supports the so called Awesome fonts. The condition is that the postscript name of the Awesome font used starts with FontAwesome. comet_pdf werden all glyphs defined on https://fontawesome.com/cheatsheet?from=io.
This does not mean that each of these glyphs can also be represented. It simply means that we make it possible for these characters to be displayed! So that a character becomes visible, it must be defined naturally also in the font!
The list of defined glyphs can be extended by customers. To do this, create an XML file with the names of the glyphs and their Unicodes. The very simple syntax of this file is shown in the following example:
<awesomes>
<awesome key="fa-glass-martini" value="0xf000" />
</awesomes>
Note that the Unicode characters must either begin with 0x (and then have a hex value) or be decimal numbers. You can use the --awesome program option to include the file created in this way:
--awesome path
Relative path specifications are resolved as usual relative to the path of the running comet_pdf.
I don't know about you, but I find the Awesome fonts take getting used to. The problem is not so much the unorthodox treatment of input, font and characters. That's actually quite helpful. What's bad is that there are so many different Awesome fonts, each containing a non-transparent but never complete set of glyphs. So we've included an option in the renderer that lets you test which of the glyphs you define are actually defined in an Awesome font.
Use option --awesometest to get list of glypghs of a given font:
--awesometest ps-fontname
The call does not require an input file, but you must specify the name of the Awesome font as the Postscript name. If you do not specify an output file, the output PDF will be placed on your desktop. Here is an example call:
./comet_pdf -L --awesometest FontAwesome5ProSolid
The system displays a list of glyphs and their Unicodes (in hex) and the glyp names. Glyphs defined locally with --awesome are displayed in red:
Comet_pdf has a built-in language-dependent hyphenation based on TeX hyphenation rules. For implementation we use the libhyphenate library by Steve Wolter.
Hyphenation rules are selected depending on the language setting of the text. Language dialects (e.g. German and Swiss German) can be supported by an additional identifier. for the country In the TaggedText tag <cLanguage:> the country identifier is appended to the language name by "\: " (the space is important!). When searching for the appropriate hyphenation rule file, the idetnifier Language\: Country is searched first always. If the searched dialect is not found, the language without country identifier is searched automatically.
You can determine the language names and country identifiers used by InDesign® by performing a TaggedText export of a text of the language you are looking for. In the result text, search for the tag <cLanguage:.
For each supported language a Hyphenation Rulse File must be defined and exist. The location for all hyphanation rules files is the folder hyphenations in the same folder as comet_pdf. With the option -H (--hyphens) this folder may also be moved to another location.
The following languages are supported in the standard:
Language | Rules File |
German: Traditional | de-DE-1901 |
German: Swiss | |
German | de |
Reformed | |
Deutsch | |
de_DE_2006 | |
de_CH_2006 | |
English | en |
French | fr |
Spanish | es |
Fallback | en |
Unsupported languages use the English hyphenation rules. Other hyphenation settings available in InDesign® are not supported by comet_pdf.
You can add rules for additional languages. This requires the following two steps:
To create a Hyphenation Rule File, please follow the instructions of this link. You can easily find the TeX language files mentioned in the description by searching the Internet for "NNhyph tex" with NN as language abbreviation (ru, it, pl, ...). Here you can also find files with language dependent hyphenation patterns.
The file created in this way is placed in the same folder as the default hyphenation rules - that is, in the hyphenations folder or in the folder defined with --hyphens.
The link between language and Hyphenation Rules File is made in the hyphenations/languages.xml file. The file must contain an entry with the InDesign® name of the language and the name of the Hyphenation Rules File in the hyphenations folder for each additional supported language :
<?xml version="1.0" encoding="utf-8"?> <languages> <language primary="name" sub="country" hyphens="file_name" /> </languages>
If the definition is to apply to all dialects of a language, leave the country identifier sub empty. If the country identifier is not empty, the definition is used exclusively for this dialect. Here is an example:
Define pt as a hyphenation rules file for all Portuguese dialects .
<language primary="Portuguese" sub="" hyphens="pt" />
Define pt as a hyphenation rules file for Brazilian Portuguese only . Other Portuguese dialects will stiil use use the fallback.
<language primary="Portuguese" sub="Brazilian" hyphens="pt" />
If a non-existent file is specified in hyphens, hyphenation is disabled for that language. However, a warning message is written when trying to use the specified hyphenation rule file. To disable hyphenation without warning messages, use the _off_ keyword.
Disable hyphenation for Portuguese texts:
<language primary="" sub="" hyphens="_off_" />
With an empty definition for primary and sub you define a new fallback for texts of undefined language names.
Use the definitions in pt as hyphenation rules for all languages for which no own hyphenation rules are defined.
<language primary="" sub="" hyphens="pt" />
To turn off hyphenation for all texts with no own hyphenation rules, use the following definition:
Turn off the fallback
<language primary="" sub="" hyphens="_off_" />
Defining the elements
in the Root element of the documents XML struktur you can overlay the hyphenation rules of th entire document. This is especially helpful if a document is to be created in different language variants without having to make new style definitions with the corresponding languages in each case.
If hyphenationLanguage is not empty, the hyphenation language specified in the element is used for all texts with hyphenation enabled. In the element hyphenationCountry an optional country specification can be made.
Unlike the language names in texts, which are predefined by InDesign®, you are completely free in your choice of names here, so you can use your preferred ISO or other abbreviations such as deDE, itIT, enEN or deu, iti, eng, etc. I don't care.
With the following two (small) steps all texts of a document with activated hyphenation can be hyphenated according to the rules of the current German hyphenation:
With the prefix file:// the desired hyphenation rules file can also be specified directly in the hyphenationLanguage element. The specification in the hyphenationCountry element is ignored in this case. According to the above descriptions the following values are possible:
Note: In InDesign®, hyphenation is an integral part of the program. To achieve the same behavior here as in comet_pdf, all paragraphs and styles of the document must therefore be set to the desired language. Here is a corresponding script for InDesign®:
Change the language settings of all paragraphs and styles of a document. ATTENTION : If the changed language settings are not to be saved, the document must be closed without saving.
var language = ""; // $ID/languageKey var doc = app.documents[0]; //Choose your document here var paraStyles = doc.allParagraphStyles; for (var i = 1; i < paraStyles.length; i++) { paraStyles[i].appliedLanguage = language; } var charStyles = doc.allCharacterStyles; for (var i = 1; i < charStyles.length; i++) { charStyles[i].appliedLanguage = language; }
[since v4.1.8 R30386] Custom dictionaries can be defined as follows:
Please note that syllables that are wider than the text frame can be automatically separated at any position despite the separation rules. This behavior is necessary to avoid unexpected text oversets without any alternative!
Here is an example of a sense-distorting hyphenation of the German word Wachstube (Guardroom). The wrong hyphenation may turn it into a tube of wax:
wachs-tube
Note: Single-digit numbers between the letters are allowed and are directly interpreted as TeX rule weights. So if you are familiar with the syntax of the TeX hyphenation rules, e.g. from the Appendix H of TeX, you can also manage the word hyphenation yourself by using your own numbers between the single letters. So with the definition w1a1c1h1s1t1u1be you define the low-threshold permission to separate the word Wachstube at any position.
For installation please follow the instructions of the file 1 ReadMe.html of the respective installation folder.
Installation may contain different variants of the renderer. Variants are located in the sub foldr 3 bin of your installation folder. You may replace comet_pdf resp. comet_pdf.exe by any variant you want. But please take care the two points:
The programm comet_pdf can now be started from the Terminal resp. Command Prompt:
> cd /installation path of comet_pdf
> comet_pdf -s hello
Assuming that there's no licence available at this point, the programm shows a message about missing licences, see here. Without a licence, the programme can be used without limitation, however, the generated pages are watermarked by a "DEMO" text.
The programme requires two licences: The Werk II-licence for the programme itself and a licence for the used PDF library.
comet_pdf will work with all features without a license but all pages are watermerked by the DEMO.
For PDFLib, no valid licence is required too. According to PDFLib.com, 10 pages (or about 10 MB ) can be generated. The pages will receive a watermark.
Wrong PDFLib licenses will stopp the programm immediately.
The watermark of comet_pdf will always be placed above every element on the page. The PDFLib watermark is laid over the whole page itself:
The license has to be placed in the same folder as comet_pdf and must have the name w2.lic. Without a licence from Werk II, the programm is fully usable but a DEMO watermark is shown on every page. Comet_pdf shows the following message at start time:
No valid license found. Application will run in DEMO mode!
To get a valid priint:pdf license, please send the green
text to license@priint.com. For a valid PDFLib license
please contact sales@pdflib.com.
//
// LICENSE ORDER DATA
// add your comments here
//
OrderBy : "your name"
EMail : "your email"
LicenseCode : "xxxx ... xxxx"
TerminalServer : "0"
Comet : "4.0.5"
Expired : ""
Module : priint:pdf
Send the green text to license@priint.com. Attention : Please fill in the text with a valid name and a valid email address - we will return the licence file to this address.
The standard program dmidecode is used for license testing under Linux. Comet_pdf is not unlocked and remains in DEMO mode if dmidecode cannot be executed successfully. Unfortunately dmidecode needs admin rights. To avoid that comet_pdf must always be executed with admin rights, the program needs either the admin password or the permission to execute dmidecode as admin. Both are controlled by the file zpasswd in the same folder as comet_pdf:
If the file zpasswd does not exist, comet_pdf asks for the admin password. After entering the password, it is encrypted and written to the file zpasswd. Further calls of comet_pdf can decrypt the password from zpasswd and use it again.
If the admin password of your computer is changed, the file zpasswd must be removed and comet_pdf must be executed once to secure the new password.
If you don't want to save the admin password in zpasswd, enter the following text instead of the password (in exactly this spelling)
$SUDOERS
Comet_pdf then expects that you have granted the current user the right to execute dmidecode. Such permissions are usually granted in the /etc/sudoers file.
ATTENTION ATTENTION ATTENTION: Please have changes to the file sudoers made exclusively by professionals or inform yourself sufficiently in advance! If the file contains syntactic errors, the sudo command of your computer will no longer work. But you need this command to correct the file again! So you can do a lot of work by just writing the file /etc/sudoers.
PDFLib license file must have the name licensekeys.txt and must be placed in the same folder as comet_pdf too. A valid licence for your PDF library can be requested at PDFlib. When ordering licences, please specify the type of licence as well:
License | Usage | Description |
PDFlib |
Basic license |
|
PDFlib+PDI |
Basic license and import of PDFs
|
To convert Postscript into PDF and PDF into pixel images you may need additional third party software. See here for more infos. |
PDFlib+PPS |
Individualisation of existing PDFs |
Not supported by comet_pdf for now. |
You can omit the licensekeys.txt file and include the PDFlib license into the w2lic. Add a line with the keyword PDFLibKey followed by the PDFlib license enclosed in quotation marks to the w2lic. Here is an example:
PDFLibKey "m900202-123456-123456-******-******"
Please make sure that the PDFlib license matches the PDFlib version you are using. Using option -h you can find out the PDFlib version of your comet_pdf.
Version:
comet_pdf v1.0 R24333, based on Comet 4.1 and PDFlib 9.0.6
Currently the following PDFlib versions are supported:
Operating system | priint:suite 4.1 | priint:suite 4.1.6 |
Mac | 9.0.4 9.0.6 9.1.2 (since v4.1 R24702) 9.2.0 (since v4.1 R24702) |
9.0.4 9.0.6 9.1.2 (since v4.1 R24702) 9.2.0 (since v4.1 R24702) |
Windows | 9.0.4 9.0.6 9.1.2 (since v4.1 R24702) 9.2.0 (since v4.1 R24702) |
9.0.4 9.0.6 9.1.2 (since v4.1 R24702) 9.2.0 (since v4.1 R24702) |
Linux (Ubuntu) | 9.1.0 9.1.2 (since v4.1 R24702) 9.2.0 (since v4.1 R24702) |
9.1.0 9.1.2 (since v4.1 R24702) 9.2.0 (since v4.1 R24702) |
Using the options --w2lic_path qnd --pdflic_path you can customize the license files folders. This is usefull for installations with regularly software updates especially. The option expects a complete path to an existing folder. $-abbreviations like $DESKTOP are supported. The option can not change the names of the license files!
The WERK II - license file w2.lic resides in the local preferences folder:
--w2lic_path \$PREFS/werkii
Use options --w2lic or --pdflic to check the licenses. The result is shown as programm output as well as given as its return value:
License | Return value | Description |
--w2lic |
0 : DEMO |
DEMO and PreviewThe programm is fully usable without a license (or a wrong license) but the watermark DEMO resp. Preview is shown on every page. |
--pdflic |
0 : Failed |
FailedWrong licenses will abort the programm immediately. WatermarkedOn issing licenses a watermark is drawn on every page. The PDFs are limited up to 10 pages (or 10 MB). For Postscript images and metadata previews you will need a PDFlib+PDI license. Without this license, Postscript images and previews will cause to an immediately abort. |
The following licenses may be required for tasks of the program that are not part of comet_pdf's standard scope of services.
Postscript is not supported by PDFlib as expected (see image formats) and the integration of images from Postscript is not part of the standard scope of services of comet_pdf. However, the program provides the possibility to automatically convert Posrtscript to PDF. More information can be found here.
Mac OS includes the software required to convert Postscript to PDF by default.
On Windows, we use ps2pdf.exe from VeryDoc. The license of ps2pdf.exe is not included in the scope of comet_pdf. Without a license, the program generates a watermark over the PDFs. You can find an installation manual for the license here.
Alternatively, you can use other software to convert (E) PS to PDF. A description can be found here.
If PDFs are used as the basis for the metadata of a PublishingServer, PDFs must be converted to raster images (JPG or PNG) from PDF. The creation of these raster images is not core task of comet_pdf, but it is still supported.
On Mac OS, the required software is already installed by default.
Under Windows, pdf2image is used. Here you can find informations about the license of pdf2image, but unfortunately the program is so slow that the installation of another software is urgently needed. The license for a PDF image converter is not included in the scope of comet_pdf.
Alternatively, you can also use other software to convert PDF to images. Information on using your own conversion software can be found here.
Text variables can display image information and informations from the XMP headers of images. To determine this information, exiftool is used. The author does not require a license fee, but a donation is welcome.
Information and copyright notes of third-party software can be found here.
Currently, 1.400 of 1,800 cScript-commands are implemented in the current version of comet_pdf. During the export, missing script functions receive the hint
Missing cScript function 'document::concat' called, returning -1199.
In this case, please contact our developers. (An isolated test issue will speed up the processing of such.)
In the online-documentation, which is delivered with every release of the InDesign® plugins, all functions are hinted whether they are available for comet_pdf:
Available:
Comet-Plug-Ins, comet_pdf
Also, not all standard functionality of the comet plugins is implemented. In some cases this generates messages like the following:
IFrameLinkServiceUtils::build not implemented now in comet_pdf
It is not necessary to inform us about these kinds of messages. These functions will be implemented step by step.
Also missing in the current version of comet_pdf are quite a few features that are available in our Comet-Plugins. The following (incomplete) list shows what features are still missing:
If possible and reasonable, these functions will be implemented step by step.
Following picture file formats are supported:
Missing picture in a document will be displayed as a grey frame with a diagonal cross.
As seen in the list above: postscript files can not be processed by default. If placeholders ,actions or scripts using postscript files, the programme tries to use PDF or rasterized versions of the pictures. This means it's not required to alter scripts and methods specifically forcomet_pdf.
If not specified, the following versions will be tested in the displayed order. The first available version will be used:
Used variants will be written into the log file:
Postscript substituted by 'pdf' : '/Users/paul/Desktop/ttt.eps'
Variants must be located exactly in the same folder like the original and must have the same base name. Searching for variants is strictly done by the given order.
If different orders or formats are wished, it is possible to do this by setting up an XML file and fill in the -E (--eps_ecs) option:
comet_pdf -E eps_escapes.xml
Uncomplete paths are resolved relative to the location of comet_pdf. Folder shortcuts and folder aliiases are allowed.
The file should be organized as follows:
<?xml version="1.0" encoding="utf-8"?> <eps_escapes> <eps_escape ext="png" seq="10"/> <eps_escape ext="pdf" seq="20"/> <eps_escapes>
Define the requested file extention in ext and the order in seq.
Use only file formats supported by PDFLib as variants.
Using different file extension (except ps2pdf) does not mean that they will be automatically created!
To suppress using an image set seq="-1". To generally suppress image variants add the following line to you EPS escapes file:
<eps_escape ext="ps" seq="-1"/>
To convert postscript files, a wide variety of programmes are available. Here are some examples:
Comet_pdf supports an automatic conversion of postscript files into PDF.
Automatic PDF genneration creates fils in the XCACHE.
The following software is used to convert postscript into PDF:
Environment | Software | Description | ||||||||||||
Mac | pstopdf | part of the Mac OS | ||||||||||||
Linux | ps2pdfwr |
The programm is part of the Ghostscript installation. Use sudo apt-get install ghostscript to install the package. The use of ps2pdfwr may incur license fees. If ps2pdfwr is not installed, a warning message is written to the terminal output the first time a Postscript to PDF conversion is attempted. |
||||||||||||
Windows | imgconv\ps2pdf\bin\ps2pdf.exe |
The programm is located in your comet_pdf installation folder. You may use it, but a watermark is placed on every created PDF page. To get a license, please contact VeryDoc. Please follow this steps to install a license:
|
||||||||||||
cScript | imgconv/ps2pdf.cpp |
You may wish to use different software for converting. Then you need to implement this script. The following variables are defined here:
See imgconv/pdf2image.cpp of installation folder for how to call external tools. |
In addition to thr Postscript to PDF conversion, the following vector formats can be converted locally independently:
For this purpose, the local script pdf2image.cpp is executed for each of these images. However, unlike the calls to this script that are necessary when generating the metadata, the global variables gFormat and gResolution are empty in these calls:
So in these cases you can do any conversion to any of the raster formats supported by PDFlib in any resolution. Since PDFlib can also import PDFs, you can of course convert to PDF, or convert large PDFs to smaller PDFs and so on.
More information about the script can be found here.
Embedded images in InDesign® documents are also embedded in W2ML and can be used by comet_pdf without the image being available as a file. A distinction is made between two types of embedding:
Please note that the file size of W2MLs can grow rapidly with the number and size of embedded images. Use embedded images with restraint!
Please note that with "normal" linked images no previews of the images are written into the W2ML!
PDFLib supports clipping paths and alpha channels. However, you must address the paths via their names. The InDesign® option of addressing clipping paths and alpha channels by their index is not supported.
Exception: Alpha index 0 refers to the first alpha channel of a picture. In this case, names can be ignored.
Most image formats are optimised in such a way that further compression using the --compression program option hardly changes the image size (and therefore the size of the finished PDF). In order to achieve a noticeable reduction in the size of the PDFs, the images must therefore be recalculated according to their resolution and current scaling.
The current image resolution of an image results from the resolution of the image file and the current scaling in the document. A 72 dpi image with a threshold value of 200 dpi for recalculations will therefore be recalculated if it has a scaling fachtor ≤ 36% (72 / 200 = 0.36) in the document.
The threshold value and desired resolution are defined in the PDF Presets:
In contrast to InDesign®, no differences are made between colour, greyscale and monochrome images during recalculation. comet_pdf uses the specifications of the colour images for all images. Further information on PDF specifications and their application can be found here.
The screenshot on the left shows an 180 dpi image scaled to 10%. On the right is the same image after a recalculation to 100 dpi. You can hardly see any difference - but the file size has been reduced from 3.6 MB to 38 kB to almost 1/100.
In addition to the PDF preset containing the imformation for the recalculation the programm option --pdfflags must contain the value 1.
Here is an example:
./comet_pdf ... -z bbb.joboptions --pdfflags 1
The recalculation of the images is done with the help of the Python module Pillow.
Please check the Pillow licence terms before using the module.
Text attributes can be set in texts (local overrides), character styles and/or in paragraph styles. InDesign® supports about 300 different attributes for text. Additionally, it supports 250 attributes for tables.
The following table contains the text and table attributes supported by comet_pdf.
Feature | Tagged Text |
⇨ Werk II | |
Text placeholder |
w2 |
Table module | Since v1.0 R7121 w2Table, w2cell |
⇨ Virtual tags to support the renderer | |
Tabulators | tab |
Bookmarks | nonskipablespace |
Softreturn | snl |
⇨ v1.0 R4255 | |
Paragraph styles | ParaStyle |
Character styles | CharStyle |
Text alignment |
pTextAlignment Beware: The InDesign® settings "Align Towards Spine" and "Align Away From Spine" receive their positional information from when the first frame of a text chain was created. |
Tabulators | pTabRuler |
Language (for hyphenation rules) | cLanguage |
Typefaces and type styles | cFont, cTypeface |
Fontsize | cSize |
Font color and intensity | cColor, cColorTint |
Position (superscript, subscript, ...) | cPosition, cBaselineShift |
Underlines | cUnderline, cUnderlineOffset, cUnderlineWeightOffset, cUnderlineColor, cUnderlineTint
Only solid single lines are supported, see here to learn more. |
Strikethru | cStrikeThru, cStrikeThroughColor, cStrikethruTint
Offset and weight anr not supported. Only solid single lines are supported, see here to learn more. |
Tracking | cTracking, cKerning |
⇨ v1.0 R4617 | |
left indent, right indent | pLeftIndent, pRightIndent |
First line indent | pFirstLineIndent |
⇨ v1.0 R5235 | |
Space before paragraph | pSpaceBefore |
Space after paragraph | pSpaceAfter |
⇨ v1.0 R5301 | |
Rule above/after paragraph |
pRuleAboveColor, pRuleBelowColor |
pRuleAboveStroke, pRuleBelowStroke |
|
pRuleAboveTint, pRuleBelowTint |
|
pRuleAboveOffset, pRuleBelowOffset |
|
pRuleAboveLeftIndent, pRuleBelowLeftIndent |
|
pRuleAboveRightIndent, pRuleBelowRightIndent |
|
pRuleAboveMode, pRuleBelowMode The option "Text" is not supported. |
|
pRuleAboveOn, pRuleBelowOn | |
pRuleAboveStrokeType, pRuleBelowStrokeType Line types "Dashed", "Waved" and "Diamond" are not supported. ATTENTION: Paragraph rules are drawn after the text always and may cover some text therefore. |
|
pRuleAboveGapColor, pRuleBelowGapColor |
|
pRuleAboveGapTint, pRuleBelowGapTint |
|
Table attributes |
TableStyle |
TableStart | |
tCellDefaultCellType | |
ColStart | |
tColAttrWidth | |
RowStart | |
tRowAttrHeight | |
StylePriority |
|
RowEnd | |
TableEnd | |
Cell attributes | CellStyle |
CellStart | |
CellEnd | |
tCellAttrLeftStrokeWeight, ~Top~, ~Right~, ~Bottom~ | |
tcLeftStrokeType, ~Top~, ~Right~, ~Bottom~ | |
tCellTopStrokeColor, ~Top~, ~Right~, ~Bottom~ | |
tCellAttrLeftStrokeTint, ~Top~, ~Right~, ~Bottom~ | |
tCellLeftStrokeGapColor, ~Top~, ~Right~, ~Bottom~ | |
tCellLeftStrokeGapTint, ~Top~, ~Right~, ~Bottom~ | |
tCellAttrLeftInset, ~Top~, ~Right~, ~Bottom~ | |
tCellAttrFillTint | |
tCellFillColor | |
tTextCellVerticalJustification | |
tCellAttrRotation | |
tRowKeeps | |
⇨ v1.0 R5322 | |
Alternate fills in table rows |
tTableRowFillPatternStartValue |
Alternate fills in table columns | tTableColFillPatternStartValue tTablerColFillPatternEndValue // Beware, typing error by Adobe. tTableColFillPatternFirstCount tColFillPatFirstColor tTableColFillPatternFirstTint tTableColFillPatternFirstOverprint tTableColFillPatternSecondCount tColFillPatSecondColor tTableColFillPatternSecondTint tTableColFillPatternSecondOverprint |
Alternate strokes in table rows |
tTableRowStrokePatternStartVal |
Alternate strokes in table columns | tTableColStrokePatternStartVal tTableColStrokePatternEndVal tTableColStrokePatternFirstCount tColStrokePatternFirstWeight tColStrokePatternFirstType tColStrokePatFirstColor tTableColStrokePatternFirstTint tTableColStrokePatternFirstOverprint tColStrokePatternFirstGapColor tColStrokePatternFirstGapTint tColStrokePatternFirstGapOverprint tTableColStrokePatternSecondCount tColStrokePatternSecondWeight tColStrokePatternSecondType tColStrokePatSecondColor tTableColStrokePatternSecondTint tTableColStrokePatternSecondOverprint tColStrokePatternSecondGapColor tColStrokePatternSecondGapTint |
⇨ v1.0 R7569 | |
Draw order of table strokes |
tStrokeOrder Best and InDesign® 2.0 Kompatibility are not supported. |
Table outer strokes | tOuterLeftStrokeWeight tOuterLeftStrokeType tCellOuterLeftStrokeColor tOuterLeftStrokeTint tOuterLeftGapColor tOuterLeftGapTint tOuterTopStrokeWeight tOuterTopStrokeType tCellOuterTopStrokeColor tOuterTopStrokeTint tOuterTopGapColor tOuterTopGapTint tOuterRightStrokeWeight tOuterRightStrokeType tCellOuterRightStrokeColor tOuterRightStrokeTint tOuterRightGapColor tOuterRightGapTint tOuterBottomStrokeWeight tOuterBottomStrokeType tCellOuterBottomStrokeColor tOuterBottomStrokeTint tOuterBottomGapColor tOuterBottomGapTint |
⇨ v1.0 R8333 | |
Text lists | bnListType bnBulletCharacter bnNumberingStyle bnNumberStartAt bulTextAfter bulFont bulTypeFace bulCharStyle numCFPrevious numCharStyle numNumber numListLevel numListName bulAlignment numAlignment |
⇨ v1.0 R9900 | |
Glyph scaling | cHorizontalScale cVerticalScale |
⇨ v1.0 R10000 | |
Overprints in Tabellen |
Not yet implemented but allowed tCellFillOverprint |
Overprint in Text | cOverprint cStrikeThroughOverprint cUnderlineOverprint pRuleAboveOverprint pRuleBelowOverprint GapOverprints are not specifically used. For the holes in lines (if supported), the same overprints are used for the lines themselves. |
⇨ v1.0 R24702 | |
Hyphenations |
pHyphenation Unfortunately, there is no direct equivalent of the word spacing between InDesign® and PDF:
We can therefore only approximate the size of the word spacing, but not specify it exactly. Other hyphenation settings supported by InDesign®, such as shortest word, shortest prefix and suffix, and maximum hyphens allowed, are not supported by comet_pdf. |
⇨ v1.0 R25256, 26. Mai. 2019 | |
Overset in text cells |
tCellClip This property is called Table -> Cell Options -> Text -> Clipping -> Clip content to cell in InDesign® and has (at least for me) no visible meaning. We use it in comet_pdf in the following way: If it is set and a text cell has an overset and the overset can not resolved by a heigher row, the the is scaled down until it fits the cell. Lower lever is 10% of the original size in this case. |
⇨ v4.1.8 R27453, 6 Sept. 2020 | |
Upper case letters |
cCase Attention : Small Caps and OpenType Small Caps are not supported. In both cases the normal capitalization is used instead. Note: Although there has been a Unicode character for the capital letter ß for some time, ß is translated to SS as in InDesign. |
No Break |
cNoBreak Attention :
This property cannot be set by Character Styles.
To set it, selected the desired text and activate the fly-out menu No Break
of panel Characters (CMD + T). %!TT_html...<?IDTT <cNoBreak:1> ?>Keep together<?IDTT <cNoBreak:> ?>...
|
GREP-Style |
pRunInGrepStyles [Since v4.2 R33170] Remarks:
The following (Third Party) pages are somewhat outdated, but may still be helpful: Based on Erica-Gamets-GREP-Cheat-Sheet the following Adobe-GREP definitions are implemtented:
Please note that the following Adobe-GREP definitions are not supported:
Extensions to the GREP functionalities can be implemented on request. However, please understand that extensions to the GREP functionalities are not covered by the WERK II support. |
Underlines and strikethrus are always displayed as continuous line. Other line types of InDesign® can not be supported. To offer more strikethru options, underlines with an offset < 2.0 are used!
Simultaneously underlines and strikethrougs (a highlight of every layout!) are possible but done in the same color (of the strikethru).
Special effort was put into lines for table cells. It is obvious that Adobe put a lot of work into InDesign®, because of that, it is difficult to reach the same detail of appearance with comet_pdf. InDesign® is able to detect whether a line goes "around a corner" and renders it accordingly. This is currently not supported by comet_pdf.
For table one can choose the the stroke drawing order. The renderer supports the following options
The options Best joins and InDesign® 2.0 Compatibility are not supported.
In addition, by changing strokes manually you may change the drawing order for crossings locally. But this behavior is not written into tagged text. (That means, if you export a table with local drawing order changes into tagged text and re-import this tagged text, all local changes will lost.) And because the renderer based on tagged text, the renderer can not support local changes on the drawing orders.
[since v4.1 R24142] comet_pfd can automatically replace quotes into typographic quotes of the current language. All languages supported by InDesign® are supported. Please note the following restrictions:
The option is turned off by defualt! Use programm option
--typgraphics on
to activate the replacement of qoutas. The following value are supported
on, true, yes, 1
off, false, no, 0
Use function prefs::set_convert_quotas to locally override the global setting.
Further text and table attributes will follow step by step. Please contact our developer team for possible feature requests.
Adobe InDesign® uses a different Ascii character table, away from the usual standard. Below is a list of those characters:
Ascii | Description | InDesign® | Renderer |
3 | End of text | End of cascading format | Not supported |
4 | End of transmisson | Footnote | Not support |
7 | Bell | Indent |
Supported since R8160 In releases prio R8160 please use InDesign® paragraph settings for left indent ( pLeftIndent) and "first line indent" (pFirstLineIndent) |
8 | Backspace | Tabulator for right alignment |
Tabulator USe the tabulator rules of the Tabulator tools (ALT+CMD+T) |
22 (0x16) | Synchronous idle | Table anchor | Reserved |
23 (0x17) | End of transmission block | Continuation of tables | Reserved |
24 (0x18) | Cancel | Page number | Not supported |
25 (0x19) | End of medium | Name of paragraph | Not supported |
26 (0x1A) | Substitute | "non roman special glyph" | Not used |
Adobe uses sections of unicode that are reserved for end users (0xE000 - 0xEFFF). Those functions are not yet implemented in PDFRenderer.
Unicode | Name | Description |
0xE000 | Inline | Inlines are not supported by TaggedText. Because of that, the character 0xE000 does not appear in TaggedText.
In PDFRenderer inlines are implemented in a different way. |
0xE001 | Special Glyph | ? - glyph specified by attributes |
0xE002 | Page number | In TaggedText, this character is not used. Instead, Ascii 24 (0x18) is used. |
0xE003 | Section name | In TaggedText, this character is not used. Instead, Ascii 25 (0x19) is used. |
0xE004 | NonRomanSpecialGlyp | ? - non-Roman glyph specified by attributes |
0xE005 | Not used | |
0xE006 | AnyCharacter | These characters are used as wildcards during find and replace. They are not available in TaggedText. |
0xE007 | AnyLetter | |
0xE008 | AnyDigit | |
0xE009 | WhiteSpace | |
0xE00A | AnyKanji | |
0xE00B | ColumnBreak | Not used in TaggedText. Instead, the following Tags are used:
<cNextXChars:Column> |
0xE00C | PageBreak | |
0xE00D | FrameBoxBreak | |
0xE00E | OddPageBreak | |
0xE00F | EvenPageBreak | |
0xE010 | AnySingeQuote | Undocumented. It is assumed that the character 0xE005-A for find and replace is used and has no relevancy for TaggedText. |
0xE011 | AnyDoubleQuote | |
0xE012 | Page count variable |
This character is not available in TaggedText. The following definition is used instead: <cPageNumType:TextVariable> The variable YOUR_VAR has to be defined in the document. |
0xE013 | Chapter number variable | |
0xE014 | Creation date variable | |
0xE015 | Modification date variable | |
0xE016 | File name variable | |
0xE017 | Output date variable | |
0xE018 | Running header PS variable | |
0xE019 | Custom text variable | |
0xE01A | not used | It is assumed that this is either an error or the characters are simply not used. |
0xE01B | ||
0xE01C | ||
0xE01D | ||
0xE01E | ||
0xE01F | ||
0xE020 | Any variable | Undocumented. It is assumed that the character 0xE005-A for find and replace is used and has no relevancy for TaggedText. |
0xE021 | Any page number | |
0xE022 | Next page number |
Characters not used in TaggedText. Instead, the following tags will be inserted: <cPageNumType:Next><cPageNumType> |
0xE023 | Previous page number | |
0xE024 | Any break | Undocumented. It is assumed that the character 0xE005-A for find and replace is used and has no relevancy for TaggedText. |
0xE025 | Current page number | |
0xE026 | Clip board contents (formatted) |
No relevancy for TaggedText |
0xE027 | Clip board contents (unformatted) | |
0xE028 | Double left quote | Language specific quotation. Already replaced in TaggedText by the correct characters. |
0xE029 | Double right quote | |
0xE02A | Single keft quote | |
0xE02B | Single right quote | |
0xE02C | Index marker | |
0xE02D | Running header CS variable | see 0xE012 (Text variables) |
0xE02E | Double straight quote | see 0xE028 (Language specific quotation) |
0xE02F | Singe straight quote | |
0xE030 | Meta data caption variable | see 0xE012 (Text variables) |
0xE00B | Style group path seperator | Replaced by ':' (or '\:') in TaggedText and therefore not used | 0xEF01 | Table pointer |
0xEF02 | 0xEF10 | \\ |
Temporarely used by the renderers tagged text machine. Do not use in any text! |
0xEF11 | \< | |
0xEF12 | \> |
Almost all frame options offered by InDesign® have been implemented into comet_pdf. The following is a list of missing features:
Path outlines that are not centered will be rendered as red lines. That way it should be easily noticeable when something is wrong.
Comet_pdf supports linked text frames.
The reason behind this is that only one page at a time can be rendered. Also, pages can only be rendered in the same order as the text direction.
Placeholders with same ID and same product ID must be divided by at least one character, that is NOT the paragraph delimiter.
Placeholders that only contain the paragraph separator cannot be recognized by comet_pdf. InDesign® tricks here for the TaggedText in an incredible way: From various combinations of additional context-dependent line delimiters and closing tags behind the opening <ParaStyle:>, the program recognizes whether a text attribute (possibly also) applies to the paragraph delimiter. Due to the detour via the intermediate W2ML format that is necessary for comet_pdf, this behavior cannot be implemented here.
In the screenshot you see an InDesign® table with an image in cell (2, 2). Altough the image is too wide for the column, it is drawn anyway and overlaps the next column.
This behavior is not supported by comet_pdf. Columns must be wide enough to show inlines! And, in addition, there is no automatic column resizing. To calculate a columns minimum width, use the following formula:
Width of inline
- left cell inset
- right cell inset
- half of left cell stroke
- half of right cell stroke
- 0.5
Please note that, in opposite to column widths, row heights can grow to hold inlines. Only if rows are defined to have a fix height or if their maximum height is smaller than the inlines height, the inline is (like in InDesign®) not drawn and will fall into the cells overset.
To show inlines bigger then table cells, you may use customized anchors. In the screenshot the red frame is anchored in the yellow cell of the table:
Use the InDesign® menue to Object -> Anchored Object -> Options to configure the anchored object. This are the settings for the example:
[since v1.0 R25256] Text oversets in table cells are marked - like in InDesign®- by a red dot in the cell.
By default, the red dots are suppressed. To activate overset markers please use the option -ao.
I contrast to InDesign® comet_pdf can resolve oversets in table cells independently. To do that, the cell content is reduced in 1% steps until no overset occurs. The lower limit of the scaling is 10%.To activate the built-in text scaling, set the propoerty
Table -> Cell Options -> Text -> Clipping -> Clip content to cell
of the cell.
Using Tagged Text the option is called tCellClip.
We know, that Clip content to cell mean something different then we've implemented, but at least for me this option has no meaning in InDesign®.
HHere's a screen shot of the same table like above but with automatic overset relsove in all cells:
To use text variables, create w2mls withat least v4.0.5 R10822 of Comet plug-ins.
Comet_pdf supports all InDesign® text variables. InDesign® always tries to display the full variable on one text line. This can, expecially on long texts, lead to nearly unreadable text. The renderer handles the content of varaiables like normal text with line breaks and hyphenations.
The following table shows all text variables and their usages:
Variable | Description | Notes |
Date of last export | InDesign® uses the time of the last IDML or PDF export here. For the renderer, this is "NOW". |
For language versions long and short names of week days and months InDesign® uses own translations. The renderer uses the so called LOCALES of the operating system: MAC : /usr/share/locale Time zone [zzzz], Time zone (short) [z] and Era (G) are not supported by the renderer and replaced by "". Renderer supports all languages used in InDesign® CS6 except Indian variants of Indian. |
Creation date | Creation date of w2ml | |
Last modfied | Last modification of w2ml | |
User defined text | like InDesign® | |
File name | like InDesign® |
On Mac OS X, InDesign® uses old MAC OS 9 paths: Diva:Users:paul:Desktop:aaa.indd The last version of OS 9 is from the year (oops) 2001. I'm sure, it's okay to use the OS X syntax here: /Users/paul/Desktop/aaa.indd |
Chapter number | like InDesign® | |
Running head (Paragraph style) | almost like InDesign® |
Both variables searching on previous pages if the current page does not contain a text in the requested format - and both are in InDesign® (in our eyes) not correct.
The renderer hopefully shows the right texts here. |
Running head (Character style) | ||
Last page number | like InDesign® |
A variable showing the last page of the document formatted by the the current numbering style is displayed in the numbering style of the current section (and not of the last section) in InDesign®. The renderer uses the numbering style of the last section in this case instead. |
Meta data | like InDesign® |
Like in file names, we use OS X styled paths here on Mac. InDesign® uses the date format of its language always, no matter, that language is set to the text. The renderer formats dates in the current text language. Also static text like <No data>, ... are displayed in the InDesign® language always. The renderer translates this texts into to requested language. If a images contains meta data in its XMP header, InDesign® can not solve the EXIF data - you may tryit by your own. The renderer can read the EXIF data anyway. But without any external help, the renderer can not read XMP data. If you need such data, you can use an external tool, Enthält ein Bild Metadatensee here to learn more. Transparence and ICC-Profile are not supported by the renderer and replaced by <unknown> resp. -. |
Meta data of images can read by an extern tool using the standard script Metadaten von Bildern können über das cScript imgconv/read_exif.cpp. The following variables defined here:
Variable | Typ | Notes |
gImagePath | char* (r/o) |
Complete path of image |
gKeys | StringList | Result lists containing keys and values. As keys the keys of exiftool are used. Both list must have same lengths. |
gValues | ||
gResult | int* | -1 : Do not use the script and do not call the script again 0 :Okay Otherwise : Error |
The installed script returns -1. To use exiftool , simply remove the line "return -1; at the begin of main. But take care! exiftool is third party software! Please be sure to fullfill the license agreement of exiftool.
Here are two screenshots of text varaibales:
Prerequisite for the use of graphics cells in tables is that the W2MLs have been created with at least InDesign® CC 2015 and v4.0.5 R20104 of the Comet plugins.
Since InDesign® CC 2015, table cells can directly capture images. For this purpose, a cell has only to be converted into a graphics cell. This results in an image frame which completely fills the cell minus the cell offset and is automatically adjusted if the cell size changes. The frame belongs directly to the table, it is not generated by an inline in the text of the cell. The figure shows a section of a table with graphics cells in the abc column:
Comet_pdf can now also show such frames in cells.
Unfortunately Adobe has implemented the graphic cells somewhat fleetingly: There is no possibility to insert existing frames into cells. The frame can only be created by converting the cell, all properties such as color, border, etc. have to be set later. What is more, however, is the strange behavior with rotated frames: If the cell size changes, the four corner points are repositioned accordingly, but keep the same distances to the cell edge on all four sides. However, the quadrangle is usually distorted:
We are quite certain that this does not correspond to the expected behavior. It also prevents a row or column from containing multiple rotated rectangles. Comet_pdf calculates the new size of the frame so that the frame is scaled accordingly, but its proportions retained and centered in the direction of the larger side:
In the current version of comet_pdf, no new graphics frames can be created in cells. This also affects duplication of cells, columns, or tables. In particular, therefore, templates with graphics cells can not be used.
Graphics frames in cells are adjusted when the cell size changes. Changes in cell insets are not yet considered.
Prerequisite for the use of frame customization options is that the W2MLs have been created with at least v4.0.5 R20104 of the Comet plugins.
Frame fittin options are the InDesign® alternative to the priint:comet layout rules of priint: comet. Using both methods at the same time can lead to unforeseen results. Particularly in graphic cells, frame fittin options are often used to correctly adjust images after frame changes. Comet_pdf supports the settings of the frame fitting options and executes them automatically when changes to frame sizes occur.
However, comet_pdf interprets the margins somewhat differently from InDesign®: distances that move the image inwards (or reduce it) are not applied to the image scaling, as in InDesign®. A left-hand distance of 10 pt thus remains a left-hand distance of 10 pt, regardless of whether the image is shown in 100% or 50%.
In addition, behavior is somewhat different in non-solvable situations. An insoluble situation is e.g. a 100x100 image in a 100x100 frame with 10 pt each side edge. If the frame is now reduced non-proportionally to 100x50, some condition must be dropped:
For InDesign®, the distances to the larger image side seems to be the top priority, in the other dimension the image can then extend beyond the frame. However, despite intensive trials, we were unable to completely clarify the behavior. However, for comet_pdf, the visibility of the image has priority.
All texts in the output can be translated automatically. For the translation, an online service provided by deepl.com is used.
An Internet connection is required for the automatic translation of your texts.
DeepL tries to translate sentences in their context with the help of so-called artificial intelligence. Here's an impressive example of deepLs translations:
The German word Absatz has two different meanings: In the context of formated text it means paragraph. But if you talk about shoes, Absatz is heel. Here you can see what deepl is doing;
For obvious reasons, however, formatted text can only be translated in fragments (so-called chunks) of the same formatting. So the fewer format changes a text contains, the better the translation.
Currently deepL supports the following languages:
The target language is defined as an abbreviation with the program option . Please note that the original text must also be available in one of the specified languages.--lang LL
To activate the translation, the --deepl option must be defined and valid at the same time!
I'm sure you understand that deepL charges a (small) fee for its service. To obtain a valid license, you must be registered at deepl.com. After successful registration you will get a license code. Copy this code (and nothing else) into a file. In the program option --deepl path you specify the path to this file.
The target file can be either PDF or HTML. Specify the desired target format in the parameter --desttype pdf | html. The default is PDF output.
Attention: The HTML output is only experimental at the moment. We are happy about (realistic) suggestions and especially about proposed solutions. But please understand that the HTML export of the renderer is currently not part of the support of WERK II or partners.
Unlike the page based structure of an InDesign® or PDF file, HTML does not recognize pages at all. The size of the output area is completely unknown and, on the contrary, always different. Likewise, the size of (text) frames depends on the output program and computer used.
The use of functions such as "Fit frame" is (at least for text frames) completely useless and is therefore not even tried. And because of the unknown frame size the placement of frames at fixed coordinates is usually useless (or even wrong). Therefore, the output only defines the distances between the frames.
Since we can largely work without complex size calculations, the generation of HTML is much faster than PDF.
See two nice examples of comet_pdf generated HTML:
Due to the completely different worlds of print and online, new problems have arisen again and again, which cannot be solved or not completely solved in HTML/CSS/Javscript. Here is only a small enumeration which does not claim to be complete:
To customize the HTML output, you can insert your own styles, scripts, ... into the <head> part of the file. The specification --htmlhead path defines a file for this purpose. The content of this file is inserted 1:1 and without any changes right before the closing </head> in the output HTML file. This gives you the final access to the style information and Javscript functions of the output.
Note: The safest way to find a simple solution is certainly to open the resulting HTML in an HTML editor and test your solutions there.
With the specification--htmlfoot path you define a file whose content is inserted directly before the closing </body>- tag of the HTML output. An important task of this insertion is the declaration of the used fonts, see the following paragraph.
In newer versions of Safari, Apple only allows the use of fonts installed in the standard version of the operating system. All other fonts are ignored and replaced by a default font. A list of allowed fonts can be found here.
To address this problem, we have implemented each use of the CSS definition font-family as follows:
font-family:"SF Compact Display",var(--font-SF_Compact_Display-Bold);
Browsers will therefore first try to use the local font (and determine the required style on their own). If this fails, they will try to use the font specified under the subsequent associated CSS variable. The name of the variable is formed from the prefix --font plus font name plus font style and is preset with the same font. The Regular font style is ignored. Spaces and quotation marks are replaced by _ (underscore), font name and font style are separated by - (minus). Here is an example:
A document uses the fonts Myriad Pro and Arial Unicode MS. The following definitions are written in HTML:
<style>
:root
{
--font-Myriad-Pro : 'Myriad Pro';
--font-Myriad-Pro-Bold-Condensed : 'Myriad Pro Bold Condensed';
--font-Myriad-Pro-Bold : 'Myriad Pro Bold';
--font-Arial-Unicode-MS : 'Arial Unicode MS';
}
</style>
To overwrite these definitions, copy this <style> block and change the fonts used as follows for innstance:
<style>
:root
{
--font-Myriad-Pro : 'Helvetica Neue';
--font-Myriad-Pro-Bold-Condensed : 'Helvetica Neue Conndensed Bold';
--font-Myriad-Pro-Bold : 'Helvetica Neue Bold';
--font-Arial-Unicode-MS : '-apple-system';
}
</style>
In the HTML options, you specify general settings for generating the HTML. Here you will find a commented example file. With --htmloptions pat you specify whether and which configuration file you want to use.
With ---config_path path you may change the configuration folder of the program. All relative paths such as fontnames.xml, hyphenations, XCache, etc. will be resolved relative to this folder (and all references to app_path in this documentation will point to this folder). This is useful in cases where you want to use different configurations with the same comet_pdf options.
The parameter path may start with $DESKTOP, etc., but of course it must not be a relative path itself!
For the simplest possible workflow, we recommend that any post-processing such as data compression or color adjustments to the finished PDF should be done within comet_pdf.
The DocWatch situation "Before closing the document" is available for this purpose. If document watch is activated this script is executed directly before closing the (W2ML) document. The output PDF is created and closed at this time. In the script you can use system::cmd to call external terminal programs to edit the PDF.
The "Before closing the document" script is executed after the meta data is created. Changes that the script makes to the PDF will threfor not be visible in the meta data!
As of v4.1.8 R30410, the "Before closing the document" script is therefore executed a second time directly before the meta data are created. This call is made even if no meta data are created afterwards. To distinguish the call from the general Before Close call, the global variable gBeforeMetaData is set to the value 1 here. In all other cases and in InDesign® this variable is always 0.
To conveniently access the generated PDF, there is (also as of v4.1.8 R30410) the global variable gDocumentPathPDF.
Please be sure to note that structural changes to the PDF can lead to errors when generating the meta data, because the information about the meta data may no longer matches the PDF.
The following example converts the final PDF to a pure RGB document. Ghostscript is used for conversion, for which you must of course have the necessary licenses!
int main () { char path[4096]; String cmd = string::alloc (); String rgbprofile = string::alloc (); String iccname = string::alloc (); String iccpath = string::alloc (); String path2 = string::alloc (); String name = string::alloc (); String tmppath = string::alloc (); int found = 0; int i; document::path (path, gDocument); wlog ("", "# Before close '%s'\n", path); if (system::version () > 0) { // comet_pdf // if (gBeforeMetaData) { //Get the current color profile //and search for it's complete path // document::get_color_profiles (gDocument, rgbprofile); if (string::length (rgbprofile)) string::set (rgbprofile, "Adobe RGB (1998)"); for (i = 0; i < color::count_profiles (); i++) { color::get_nth_profile (0, 0, i, iccname, 0, 0, 0, 0, iccpath); if (string::compare (iccname, rgbprofile) == 0) { found = 1; break; } } if (found) { //Use Ghostscript to apply the new color profile //The result must be written to an tmp file // file::path (path2, gDocumentPathPDF); string::set (tmppath, "%s/%s_tmp.pdf", path2, name); string::set (cmd, "gs -dSAFER -sOutputFile='%s' ", tmppath); string::append (cmd, "-dNOPAUSE -dBATCH -sDEVICE=pdfwrite "); string::append (cmd, "-dProcessColorModel=/DeviceRGB "); string::append (cmd, "-dColorConversionStrategy=/sRGB "); string::append (cmd, "-dColorConversionStrategyForImages=/sRGB "); string::append (cmd, "-sOutputICCProfile='%s' ", iccpath); string::append (cmd, "-dOverrideICC=true "); string::append (cmd, "'%s' ", gDocumentPathPDF); string::append (cmd, "> /dev/null"); //Mac and Linux Only //Execute the command // system::cmd (cmd); //Remove the original PDF //and rename the tmp // file::name (name, gDocumentPathPDF); file::remove (gDocumentPathPDF); file::rename (tmppath, name); } } } return 0; }
It's possible, to integrate comet_pdf into a Publishing Server. See here for informations on how to integrate comet_pdf into a Publishing Server. The Publishing Server uses the Comet API Scripting DOM to communicate with comet_pdf.
[From v5.0 R35720] Comet_pdf supports the Accessibilty Structure of PDFs for Adobe Acrobat® and other PDF viewers.
The screenshot shows the so-called Tags for the Input/Output Help of an accessible PDF in Acrobat®. The structure can be shown and hidden using the red marked button.
In InDesign®, the option to create accessible PDFs is somewhat hidden and can be activated via the Create Tagged PDF checkbox in the General PDF preferences. By activating this checkbox, the /GenerateStructure tag in the PDF presets is set to true. With the same definition in the PDF preset of comet_pdf, you also activate the creation of tags for accessibility in comet_pdf:
/GenerateStructure true
At least comet_pdf v5.0 with PDFlib 10 is required to create the tags for accessibility!
The accessibility tags can be created in two sequences:
The selection can be made using the menu Use for Tagging Order in Tagged PDF of the Article panel. For cScript, the following two functions are available :
To transfer the tag order to the W2ML export of InDesign®, at least priint:comet plug-ins v5.0 R35720 must be used!
The natural order goes page by page from top left to bottom right and is calculated automatically from the XY coordinates of the frames. No further settings are necessary.
The articles and their order are configured in the Article panel of InDesign®. The following functions are available for cScript:
With the help of the InDesign® dialog Object -> Object Export Options..., you can define which information of a frame should be included in the tags for barrier-free access. The following functions are available for cScript:
Articles may be not be included into the export (see document::article::set/get_use_for_export). In this case, InDesign® still exports all the contents (frames) of the article. Only the article tag is not inserted into the tag structure. In comet_pdf, you can control the behavior using the /OmitItemsOfUnusedArticles tag (that is not defined in InDesign®!) of the used PDF Preset:
/OmitItemsOfUnusedArticles true | false
The tag /OmitItemsOfUnusedArticles is ignored by InDesign®. The contents of frames that are not assigned to any article are always exported to the target document by InDesign®.
Document content (frames) does not necessarily have to be assigned to an article. InDesign® exports this article-less content anyway. The frames simply do not have article tags in the tag structure. In comet_pdf, you can control this behavior using the /OmitArticlelessItems tag (that is not defined in InDesign®!) of the used PDF Preset:
/OmitArticlelessItems true | false
The tag /OmitArticlelessItems is ignored by InDesign®. InDesign® always exports the contents of frames that are not assigned to any article to the document.
During implementation of the PDF renderer, little imprecisions of InDesign® occur. These functions are usually implemented in variation to InDesign® standards.
Texts with inlines will always have the inlines rendered before the text itself is rendered. Inlines with negative line offset will possibly be covered by following text:
The issue is shown in the screenshot. "quam labo. Nam," is part of the text and does not belong to the inline. It covers the green inline.
Text underlining acts differently, its always rendered behind the text:
This is probably wrong. Comet_pdf renders the underlining above of the inline, covering it:
Inlines above linesare even more confusing, with a negative "offset below".
Text that is positioned before an anchor will be covered by the inline. Text after the anchor covers the inline:
comet_pdf renders all inlines above the line behind the text:
In case text with inlines is wider than the text frame itself, InDesign® renders beyond the designated frame border. Please see the screenshot:
Technically, this is wrong. comet_pdf does not render these inlines.
These errors are hard to see. To help with this issue, comet_pdf shows error messages in the console:
Error while drawing inline -48 in text frame -45. Check whether the text frame is big enough!
You may use option -a u to find the text frame in the document.
In the scree shot you can see some bullet points created by InDesign® (left) and comet_pdf (right):
In the InDesign® version the first bullet point has an smaller indention then in comet_pdf. This depends on an left indention of 18 points and a tab at 8 points: InDesign® obviously can use tabs before the text indention, comet_pdf not.
Weird effects can cause curved forms. Look for the example below:
comet_pdf renders the object as shown (But can't do as many things as InDesign®yet, see here):
[since v4.2 R31360] The image shows a screenshot from InDesign® with a line with arrows at the beginning and end. Two things are remarkable her
We assume that the destination point of an arrow is usually more important than its "skewness". In comet_pdf we therefore rotate the lines just as InDesing® does. However, for the arrow points themselves, we decided to display them correctly. Here is a screenshot of comet_pdf.
In some PDF viewers, weird renders happen typically with smaller scaled lines around table cells. The screenshot below shows Adobe® Acrobat® X (10.1.9, Mac):
Screenshot of a comet-pdf file
As seen in the screenshot, horizontal lines on the right border of the red table are rendered off the frame. With larger scalings, those occurances disappear. This is a rendering issue only! For comparison, below another screenshot from the same programme with the same scale. This time, the PDF file was exported from InDesign® itself:
Screenshot of a InDesign® PDF file
Comet_pdf uses the same data connection as our Comet-Plugins. To define the data connection, use the connections.xml, which is also used with Adobe InDesign® Server. Based on this file, the data connection will automatically be established after starting comet_pdf. When starting comet_pdf use the option -l (--login) to refer to the conncetion from connections.xml.
The file connections.xml has to be in the same folder as comet_pdf. Use the -c option (--connection) to refer to a different XML file.
Here's an example for an entry from connections.xml
<connection> <id>1</id> <name>demo</name> <type>odbc_utf8</type> <server>demo</server> <user>demo</user> <password></password> <PASSWORD>Gww3hahahawK3Ww4Oqsdfs+p1LKI=</PASSWORD> <db>comet_config</db> <lang></lang> <client></client> <passcredentials></passcredentials> </connection>
The information for an entry from connections.xml relate to the information from the xloginhistory.xml file of the Comet-Plugin-folder. If no entry for the desired connection exists, it is possible to save the connection via the - button of the login dialogue. The password is not saved.
Due to an error made long time ago, the element lang contains the value for the client and the element client contains the value for the language. Please take care on this, if you edit the file manually.
Passwords can be given normal (Element password) or crypted (Element PASSWORD). If you use crypted a password, leave element <password> empty (but do not remove it!). See here for more informations on how to get a crypted password.
As an alternative to a fix entry of connections.xml you may give the login data by single programm options. The following options are supported:Option | Element of connections.xml | Description |
--l_type | type | Connection type. Use one of the following values:
|
--l_service | server | XML-Offline : Path to xml folder ODBC : Servicename (DNS) SOAP : URL |
--l_user |
user |
Use name |
--l_pwd |
password |
Password |
--l_PWD | PASSWORD | Crypted password, see here |
--l_db | db | Data base (ODBC only) |
--l_client | client | Mandant |
--l_lang | lang | Language (SOAP only) |
If you are using both, connetions.xml and single programm login options, the login options are prefered in case of conflicts.
To get the crypted version of a password, runcomet_pdf once with option --crypto set:
comet_pdf --crypto myPassword
The crypted password is written to the output (and, if activated, to the logfilewird):
Password : 'myPassword'
Crypto : 'GwK3Ww4Oq+p1LKI='
Set up the folder for comet_pdf to write temporary files in. Every time comet_pdf is started, a subfolder is created. The folder name always is the PID of the process. After the programme is shut down, the subfolder gets deleted.
(since 4.1.7 R27027) A bang character ('!') preceeding the path allows to specify a fixed folder as absolute or relative path to the application. In this case, no folder for the particular process is created, therefore the runtime environment must guarantee that no concurrent renderer instances access the same folder at the same time.
If no folder was set up, comet_pdf automatically creates the subfolder XCache.
The XCache folder and its subfolders can only be deleted when the linked comet_pdf process was killed.
(since 4.1.7 R27027) Cache configuration files downloaded from PublishingServer. This requires PublishingServer >= Version 4.1.8
The files are cached in a subfolder of the XCache folder. The next time this connection is used, the files are read from the local file system rather than requested again from the PublishingServer - unless the server reports intermediate changes.
This requires, that
Both can be achieved by a preceeding bang character ('!') for the --cache parameter, e.g.. --cache !tmp/pdf_instance1
. For details see Cache
Wich XML parser is used for reading XML? ((Here you will find more informations about the used XML parsers.)
The default is the fast parser. Using Linux only the XML parser fast is available. Other parser settings are ignored on Linux.
Enter the full path in which the file will be generated. The file has to be in W2ML form and should contain the definitions for colors, character styles, paragraph styles and layers. If no file was set up, an empty file will be created.
Many placeholder scripts use the layer name to determine which language to use. If no pre set up file existed prior to starting the process, the option -y (--layer) sets the language to the layer instead.
This is how a valid comet_pdf compatible document is created:
Like in InDesign® copied frames or texts into other documents will be checked for color, character and paragraph styles. Missing styles will be created with the definitions from the source file. Existing styles remain unchanged.
As in the InDesign plug-ins, paragraph and character styles from %!TT texts that are not
defined in the document are created as empty styles with the default settings. These styles should therefore be defined beforehand in the template document.
Object styles are not yet supported.
Linked pictures in W2ML files are always described with an absolute path. InDesign® gives out warnings if a path could not be resolved and instead uses an embedded preview picture. Previews are not available in comet_pdf. Comet_pdf tries to find the picture in a different source. The following sequence applies:
If no original InDesign® path is defined in the W2ML file (psc:elementlist:documentPath) and the W2ML folder is used. The picture will be searched for in the same folder *Look at end of paragraph. This procedure is similar to the "packing" of InDesign® documents.
Example
The 111 folder contains a tst.indd file and a subfolder called pictures with the picture 111.png:
In tst.indd the picture is used. If a W2ML file is generated from tst.indd and put into the same folder, then the following text is found in the file:
- Document path "path_to_111/111"
- Picture path "path_to_111/111/Pictures/111.png".
Now the folder 111 is moved or renamed. Not a problem for InDesign®. But the picture "path_to_111/111/Pictures/111.png" is no longer available.
Because of that, the part of the path before 111.png is being replaced with the new path from tst.w2ml. And this picture exists.
If the picture can not be found like this, further paths can be searched*. To tell the programme with path to use, use the option -f. There are three possibilities:
<?xml version="1.0" encoding="utf-8"?> folders> <folder>$DESKTOP/111</folder> <folder>$DESKTOP/aaa*</folder> </folders>The following rules apply : No / at the end. Recursive searching is done by putting a * at the end. The search is stopped if the first picture is found.
Every information from the -f option is added and the folders will be searched in the defined order.
Warning: Recursive paths (* at the end) should not be overused and if possible the whole path should be used:
* For EPS pictures the following rule applies: Not the EPS file itself is searched but all defined alternative formats. If the original path awaits aaa.eps, pictures like aaa.pdf, aaa.png, aaa.tif etc. are searched. The first picture that is found will be used.
Missing and (server-side) modified images of Web Images can be reloaded automatically when documents are opened. As in InDesign®, the loaded images are placed in the folder filename_Links next to the document. Enable reloading with the option
--urllink_update behavior
The behavior can be one of the following values:
Please note that (like in InDesign®) Web Images of templates are not automatically updated.
The path and the name of the exported file is set with the option -o (--output). The extension pdf is not automatically applied.
If the same file exists, it will be overwritten!
If no option is given, the following rules apply:
Occasionally it can be helpfulp when UIDs, layers and linked texts of generated PDF's are visible. The option -a (--adorns) miscellaneous specs can be displayed. To do this, enter a string value consisting of any letters from the first column of the following table. A valid string would be tofu.
Letter | HTML | Description | |
t | ■ | ■ |
Show linked texts The current version displays linked texts to the next page in the wrong way. |
o | ■ |
Show text oversets Frames with overset will be marked with a small red plus symbol in the bottom right corner. Text cells with overset are marked by the same red dot like InDesign®. See here for mor informations about text oversets in table cells. |
|
f, F | ■ | ■ |
Frame borders and text insets For frame borders, the same color as the InDesign® layer will be used. With f, frame borders of grouped frames will be suppressed. By using the option F, frame borders of groups will also be rendered. |
u, U | ■ | ■ |
Frame-UIDs UID's will be shown the way they are shown in InDesign®, i.e. they are marked with a rounded small field on the bottom left of the frame. UID's of the PDFrenderer are always less than 0. With u, UID's of group frames are suppressed. By using U, UID's for a group are shown. Text insets are only shown in PDF. |
e | ■ | ■ | Page elements or Comet groups
[PDF only] Show used page elements in the background. To distinguish the position of them, the edges are highlights in comparison to InDesign®. [HTML only] Page elements are obsolet in HTML. Therefor this option is used to show the Comet groups in the background. |
p | ■ |
Show Text Placeholders In the current version only text placeholders and without the brackets [] used in InDesign are shown. Placeholders whose status is OKAY are marked with the color defined for the placeholder. Placeholders with status different from OKAY are marked with fixed (strong) colors and in white font:
Warning: In InDesign®, text placeholders use one textattribute each, which is not possible in PDFRenderer. In this case, strikethroughs will be used for text placeholders. Texts with strikethroughs might interfere with the placeholders. Or vice versa - this depends on the order the properties in TaggedText are defined. |
|
c | ■ | ■ | Show all table strokes in layer color |
i | ■ | Show hidden letters in text | |
h | ■ |
(like http) : Show status of Web Images. The Web Image status will be displayed as a colored band at the top of the frame like in InDesign®. The tape captures the full URL to which the frame is linked. The color of the band indicates the status:
|
Option -a with i in its value forces the renderer to show hidden charcaters in text in the resulting PDF. The following table shows the used marks for hidden letters:
InDesign/Unicode-Name | Unicode | Mark |
Paragraph Return | U000D | ¶ |
Softreturn | U000A | ¬ |
Indent to here | U0007 | † |
Blank | U0020 | . |
Em Space | U2002 | _ |
En Space | U2003 | - |
Nonbreaking Space | U00A0 | ^ |
Nonbreaking Space (Fixed width) | U202F | ^ |
Hair Space | U200A | : |
Sixth Space | U2006 | ‡ |
Thin Space | U2009 | < |
Quarter Space | U2005 | • |
Third Space | U2004 | • |
Punctuation Space | U2008 | ! |
Figure Space | U2007 | # |
Flush Space | U2001 | ~ |
Zero Space | U200B | | |
EN QUAD | U2000 | ¡ |
ZERO WIDTH NON-JOINER | U200C | + |
ZERO WIDTH JOINER | U200D | * |
LEFT-TO-RIGHT MARK | U200E | / |
RIGHT-TO-LEFT MARK | U200F | \ |
Please note, that for technical reasons soft returns are converted into hard returns (but applied as soft returns before of course) by the renderer. So, you will never see soft returns in the PDF.
Here's an (German) example with invisibles in text shown using option -ai:
Here an example with -a ufoe:
Prepare the given input file. There are three ways to do this:
executed action can now access the following global variables:
Variable | Data type | Description |
gRecordID | int |
Product-ID The product-ID will be assigned with the option -q gRecordStringID1, ~2, ~3 include |--| separated string-ID's. |
gRecordID2 | ||
gRecordID3 | ||
gRecordStringID | char* | |
gRecordStringID1 | ||
gRecordStringID2 | ||
gRecordStringID3 | ||
gTemplateID | int |
Template and position Parameters are assigned via the option -t. |
gPosX | float | |
gPosY | ||
gParamNInt with N ∈ {1, 4} | int |
Additional paramters for the script. Parameters assigned using the Option -Q. The up to four values are given by a blank delimited string. Strings inside this string are enclosed by single quotas. Every value is casted to int, float and char[]. -Q "1 23.4 'hallo'" int gParams1Int = 1; int gParams2Int = 23; int gParams3Int = 0; int gParams4Int = 0; float gParams1Float = 1.0; float gParams2Float = 23.4; float gParams3Float = 0.0 float gParams4Float = 0.0 char gParams1String [] = "1"; char gParams2String [] = "23.4"; char gParams3String [] = "hallo"; char gParams4String [] = ""; |
gParamNFloat with N ∈ {1, 4} | float | |
gParamNString with N ∈ {1, 4} | char [] | |
gArgument | char * | Additional parameter for script. This parameter is set by the --scriptin option with a path to a file. The value of the variable is read from this file. |
gOutput | char * | Output variable for script. This parameter is set by the --scriptout option with a path. After script execution, the value of this variable is written to this file. |
The most used action is the placement of a single product. For this action, there is a standard action called -e place. This action places a set template at a set XY position of the page inside the resulting document and loads the template with a product.
For the standard action place the options -q and -t have to be defined, to determine the product-ID and the template.
The following text shows an example for the option -e:
comet_pdf -e place -q "12 0 0 '115607'" -t "188 36.0 36.0" ...
Comet_pdf supports the Comet API Scripting Interface. This interface is used by the White board for example to control the InDesign® Server. Ypu may execute API calls by using the option -j (--comet-api). The option needs a path to an XML file containing the API calls and their paramaters. See here for a description of the XML, for details of the implemented methods and for examples.
In the Comet-Plugins one can set global variables by using the Comet panel Settings or by modal dialogs from cScript. Both are without meaning for the renderer. Therefore we implement a possibility to (re)define global cScript variables by program options. You may give the program as many -g options as you want. Every argument (re)defines one globale variable.
All changes made to global variables by using -g arguments are temporary for the calling renderer only!
The following syntax is expected:
Definition = [Type] Name "=" Value
Type = "int" | "float" | ("char" "*") / str
Name = IDENTIFIER
Value = VALUE_OF_TYPE
For Type the value "char *" or str can be used to specify strings as data type in both cScript and Python.
IDENTIFIER is the name of the variable and must follow the rules for cScript identifiers.
VALUE_OF_TYPE is the value according to the type.
All definitions are applied directly after successfully logging in and BEFORE the After Login Script.
If a variable already exists, its value is changed temporarily.
If no global variable of the desired name exists yet, a new variable of the specified type is created.
The new variable is then assigned the desired value (which is also converted here if necessary.).
All variable changes are applied temporarily only to the executing renderer. Renderers running in parallel may set different values.
Change/Define some globale variables:
comet_pdf .... -g gInt=1234 -g gStr="hallo hallo" -g "char * myGStr = 'asdasd'" -g "int gPub=120045" -g "str myGStr2 = 'Hello World'"
Modal dialogs are ignored by the renderer. But global variables can be used to work around these dialogs.
The following call of comet_pdf will set the global variable gPub to 120045
comet_pdf .... -g gPub=120045
pub = gPub; ok = askstring2 ( "", "", 0, "", "", 0, 0, "", "", &pub, "Publikation auswählen", 1, "Kontext wählen", "Ok", "Abbrechen", 0, 0, publications);
What template should be loaded with the product? This option will be analyzed by using the option -e (exectuion of an action). In this action, the product-ID can be accessed with the gRecordID variable.
The product-ID is expected in the following format:
-q "12 0 0 'stringid'"
Please note that you have to set at least the option -e place to to actually place a product.
What template should be loaded with the product? This option will be analyzed by using the option -e (exectuion of an action). In this action, the variables gTemplateID, gPosX and gPosY can be accessed.
The template-ID is expected in the following format. The positional variable is option. If it's missing, the positoin 0.0, 0.0 will be used. The positional information has to be set in float-numbers.
-t "188 36.0 36.0"
Please note that you have to set at least the option -e place to to actually place a product.
Using the InDesign® menue
File -> Adobe PDF Presets
one can create and change PDF presets used for PDF exports. Exactly the same presets can be used by comet_pdf. Option -z requires a complete path to an existing PDF preset. If no path is given, comet_pdf looks inside its folder for the file.
There is also a default place to look for PDF Presets: The folder settings/pdfprofiles besides comet_pdf. To use such a default preset, simply set -z to the name (without path and without an extension) of the preset and enclosed it into [ ].
Using the PDF preset settings/pdfprofiles/pdfset1.joboptions
-z [pdfset1]
InDesign® stores the PDF presets, so called joboptions, at this places:
Mac
Global profiles til CC 2014 : /Library/Application Support/Adobe/Adobe PDF/Settings
Gobal profiles since CC 2015 : /Folder_of_InDesign/Resources/Adobe PDF/settings/mul resp. japan
User profiles : ~/Library/Application Support/Adobe/Adobe PDF/Settings
Windows
Global profiles til CC 2014 : C:\ProgramData\Adobe\Adobe PDF\Settings
Gobal profiles ab CC 2015 : C:\Folder_of_InDesign\Resources\Adobe PDF\settings\mul resp. japan
User profiles : C:\Users\your_name\AppData\Roaming\Adobe\Adobe PDF\Settings
Use an existing InDesign® PDF preset. Of course you can duplicate the file to any other place you want.
comet_pdf -z "$HOME/Library/Application Support/Adobe/Adobe PDF/Settings/my_pdfs.joboptions" ...
Actually only two properties are implemented. But this list will grow up in the future. See the following table for a complete list of supported prpoerties:
Property | Keyword | Description |
General > Include > Interactive Elements |
/IncludeInteractive | Do not include: Interactive elements aer not included
Include Appearance: Interactive elements are looking like in InDesign® |
Marks and Bleeds > Bleed and Slug > Use Document Bleed Settings |
/UseDocumentBleed | Use bleed, and if, size of bleed. |
Marks and Bleeds > Bleed and Slug > Bleed > Top, Bottom, Inside, Outside |
/BleedOffset | |
Marks and Bleeds > Marks > Crop marks > Bleed Marks > Registration Marks > Color Bars > Page Information > Weight > Offset |
/AddCropMarks /AddBleedMarks /AddRegMarks /AddColorBars /AddPageInfo /MarksWeigh |
Create printer marks on every page?
Printer marks are created in "InDesign® style". |
Output > Compatibility > PDF/X > Output Intent Profile Name | /CheckCompliance /PDFXOutputIntentProfileSelector /PDFXOutputIntentProfile |
[Since v4.3 35256] PDF compatibility, see here |
Compression > Compression > Color Images > pixels per inch > for images above ... pixels per inch | /ColorImageResolution /ColorImageDownsampleThreshold |
[Since v4.3 34653] Recalculation of the images in the PDF output The setting for colour images is also used for greyscale images and monochrome images.
Attention: In addition to the PDF preset t Attention II: The installation of additional software is required to use this option! Further information can be found here. /ColorImageResolution indicates (as expected) the desired (lower) target resolution of the images in the PDF. The/ColorImageDownsampleThreshold defines the resolution from which images are to be recalculated. Please note:: The specification is not the absolute value but the factor by which the target resolution is multiplied: For a target resolution of 144 dpi from 200 dpi, for example, this is 1.38889 (200 / 144 = 1.3889). |
Accessibility Structure > General > Options > Create Tagged PDF | /GenerateStructure /OmitItemsOfUnusedArticles /OmitArticlelessItems |
[Since v5.0 35270] For the support of accessibility priint:comet Plugins v5.0 R32270 and comet_pdf v5.0 R32270 with PDFlib 10 are required! More information about accessibility can be found here. Please also note that the tags /OmitItemsOfUnusedArticles and /OmitArticlelessItems are only defined in comet_pdf. InDesign® ignores this information. |
You can define usage and size of page bleeds in InDesign® PDF presets. comet_pdf can read such presets using the option -z. See here for more imformations.
To insert printer marks into the PDF pages, define a PDF preset using InDesign®. With option -z comet_pdf can read this InDesign® PDF presets. See here for more imformations.
[Since v4.3 R35256] PDF compliance is set in the attribute /CheckCompliance of the PDF preset. The following information is supported. The specifications are case insensitive:
/CheckCompliance | Conform to |
[PDFX4...] |
PDF/X-4 |
[PDFX5...] |
PDF/X-5n |
[PDFA1A...] |
PDF/A-1a:2005 |
[PDFA1B...] |
PDF/A-1b:2005 |
[PDFA2A...] |
PDF/A-2a |
[PDFA2B...] |
PDF/A-2b |
[PDFA3A...] |
PDF/A-3a |
[PDFA3B...] |
PDF/A-23b |
Here is an example:
/CheckCompliance [ /PDFX4:2010 ]
[Since v4.3 R35256] For PDFX/4 and higher, a CMYK ICC color profile is expected as a so-called Output Intent. The specification of the Output Intent is mandatory and must be a CMYK color profile. Please note:
The color profile is specified via the /PDFXOutputIntentProfileSelector attribute. Information on the definition of the color profiles used can be found here. The following (case senstive!) details are possible:
/PDFXOutputIntentProfileSelector | Value |
/UseName |
The name of the ICC profile is expected in the additional attribute /PDFXOutputIntentProfile then. The information must be placed in parenthesis (...) and parenthesis in the name must be encoded with \050 resp. \051. Here is an example: /PDFXOutputIntentProfile (My ICC \050a\051) |
/DocumentCMYK |
Use the CMYK color profile of the document. |
/WorkingCMYK |
Use the value of the comet_pdf program parameter --working_icc. |
If /UseName is missing, the color profile of the document is used. If the color profile of the document is also missing, the specification from --working_icc is used. If this entry is also empty, a simple PDF without PDFX/4 compatibility is created.
RGB colors used in the document are automatically converted to CMYK using the RGB color profile of the document defined in the attribute settings.rgb_colorprofile.
Using the ption
--presets out_path
you can list all available PDF presets in a given file. The file will contain the names of every PDF preset inside the folder settings/pdfprofiles beside comet_pdf. Names are delimited by new lines and coming without the .joboptions extension and without [brackets]. After writing the presets into the file the programm stopps.
If this option is set, the pages of the resulting document will be cropped. Empty pages are not cropped.
Use one of the following settings for page cropping:
--crop Argument | Description |
"" |
no croping |
Number or "Number" |
Crop content by the given distance in points. Negative values will shrink the output. With -C 0 you crop pages exactly to their contents. While -C 12.4 will crop content with the distance of 12.4 points at every side. |
"Number Number Number Number" |
Use different distances at every side. -C "0 0 0 100" This will crop pages at their left, top and right sides exactly. At the bottom of every page you will get a 100.0 point wide white space. |
Because of the cropping of the pages, PDF pages might end up being all different sizes.
The option expects no further information. If it's set, the generated PDF file will be opened automatically after the process.
The option expects no further information. If it's set, launching the generated PDF file is suppressed. The option is usefull in longer shell scripts calling shortcuts withactivated -L option. Using -N here you use the shortcut without opening the generated PDF.
The option expects no further information. If activated, Comet notes inside the document are created as PDF annotaions. Otherwise, Comet notes are ignored.
For Comet notes you need files created with at least v3.4 R9200 of Comet plug-ins.
Normally, the renderer produces single pages. Using option --spreadwise, pages on the same spread are composed to (wider) single pages
The result PDFs will have less pages in this case of course!
Using this option an additional w2ml-Version of the resulting document is generated in the same folder like the PDF. This option is usefull for all case where documents are changed in workflow frequently.
[since v4.1.6 R25001] Save the finished W2ML input file as a copy to the specified (complete) path. Relative paths are resolved relative to the folder of the program. $DESKTOP et. al are allowed.
Make sure that in the Mac terminal the $ sign is escaped by \!
After the creation of the PDF you may wish to create the priint metadata of the document too. Use option --metadata in this case. Metadata are located in the folder name.pdf.metadata in the same folder like the PDF. If this folder exists already, it is removed at first. Here is a screenshot of a complete metadata folder:
Following options are supported:
Argument | Description |
0 [default] |
No meta data |
1 |
Create meta data |
2 |
Create previews of all Comet groups too |
4 |
Zip result (and remove the folder) |
8 |
Create result next to the input w2ml (and not to the resulting PDF). The folder is names name.w2ml.metadata instead of name.pdf.metadata in this case. |
16 |
Since v4.1 R23000 Create JPG previews of every page next to the output PDF |
32 |
Since v4.1.7 R26906 Suppress preview generation regardless of other settings |
Values are bit fields. Option 5 (=1+4) will create zipped metadata with no Comet group previews inside the zip. To add the Comet group previews to the zip, use 7 (= 1+2+4).
Metadata previews are raster images and special software is needed to generate these images from the PDFs. The calculation of raster images from PDFs is therefore carried out via the cScript imgconv/pdf2image.cpp, which you can customise. You can:
A second application of the script are the auttomatic conversions of vector images to raster images or PDF. In these cases the gFormat and gResolution variables are empty and you can convert the input files to any format with any resolution:
The following global variables are defined in the script:
Name | Type | Description |
gResult | int* |
Set *gResult to one of these values:
For values not equal to 0, the automatic conversion is always carried out afterwards. |
gInfile | char[] |
Full path to the PDF file. The variable must not be changed! |
gOutfile | char[] |
Full path of the image file to be created. The variable must not be changed! Attention: The path usually does not contain a file extension from which you can read the image format. |
gFormat | char[] | Image format
Empty ("") when converting vector images for the PDF itself |
gResolution | float | Image resolution in dpi
0.0 when converting vector images for the PDF itself |
gAddAlpha | int | 0 : no 1: yes |
gClipLeft | float | Image cropping in points
0.0 when converting vector images for the PDF itself |
gClipTop | ||
gClipRight | ||
gClipBottom | ||
gPageWidth | float | Page size of the PDF in points |
gPageHeight |
The script contains some prepared conversion functions. Please note that licence fees may apply for the software used here. These licence fees are not included in the price of comet_pdf, so you have to take care of the proper licensing of the software yourself!
The programme is part of the standard installation of the Mac OS and can be used licence-free. Unfortunately, it is not available for other operating systems.
The programme is available for Windows only. To generate previews from PDFs, pdftoimage.exe is used. Without a licence, however, the images are watermarked. To remove the watermarks, a licence is required (PDF To IMAGE ( Command Line )). To install the licence you have received:
Ghostscript and ImageMagick are available for all operating systems. There are different licence models for which we are unfortunately unable to make any suggestions.
Environment | Software | Description |
Mac | sips | The programme is part of the Mac OS system installation. |
Linux | convert | The programme is part of the Linux system installation. |
Windows | imgconv\pdf2image\pdfbox-app-2.0.0-RC2.jar |
The programme is included in your comet_pdf installation folder. It is licensed under Apache License, version 2.0. Here you will find notes on the licence. Please check the licence terms before use. |
Using this option you can merge any number of pages from any number of PDFs into one PDF. Merging is done always as the last step of PDF creation. Input of the option is the path to an XML with the following syntax:
<?xml version="1.0" encoding="utf-8"?> <parts> <part path="..." pages="..."/> ... </parts>
The following specifications for path and pages are supported:
Attribute | Description |
path |
Complete path to an existing PDF
Folder contents are sorted alpha-numerically per folder:
|
pages |
1-base pages to insert:
|
Compositions can be done even if there is no w2ml input is given. The example will create the new file ccc.pdf from pages of aaa.pdf and bbb.pdf according to the instructions given in mmm.xml:
comet_pdf -m /Users/paul/Desktop/mmm.xml -o /Users/paul/Desktop/ccc.pdf
Two types of merging are supported:
The single-page composition is used if at least one file is not to be transferred completely to the target. Please note that in this case only page contents are transferred. References, bookmarks, notes, form fields etc. are not transferred to the target document. This restriction is a consequence of the PDFlib used, see PDFlib 9 Tutorial, Chapter 8.3.2 "Using PDFlib+PDI":
It is important to understand that PDI only imports the actual page contents, but not any interactive features (such as sound, movies, embedded files, hypertext links, form fields, JavaScript, bookmarks, thumbnails, and notes) which may be present in the imported PDF document.
If all documents are transferred with all of their pages (pages equal to "1-*, "*" or "all"), the documents including their interactive contents are concatenated. PDFBox is used to merge the PDFs and must be located in your installation folder (imgconv/pdf2image/pdfbox-app-2.0.0-RC2.jar). After the concatanation we try to convert references within the merged files into references within the target file.
Please note the following restrictions:
Set the priint document ID of the document. The ID is given as string and is set into the documents XML structure into the attribute documentID of the root element directly after the document was read successfully. Using the cscript functions xml::get_document_attribute and xml::set_document_attribute ypu may refer to the document ID. The document ID is also used in various functions in pubserver connections.
Since v4.0.5 R13799 the Comet plug-ins writing the used color profiles of a document into W2ML and comet_pdf can appy these color profiles. The following installations are necessary.
Color profiles are defined in so called icc (or icm) files. InDesign® uses the profile names defined in these files in most cases. But on MacOS this names can be localized. And, in addition, sometimes InDesign® uses own names. And some of the profiles are embedded into InDesign® directly.
To have a valid maping between profile names and their files we need clear definitions. These definitions are done in the file colorprofiles.xml inside the comet_pdf folder. Using the option --icc path you can choose any other place and file name if you want. path must be a valid and complet path of a valid XML file. Path may start with Um eine eindeutige Zuordnung zwischen Profilname und -datei zu gewährleisten, ist daher ein Zuordungsdatei nötig. Diese Datei liegt im Programmordner von comet_pdf und hat den Namen colorprofiles.xml. Fehlt die Datei, werden Profil-Zuordnungen ignoriert. Mit der Option --icc pfad kann die Datei auch an belieber anderer Stelle abgelegt werden. Erwartet wird in diesem Fall der vollständige Pfad auf eine gültige XML-Datei mit den Profil-Zuordnungen. Die Pfade dürfen mit $abbreviations like $DESKTOP.
ICC profiles of version 4 are usable to show colors in the right color space. But they are unusable to convert colors between different color spaces like in calls to table::get_fillcolor_cmyk are if if you create PDFs with color conversions.
Colorprofiles.xml must have a NULL entry and define the profiles color space (rgb or cmyk).
Here is an example of a valid colorprofiles.xml
<?xml version="1.0" encoding="utf-8"?> <colorprofiles> <colorprofile name="" type="" version="-1" path=""></colorprofile> <colorprofile name="MyICC" type="rgb" version="3" path="ppp/MyICC.icc"></colorprofile> </colorprofiles>
It is quite time-consuming to find the right information and the correct file for each available profile. And, if the profile is embedded directly in InDesign®, you will not find any profile file. Since v4.0.5 R13799 of comet_pdf, the installation contains a predefined colorprofiles.xml and the folder colorprofiles, which contains the corresponding profiles. Use the cScript command document::export_color_profiles to export the profiles used in the document.
document::export_color_profiles (0, "$DESKTOP/aaabbb", "$DESKTOP/aaabbb.xml");
Color profiles are not applied automatically. To apply color profiles to the document, start comet_pdf with the --apply_icc option. The option does not require further information. In the following three screenshots, you will see the effect of the option. Shown are parts of two orange frames. In one frame the color is defined as RGB, in the other as CMYK. In InDesign® both colors are the same - (of course, because the conversion of the color was made here using with the current color profile).
In InDesign®
comet_pdf without color profiles
comet_pdf using color profiles
Prerequisite for applying the color profiles is:
Die Angabe --interactive N steuert, ob das PDF interaktive Elemente wie Buttons, Texteingaben etc enthalten kann und in welcher Tab-Reihenfolge diese Elemente aktiviert werden sollen. Default ist 0. Folgende Werte erlaubt:
The option --interactive N controls whether interactive elements such as buttons, text input, etc. are expoted to the PDF and in which tab order these elements should be activated. The default is 0, and the following values are allowed:
Value | Description |
0 |
Ignore interactive element. |
1, 2, 3 |
Export interactive elements Tab order is the tab order stored in the object, see interactive::get_pdf_option (frameRef, kPDFTaborder, ...) |
4 |
Export interactive elements Tab order is the article order stored in the object, see interactive::get_pdf_option (frameRef, kPDFArticleorder, ...). Please note, that you cannot change the article order with cScript. |
See here for more information.
The ---pidstart and --piddone options are useful for asynchronous calls to comet_pdf. The program creates the file specified in pidstart immediately after it is started (and the program options are read successfully). The file specified under piddone is created directly before the program ends. From the existence of the files, third party applications can recognize whether a scheduled call of comet_pdf was started or done.
In both files some short information is written. The format of both files is the same:
App\t: Name Version Revision, based on ... and PDFlib ..., 64bit
Path\t: Path of the executing program (or --config_path)
User\t: Login name of user
PID\t: Process ID
Time\t: Start- resp.. End time of program in format yyyymmhhhhmmss
Pages\t: Number of created PDF pagesn, -1 for pidstart
Exit\t: Exit value of programs, -1 for pidstart
#Application arguments :
...
Here is an example of a pidstart file:
App : comet_pdf v4.1.6 R26966, based on Comet 4.1.7 and PDFlib 9.0.4, 64bit
Path : /Users/paul/Development/pdftest/comet_pdf
User : paul
PID : 8604
Time : 20200513120858
Pages : -1
Exit : -1
# Application arguments :
comet_pdf \
-s posters_place \
-l posters \
-i $DESKTOP/fifo/render/template_de.w2ml \
-e 1001 \
-q 2 0 0 '' \
-P fontnames.xml \
-L \
-v /Users/paul/Desktop/aaa.log \
--pidstart /Users/paul/Desktop/s1.txt
Very cool : The Shortcuts. If you put all the options described above together correctly, you will probably get a rather long command. Maybe you don't want to write so much, maybe you don't remember - here's a shorter way:
A shortcut configured in this way can be used with
./comet_pdf -s NAME_OF_SHORTCUT
Further program options after the shortcut are allowed of course. If a subsequent program option was already set by the shortcut, the new setting is used.
Here is an example of a shorcut called poster1, which calls
./comet_pdf -l posters -i \$DESKTOP/fifo/render/template_de.w2ml -e 1001 -q "2 0 0 ''" --compression 1
simplified by
./comet_pdf -s poster1
<shortcut> <name>poster1</name> <description>Place one poster of priint 5.5 using action 1001</description> <l>posters</l> <i>$DESKTOP/fifo/render/template_de.w2ml</i> <e>1001</e> <q>2 0 0 ''</q> <compression>1</compression> </shortcut>
The shortcuts.xml file does not have to exist, but if it does, it will be searched for in the comet_pdf folder.
The shorcut names hello and all names beginning with priint: are reserved!
For testing purposes and in the PubServer environment you may want to change some settings for all comet_pdf calls. E.g. it may be useful to write the log files to a different location (or at all) or to change the image compression inside the PDFs. The default shortcuts priint:args:pre and priint:args:post can be used for this: The :pre entry is read before all other program options, the :post entry is evaluated at the very end, overwriting all other corresponding definitions. You should be careful with both definitions - they change the behavior of all calls to the associated comet_pdf.
With the following definition your comet_pdf will always use a very weak image compression. This will make calls to image-heavy documents faster by factor of 2-3 (but the PDFs only marginally larger):
<shortcut> <name>priint:args:post</name> <description> This entry is called to fix the options of ALL your calls to comet_pdf. The definitions also override the options that are set in the current calls to comet_pdf. Think twice before inserting something here! </description> <compression>1</compression> </shortcut>
Selection of the shortcuts XML file. The option expects the specification of a complete path including the filename of a valid shortcuts.xml. The use of the built-in $ aliases at the beginning of the path is allowed.
Optionally, the path can be followed by a ':' separated valid shortcut name from the defined file. If this specification is missing, the shortcut can also be selected with -s myShortcut. In this case, make sure that the -s parameter comes after the definition of -shortcuts.
Both calls are equivalent: instead of the default shortcuts, the scc.xml file of your desktop is searched for the shortcut color_frames234.
comet_pdf --shortcuts \$DESKTOP/scc.xml:color_frames234 comet_pdf --shortcuts \$DESKTOP/scc.xml -s color_frames234
[since v1.0 R16600, EXPERIMENTAL] Like the priint:comet Plugins comet_pdf can run in kann auch comet_pdf im playback mode. Use option --playback to set the playback mode:
The data folder itself is defined by the option --playback_path.
If no folder is defined in record mode, a subfolder of the current XCache is used:
$CACHE/U12345/XDATA/connection_name
where 12345 stands for the current pid of the renderer - the youngest folder in XCache. To prevent the recorded data from deleting at the end of the programme, please start comet_pdf with option in this case.-VX
Under the point Fit Frames in the program final messages, you can see the time the program took to calculate text oversets and fit frames to their content. Especially text chains over many pages and tables can be very time consuming. With the so-called Layzfit we try to minimize these calls. To do this, the program registers changes to the text or image of the frames and to their geometry and only performs the time-consuming size calculation if something has actually been changed since the last fitframe. This can lead to a time saving of up to 20%.
LazyFit is turned off by default. With --lazyfit 1 you can turn on the feature. With a later --lazyfit 0 (e.g. from a previous shortcuts) you can disable the option again.
The feature is still in exprimental status. We may have missed situations where you can make changes to frames that affect the frame size. Please use LazyFit in production only after a thorough review of your project.
Should comet_pdf check Web Images before using?
By removing unused style definitions from the documents, the speed of comet_pdf can be optimized significantly. With the --unused_styles specification, the program prints a list of all unused styles at the end. After careful examination you should then remove unused styles from the documents:
In the default comet_pdf application, the layers of InDesign documents are only used to define the so-called Z order : Objects of lower layers are created before the objects of higher layers. In addition, the layer color is used to draw the adornments.
[Since v4.2 R33238] With the --pdflayers 1 | on | yes option enabled, the layers defined in the InDesign document will be created in the PDF document in the same order and with the same settings. Please note, however, that "Locked" in Acrobat only means that the visibility of a layer cannot be changed and that the layer may not be deleted. But in contrast to InDesign the objects of locked layers may be changed, however.
This option is used to start the Python debugger server on the specified port.
Start the programme with the -v option (--log) with a full path to the log file, to write logging data. IF no path exists, a file will be generated.
The log file extension can be .log, but this is not required. On Mac OS X, files with this extension will be opened in the console through double clicking. The file always shows the bottom of the content to visualize the progress more easily.
The log file is identical to the log data of the comet plugins.
When doing productive work, logging should be disabled. Logging slows the process by about 10-20%.
Please start comet_pdf with option --logx and a complete path to a file to log api calls into a single file.
The option is usefull, to monitor the communication between a server (e.g. the PublishingServer) and the renderer. Aside from date, time and the complete command line the log contains information on how many time a task has taken.
The option sets the path to the logfile configuration file, which is used to control what is written to the log file and how.
The full path of the logfile configuration file is expected. If this file is called log.xml, the name can be omitted. The path may begin with one of the predefined $ aliases. If the specified file does not exist, the program option is ignored and the default log.xml file of your werkii preferences or next to comet_pdf is used.
The specifications $DESKTOP and $DESKTOP/log.xml are therefore equivalent and both refer to the file /Users/your_name/Desktop/log.xml.
[ab v1.0 R17778] If this option is given, the complete traffic between the current SOAP service and comet_pdf is logged. The parameter is used only in active SOAP connections. Logs are written to the desktop always. Old logs are removed right before the next login. The following logs are written:
Write additional internal informations into the output stream. The option may be helpfull in debug cases.
The output shows the content of the texts at different stages of the internal editing. Differences in the assignment of styles (tags) to the text are therefore normal. Please also take care the text attributes supported by comet_pdf.
Attention: The option may create a lot of output. It would be a good idea to redirect the applictions output by >.
Following flags are supported:
Flag | Beschreibung |
i, m, c, q | Current text models while inserting text |
r | Current text models while replacing and/or deleting text |
e | Hyphenated text for PDF |
b | Exporting lists to PDF |
x, y | Text to export ti PDF |
w | Insert inlines |
s | Creating placeholders |
f | Removing placeholders |
o | Inserting pre/postfixes of placeholders |
t | Short-term insertion of missing paragraph styles in table cells |
T | Write the texts that are sent to deepl for translation. |
* | All |
X | Do not remove $XCache at the end of the programme |
Create a logfile for the PDFlib-Support .
Display of dialogues (alert, showmessage, showerror) will be written into the export and log file. The log file shows these messages with hints like Info, Warn bzw. Error. In the export file, text are marked in different colors (green for Information, blue for warnings, red for errors).
The program will return an exit code after running. The exit code is shown in the last line of the programs output:
Successfully finished.
Cannot open file '/Users/paul/Desktop/Unnamed-2.w2ml'.
Programm canceled with <kCannotOpenDocument>.
EXIT CODE 4
The following table describes all exit codes of comet_pdf:
Value | Name | Description |
0 | kReturnSuccess | Successfully finished. But take care and check the warnings: Missing fonts, images and cScript functions and text oversets are not treated as errors. |
1 | kHyphenationsNotFound | Error while registering hyphenation files, see here to learn more. |
2 | kFontNamesXMLNotFound | Error while registering font name mappings, see here to learn more. |
3 | kConnectionsXMLNotFound | Error while reading connections data, see here to learn more. |
4 | kCannotOpenDocument | Error while opening the input document given by option -i. Check whether the file exists and is valid. |
5 | kExecScriptError | Error while exucuting the cScirpt given by option -e. Check whether the script exits and is free of error in syntax and semantic. |
6 | kCannotCreatePDF |
Error while creating PDF. Because this is one of the main tasks, this error of course can have a lot of reasons. Here's a (incomplete) list of reasons:
|
7 | kCannotSaveAsW2ML | In most cases the error is caused by write permissions to files. |
8 | kConnectionMissing | No connection given see here to learn more. |
9 | kConnectionsXMLNotValid | Connections file not valid, see here to learn more. |
10 | kWrongConnectionType |
Wrong type of connection. The following connectio types are supported:
|
11 | kProductsXMLNotFound | The given list of products (items.xml) was not found, see here to learn more. To import single products see here. |
12 | kBuildProductsError | Some errors while building products, see logfile for more informations. To enable log file writing use options -v and/or --logx. |
13 | kCannotConnectToDatapool | Error while connecting to data pool, check connection data please. |
14 | kProductsXMLNotValid | The given list of products (items.xml) is not valid, see here to learn more. To import single products, see here. |
15 | kCannotMergePDFs | Merging PDFs failed, see here to learn more. |
16 | kColorspacesXMLNotFound | Error when registering the available color space definitions, see here for more information. |
17 | kCannotInitServerSocket | Unused |
18 | kCannotBindSocket | |
19 | kListenerNotFound | |
20 | kClientRequestNotAccepted | |
21 | kClientSentExit | |
22 | kDefaultFontNotFound | Neither the default font nor its local alternative was found:
Local Alternative : path_of_comet_pdf/Ubuntu-Regular.ttf |
200 | kHelpMessagePrinted | Exit code for -h or --help. |
To catch the exit code of program, use the following code (Mac only):
comet_pdf ....; echo $?