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

        -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       [empty]                      Apply color profiles of document
           | --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
Javascript : app.comet.getElementsXML

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:

  1. Built in : Comet_pdf contains two built-in lists for Mac and Windows. See here for a complete list of built-in font name mappings. Linux uses the Mac definitions. The complete paths to the font files are calculated internally.
  2. Defaults : File fontnames_default.xml in the same folder like comet_pdf.
  3. Local : Using the option-P (--psnames) you may define further mappings. The option expects the full (or program relative) path to an XML file.

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)
gray (50% gray)
gray 1.0 (white)

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:

  1. Current folder of priint:comet plug-ins, or, in case of comet_pdf, its parent folder ($COMET/fontdb.xml).
  2. Folder werkii of user preferences ($PREFS/werkii/fontdb.xml).
  3. Configuration file fontdb.xml ($COMETDATA/fontdb.xml) . [since v4.1 R23777 and XML-Offline and SOAP only]

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:

  1. Create a Hyphenation Rules File
  2. Link the Rules File to a language

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:

  1. Definition of hyphenationLanguage=deu and hyphenationCountry= (empty) in thr Root element of the documents XML structure
  2. Adding the line <language primary="deu" sub="" hyphens="de" /> to hyphenations/languages.xml

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:

  1. Place a file of the same name with the extension .dict next to the hyphenation rules file. If the hyphenation rules file already has an extension, the extension .dict will be appended to this extension!
  2. Dictionary files must be UTF-8 encoded!
  3. Enter all the words you need to define into this file:
    1. Use only lower case letters!
    2. The desired separations are marked with - or ~.
    3. The individual words are separated by line separators or spaces.

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:

  1. Replace the pdflib.dll to the according version on Windows too! Do not use any other version of PDFlib!
  2. Different variants may need different PDFlib licenses.

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
1 : Preview
2 : Okay

DEMO and Preview

