Creating a report using Profiles

You have a wide variety of options for creating a report. Only adding -r to your call would create an XML report next to the input PDF file, no matter if any hits occurred. You can modify this behavior by the following parameters:

--report=<type>,<trigger>,[options,]<PATH=path>

You can use --report as often as you like in one run to create different type of reports.

Parameters

type
see "Report types"
trigger
see "Report triggers"
options
see "Further options"
path
see "Report path"

Report types

XML
XML report
XSLT=<type>
XSLT report, type can be a custom type or one of the types delivered with pdfToolbox CLI ("compacttext" or "compacthtml")
MASK
PDF report, problems highlighted by transparent masks
COMMENT
PDF report, problems highlighted by annotations
LAYER
PDF report, problems separated on layers
INVENTORY
PDF report which lists all resources used in the PDF file
COMPARE
PDF compare report
SUMMARY
PDF overview report
TEMPLATE
PDF report based on HTML templates
VARDUMP
Dumps the app.vars object of JavaScript Variables in a JSON file (starting with pdfToolbox 10.0)
JSON
JSON report (starting with pdfToolbox 13.0)

Report triggers

ALWAYS
Always create report (default)
ERROR
Create if at least one problem with severity "Error" was found
WARNING
Create if at least one problem with severity "Warning" was found
INFO
Create if at least one problem with severity "Info" was found
HIT
Same as INFO,WARNING,ERROR

Further options

