Schritt für Schritt – callas-Produkte optimal nutzencallas pdfChipLogging and debugging techniquesExtended logging capabilities: "--dump-static-html" command line parameter

Extended logging capabilities: "--dump-static-html" command line parameter

A new command line parameter "--dump-static-html" has been introduced for pdfChip. It makes it possible to create HTML files representing DOM snapshots – equivalent to what pdfChip turns into PDF pages for each cchip.printPages() call. If cchip.printPages() is not used, this parameter will create one HTML file representing the DOM that is the basis for all the PDF pages created.

The "--dump-static-html" command line parameter

Command line argument.

--dump-static-html[=<folder name>]

If the --dump-static-html option is specified then the current DOM state is written to an HTML file on each cchip.printPages() call.

The parameter =<folder name> is optional and defaults to dump-static-html. Its value is used as a prefix (to which a time stamp will get appended) for the names of the folders which contain the HTML file(s) with the dumped DOM.

Destination folder

The <folder name> parameter specifies a prefix for the name (not the path!) of the destination folder.

The folder is always created in the same folder as the output PDF file(s).

A time stamp is appended to destination folder name in the following manner:

<folder name>-yyyy-mm-dd—hh-mm-ss

Output file names format

Names of the HTML output files are constructed as follows:



  • <num-html> is a  counter for each occurrence of the ‘cchip.printPages’ call executed by the input HTML file with the name <html-file-name>. The <num-html> counter is reset to 0 for each input HTML file that is converted - which will only happen if more than one input HTML file has been passed to a pdfChip command line call.
  • <num-pdf> is a counter for of ‘cchip.printPages’ call per output PDF, where that output PDF has the name <pdf-file-name>. The <num-pdf> counter is reset to 0 for each output PDF file that gets created - which will only happen if more in any of the input HTML files the function cchip.setOutputPdf() is called to start creating pages in a new PDF output file.


For the following command line

pdfChip.exe --dump-static-html=dump index.html out.pdf

let “index.html” file contain two cchip.printPages() calls. Then during processing by pdfChip on Septermber 23, 2016, at 9:19:30 AM two static HTML files will get created in a  folder called dump-2016-09-23—09-19-30:

  • “dump-2016-09-23—09-19-30/index-000-out-000.html”
  • “dump-2016-09-23—09-19-30/index-001-out-001.html”