The 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
1 : Watermarked
2 : Okay

    Failed

    Wrong licenses will abort the programm immediately.

    Watermarked

    On 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:

    1. ps2pdf (Automatic conversion of ps/eps into PDF)
    2. pdf (To import PDF files, a licence for PDFLib+PDI is required, see here.)
    3. png
    4. jpeg
    5. jpg
    6. tif
    7. tiff
    8. gif
    9. giff

    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:

    1. Preview: An easy possibility is the Preview tool from Apple, which allows to save postscript files as rasterized file formats. It is not possible to automate this process, Preview is not applescript enabled.
    2. pstopdf: Converts postscripts to PDF on the Mac. The tool can be started through Terminal.
    3. ps2pdf: Converts postscripts to PDF. This tool can be started through Terminal and is also available for Windows.
      Attention : The tool is part ot ghostscript and probably not license free.

    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:

    1. Open the license file you've got from VeryDoc
    2. Open the file imgconv\ps2pdf\bin\licensekey.txt inside you comet_pdf installation
    3. Copy/Paste the content from file 1 to file 2. Attention! Do not add any white spaces, quotas, nor returns around this content.
    4. Save file 2.
    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:

    Name Typ Beschreibung
    gInfile char[] Complete path of PS file
    gOutfile char[]

    Complete path of converted file

    gResult int*

    Set *gResult to one of this values:

    • -1 : No conversion done AND, please, don't ask me again.
    • 0 : Successfull conversion, gOutfile contains the path to the image.
    • >0 : error

    On values >0 the automatic conversion by pstopdf/ps2pdf is called now.

    See imgconv/pdf2image.cpp of installation folder for how to call external tools.

    To turn off automtic creation of PDFs see here.

    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:

    1. Immediately embedded binary data, e.g. about copy/paste images or images of an html page that are dragged directly into the document. In this case, there is no image path to an original image. When exporting the InDesign® document to W2ML, therefore, only the low-resolution preview can be written to the W2ML, and comet_pdf can only generate (possibly) inadequately resolved images in the PDF.
    2. Images embedded from image files: (Embedded images from image files can be obtained, for example, via the Links panel using the Embed Link command.) If the embedded image has an image path and this file exists at the time of export, the entire image file is embedded in the W2ML and comet_pdf can also insert the image into the PDF output in original resolution.

    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. They are only available via their names. Using the index is not supported.

    Exception: Alpha index 0 refers to the first alpha channel of a picture. In this case, names can be ignored.

    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
    tTableRowFillPatternEndValue
    tTableRowFillPatternFirstCount
    tRowFillPatFirstColor
    tTableRowFillPatternFirstTint
    tTableRowFillPatternFirstOverprint
    tTableRowFillPatternSecondCount
    tRowFillPatSecondColor
    tTableRowFillPatternSecondTint
    tTableRowFillPatternSecondOverprint

    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
    tTableRowStrokePatternEndVal
    tTableRowStrokePatternFirstCount
    tRowStrokePatternFirstWeight
    tRowStrokePatternFirstType
    tRowStrokePatFirstColor
    tTableRowStrokePatternFirstTint
    tTableRowStrokePatternFirstOverprint
    tRowStrokePatternFirstGapColor
    tRowStrokePatternFirstGapTint
    tRowStrokePatternFirstGapOverprint
    tTableRowStrokePatternSecondCount
    tRowStrokePatternSecondWeight
    tRowStrokePatternSecondType
    tRowStrokePatSecondColor
    tTableRowStrokePatternSecondTint
    tTableRowStrokePatternSecondOverprint
    tRowStrokePatternSecondGapColor
    tRowStrokePatternSecondGapTint
    tRowStrokePatternSecondGapOverprint

    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
    tTableRowFillPatternFirstOverprint
    tTableRowFillPatternSecondOverprint
    tTableColFillPatternFirstOverprint
    tTableColFillPatternSecondOverprint
    tTableRowStrokePatternFirstOverprint
    tRowStrokePatternFirstGapOverprint
    tTableRowStrokePatternSecondOverprint
    tRowStrokePatternSecondGapOverprint
    tTableColStrokePatternFirstOverprint
    tColStrokePatternFirstGapOverprint
    tTableColStrokePatternSecondOverprint
    tColStrokePatternSecondGapOverprint
    tTableOuterLeftStrokeOverprint
    tOuterLeftGapOverprint
    tCellLeftStrokeOverprint
    tCellLeftStrokeGapOverprint
    tTableOuterTopStrokeOverprint
    tOuterTopGapOverprint
    tCellTopStrokeOverprint
    tCellTopStrokeGapOverprint
    tTableOuterRightStrokeOverprint
    tOuterRightGapOverprint
    tCellRightStrokeOverprint
    tCellRightStrokeGapOverprint
    tTableOuterBottomStrokeOverprint
    tOuterBottomGapOverprint
    tCellBottomStrokeOverprint
    tCellBottomStrokeGapOverprint

    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
    pMinWordSpace, pMaxWordSpace

    Minimum and maximum word spacing are only used by comet_pdf in texts without hyphenation!

    Unfortunately, there is no direct equivalent of the word spacing between InDesign® and PDF:

    • In InDesign®, the values mean that the optimum word spacing can be changed up to the specified limit. Whatever the optimal word spacing is, 75% means it can be reduced to 75%.
    • In PDFlib, on the other hand, the word spacing is specified as a percentage of the space letter of the current font.

    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.

    However, values for hyphenation defined in paragraph styles, with the exception of Duden hyphenation, are retained when writing W2MLs (--autosave) and are thus restored when the W2ml is re-imported into InDesign®. (Duden hyphenation unfortunately is exported in the current InDesign® language by Adobe and can therefore not be supported.) Local deviations from the paragraph's hyphenation rules in TaggedText are ignored and will not be written back.

    ⇨ 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).

    To set the property in HTML text (%!TT_html), please use the pseudo tag <?IDTT ?>.

    %!TT_html...<?IDTT <cNoBreak:1> ?>Keep together<?IDTT <cNoBreak:> ?>...

    GREP-Style

    pRunInGrepStyles

    [Since v4.2 R33170] The first challenges here are:

    1. What Adobe calls 'GREP-Style' here is anything but not a Gnu Regular Expression.
    2. There is no documentation from Adobe about the syntax used here (or at least I haven't found any).

    he following (Third Party) pages are somewhat outdated, but may still be helpful:

    Basierend auf Erica-Gamets-GREP-Cheat-Sheet wurden folgende Nicht-GREP-Defintionen umgesetzt:

    • SYMBOLS :All (~8, \^, ~e, ...) except \\
    • HYPHENS AND DASHES : ~_ , ~=
    • WHITE SPACEs : All
    • QUOTATION MARKs: All

    Please note that the following GREP definitions are not supported:

    • Break Characters
    • Variables
    • Markers
    • Other (Indents, Tabs)
    • We also do not support modifiers for now.

    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:

    1. Quotation marks are replaced only in texts that are inserted by one of the Comet functions, such as textmodel::insert, loading placeholders, etc. Existing texts in documents are not replaced for obvious reasons.
    2. Inserted text must be TaggedText, that means, it must start with one of the TaggedText prefixes like%! TT.
    3. The language of the insertion point is used for all inserted text. Language changes within the currently inserted text are currently ignored.

    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>
        <cNextXChars:Page>
        <cNextXChars:Box>
        <cNextXChars:OddPage>
        <cNextXChars:EvenPage>

    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>
            
    <TextVarName:YOUR_VAR>
        <cPageNumType:>

    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>
        <cPageNumType:Previous><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.

    1. Text frames can not be linked to frames from previous pages.
    2. Linked text frames always have to be on the same layer or they can only be linked from bottom layers to top layers, not vice versa.

    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
    WINDOWS : C:\WINDOWS\systemXX\locale.nls

    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.

    • For paragraph formats, the first text of the page is used always, regardless of whether the variable should use the first or last occurrence of the paragraph style.
    • For character formats, the first occurrence in the last frame is always used.

    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 &lt; 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.

    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

    1. The bounding box of the line also contains the arrowheads. This means:
      1. Compared to the defined line, the displayed line is generally (slightly) rotated.
      2. The rotations of the displayed line changes with the line weight used.
    2. At least with a sufficient line weight, the representation of the peaks is no longer quite correct.

    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:
    • xmlfolder
    • odbc, odbc_unicode, odbc_unicode32, odbc_utf8
    • soap, odbc_unicode, odbc_unicode32, soap_utf8
    --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.)