OVERVIEW
Include overview for PDF reports
OVERVIEW_TEMPLATE
Include overview based on HTML templates for PDF reports (starting with pdfToolbox 10.0).
Click here for further information.
DOWNSAMPLING [#<PPI>]
Downsample images in PDF reports of type Mask, Layer and Comment to the given resolution (Default: 150 ppi)
HIDEERROR
Hide all checks with severity "Error" (not for type "Layer")
HIDEWARNING
Hide all checks with severity "Warning" (not for type "Layer")
HIDEINFO
Hide all checks with severity "Info" (not for type "Layer")
LANGUAGE
Language for the respective report, will overwrite general --language option of the CLI (starting with pdfToolbox 10.0)

PDF layer report options

ICCNAMES
Create layer for all ICC color space names
SPOTNAMES
Create layer for all spot color space names
FONTNAMES
Create layer for all font names

PDF inventory report options

FONTS
Include fonts
COLORS
Include colors
SHADES
Include smooth shades
PATTERNS
Include patterns
IMAGES
Include images, optional number of pixels like IMAGES_100
FORMXOB
Include Form XObjects
XMP
Include XMP
XMPADV
Include XMP advanced

XML report options

ALL
Include all ressources (Default)
NONE
Include no ressources
IMAGES[#<NUM>]
Include first <NUM> images
FONTS[#<NUM>]
Include first <NUM> fonts
PAGES[#<NUM>]
Include first <NUM> pages
COLORS[#<NUM>]
Include first <NUM> color spaces
SHADES[#<NUM>]
Include first <NUM> smooth shades
PATTERNS[#<NUM>]
Include first <NUM> patterns
FORMXOB[#<NUM>]
Include first <NUM> Form XObjects
INKCOV
Include ink coverage for every page
INKCOVRES[#<PPI>]
Rendering resolution used for ink coverage calculation (Default: 10 ppi)
INKCOVBOX[#<Box>]
Defines the PageBox (as ArtBox, TrimBox, BleedBox, CropBox or MediaBox) which will be used for rendering (Default: CropBox)

JSON report options

ALLCHECKS Include Checks without hits
COMPACT The JSON document is written in a single line
QUICKCHECK=<cfg> Custom QuickCheck configuration file, use NONE to disable
INKCOV
Include ink coverage for every page
INKCOVRES[#<PPI>]
Rendering resolution used for ink coverage calculation (Default: 10 ppi)
INKCOVBOX[#<Box>]
Defines the PageBox (as ArtBox, TrimBox, BleedBox, CropBox or MediaBox) which will be used for rendering (Default: CropBox)

Since pdfToolbox 14 a predefined Quick Check configurations file is included in the report creation. This file provides the JSON report with additional information about the document (e. g. resources). 

It is possible to reference your own Quick Check configuration file, which will disable the default one. 

Here you can download the default Quick Check configuration and customize it according to your needs (all Quick Check objects can be found here).

With --report=JSON,QUICKCHECK=NONE you can deactivate the default Quick Check configuration file, so that no additional information is generated (this saves a little bit of time during report generation).

Report path

PATH=<path>

path
Path to report file (if not defined, report is created next to input file)
When defined, this must always be the last element of the --report parameter.

PDF report based on HTML template

TEMPLATE=<path>
path
Path to template folder (or respective index.html directly)
PDF overview reports are created based on a style defined in a  HTML/CSS template. Click here for further information.
A predefined template can be found in the Server/CLI path:
../var/Reports/Templates.

Maximum number of pages

--maxpages

Maximum number of pages (default: 1000) - after this limit only pages that have problems will be stored.

Hits per page

--hitsperpage=<number>

Maximum number of hits per page reported. Every check will be considered individually.

Parameters

number
maximum number of hits per check per page that will be reported

Hits per document

--hitsperdoc=<number>

Maximum number of hits per document reported. Every check will be considered individually.

Parameters

number
maximum number of hits per check per document that will be reported

Setting the report language

-l --language=<language>

Sets the desired language for report files.
See article "Command line options for multi-language support" for a list of fully localized languages and how to extend incomplete translations or how to modify strings.

Parameters

language
language of report files
en
English
de
German
fr
French
es
Spanish
it
Italian
pt
Brazilian Portoguese
cz
Czech
da
Danish
nl
Dutch
fi
Finnish
ja
Japanese
ko
Korean
no
Norwegian
pl
Polish
sv
Swedish

Example

pdfToolbox --language=fr
--report=ERROR,WARNING,LAYER,OVERVIEW,PATH=<path to report
file> <profile> <PDF file>
pdfToolbox --report=ERROR,WARNING,TEMPLATE=OVERVIEW,PATH=<path
to report file> <profile> <PDF file>

Custom Dict files

Custom Dict files can be used to add or modify strings that are used in reports. Since pdfToolbox 10.0 it is allowed for custom dicts to cover strings for custom profiles or unknown Dictkeys in a particular language.

Creation of custom dicts

In the following example, a custom dict is created for strings of a non localised language to be added/replaced in a predefined Profile (kfpx). This can be achieved using the command line argument:

--createcustomdict <Path to Profile file>

This creates an XML for the profile (kfpx). 

<?xml version="1.0" encoding="UTF-8" ?>
<callas>
	<dict version="3.0" lang="en">
		<keys>
			<group key="P">
				<entry key="8_Listpotentialfontproblems">
					<value var="long">List potential font problems</value>
					<value var="short">Lists possible font issues.</value>
				</entry>
			</group>
Click to copy

A user can add his own custom language and values (long for Name and short for Comment as in this example).

<?xml version="1.0" encoding="UTF-8" ?>
<callas>
	<dict version="3.0" lang="in">
		<keys>
            <group key="CUSTOMDICT">
                <entry key="भारत">
                    <value var="long">भारत</value>
                    <value var="short">भारतभारतभारत</value>
                </entry>
            </group>
Click to copy

On running the profile along with the custom dict set to the XML with overwritten strings and custom language, there is no problem of appearance of DictKeys for unknown languages in pdfToolbox reports:

--customdict=<Path to custom XML file> 

./pdfToolbox /Users/List potential font problems.kfpx /Users/pdfToolbox CLI 10/123.pdf --report --customdict=/Users/Downloads/List potential font problems.xml --language=in
Click to copy

Profile name and comment without the appearance of DictKeys in the XML report (other report types will work as well of course):

<profile_name>भारत</profile_name>
		<profile_comment>भारतभारतभारत</profile_comment>
Click to copy