Command line options for multi-language support

Until pdfToolbox 9, all reports in a call needed to have the same language, for example --language=en.
From the pdfToolbox 10 onwards, the use of different languages in reports created on the same pdfToolbox run is possible. For example

--report=XML,language=en,path=<output path> --report=MASK,language=fr,path=<output path>

Seven languages are completely localized in pdfToolbox:

  • English, German, French,Spanish, Italian, Japanese and Chinese

It could led to a problem of appearance of DictKeys for unknown languages or not fully localized languages in pdfToolbox reports.
Since pdfToolbox 10, the DictKey mechanism has been extended, which allows customers to add translations to inactive languages and allows creation, maintenance and use of custom dicts with additional strings for any Profiles (or other objects) for active, inactive or any other language.
More about custom dicts below:

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>

./pdfToolbox --createcustomdict /var/Profiles/PDF analysis/List potential font problems.kfpx

This creates an XML for the profile (kfpx).

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

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" ?>
	<dict version="3.0" lang="in">
            <group key="CUSTOMDICT">
                <entry key="भारत">
                    <value var="long">भारत</value>
                    <value var="short">भारतभारतभारत</value>

The custom dictionary can now be used while generating reports using --customdict

./pdfToolbox --report=xml --customdict=./List potential font problems.xml --language=in ./List potential font problems.kfpx ./123.pdf

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