59
Page 22
Manual
pdfaPilot CLI
a
© 1996-2015 by callas software gmbh · Schönhauser Allee 6/7 · D 10119 Berlin · Germany · info@callassoftware.com · www.callassoftware.com
Creating ZUGFeRD invoices
The German e-invoicing standard ZUGFeRD (Central User Guide Forum
electronic Invoice Germany) defines a document, which contains an
invoice in a human readable (PDF/A-3) and a machine readable format
(XML). By using the PDF/A-3 standard the created file satisfies long-term
archiving regulations.
With pdfaPilot it is possible to embed such an ZUGFeRD-XML file (cre-
ated by an electronic billing or accounting system) into a PDF, setting the
required ZUGFeRD-XMP metadata and making the PDF a valid PDF/A-3 in
one run.
--zugferd --create=<ZUGFeRD XML file> <PDF file>
Validate a PDF and the containing XML against the ZUGFeRD specification:
--zugferd <PDF file>
Extract the embedded XML from a ZUGFeRD PDF file:
--zugferd --extract <PDF file>
Create several reports from a ZUGFeRD invoice:
--zugferd --export=[<option>,<option>,...]
[--resolution=<resolution in ppi>] [--imgformat=<image
format>] <PDF file>
Options for ZUGFeRD reports:
NOPDFIMAGE
No images from the PDF pages
NOXML
XML invoice is not extracted
NOHTML
No HTML view of the XML
NOHTMLSYNOPSIS
No synopsis of PDF images and XML
NOVALIDATIONREPORT
No ZUGFeRD validation report
Addtional parameters for the export of PDFIMAGES:
RESOLUTION IN PPI
optional, resolution in ppi or width x height
in pixel, e.g. 1024x800 (default: 72)
IMGFORMAT
optional, JPEG, PNG, TIFF, PDF
(default: JPEG)
Report creation
For each pdfaPilot CLI run several reports may be generated by inserting
--report or -r switches into the pdfaPilot call. Following all options and
reporttypes are listed. The options of --report are treated case insensi-
tive and have to be separated by commas.
--report=[<type>,][<trigger>,][<options>,]<PATH=path>
Parameters
type
Optional, see "Report types and their
options"
trigger
Optional, see "Report triggers"
options
Optional, see "Report types and their
options"
path
See "Report path"
52
Page 23
Manual
pdfaPilot CLI
a
© 1996-2015 by callas software gmbh · Schönhauser Allee 6/7 · D 10119 Berlin · Germany · info@callassoftware.com · www.callassoftware.com
Report types and their options
HTML (default)
A html file is created. The format may be modified by combining this
option with other options. It can be opened by any webbrowser.
Additional options for HTML reports
All following switches may be simultaneously used in order to add differ-
ent types of additional content.
NOICONS
Create a report without any images
NOCORRECTIONS
Do not log corrections
NODETAILS
Suppress details for the occurences
OPENRESULT
All entries in the report are opened
in Initial view (closed by default if
JavaScript is enabled)
Set the path for referenced objects
--linkpath
HTML reports are generated without exporting referenced objects. This
option requires a path (URL) to a folder where the referenced objects
reside (Default: folder "\etc\reporttemplate" in pdfaPilot CLI directory)
Example:
--linkpath="file:\\\Programme\pdfaPilot\etc\
reporttemplate"
Customize your report
If you create a HTML report, you can completely customize it by adapting
the CSS-File to your needs. You can even exchange the pictures.
You can find all material used for the HTML reports within the folder "\etc\
reporttemplate" in your pdfaPilot CLI directory.
XML
XML file which is intended to be processed with software (parsers). The
scheme of the XML report structure can be found within the xsd-file stored
in "\var\XMLV2 report schema\".
MHT
A mht file is created. MHT is a data format created by Microsoft which
offers the possibility to include all resources (like style sheets, images and
JavaScripts) to be included in one file. This file type can only be read by
Internet Explorer.
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. A predefined template can be
found in the Server/CLI path:
../var/Reports/Templates
48
Page 24
Manual
pdfaPilot CLI
a
© 1996-2015 by callas software gmbh · Schönhauser Allee 6/7 · D 10119 Berlin · Germany · info@callassoftware.com · www.callassoftware.com
Report triggers
ALWAYS
Always create a report (default)
IFNOPDFA
Create a report only if the file can-
not be converted to PDF/A
IFPDFA
Create a report only if the file can be
converted to PDF/A
Report path
--report=<Report type>,<Report options>,PATH=<Path>
Full path of report file – the report path must not contain any commas.
!PATH= must always be the last element.
Example:
--report=HTML,NOICONS,OPENRESULT,PATH=C:\Sample.html
Set the report language
-l --language=<language>
Defines the language in which the report is generated. Default language is
English (en). The language is specified by using a two digit abbreviation.
The following values can be used in the standard configuration:
Parameters
EN
English
DE
German
FR
French
IT
Italian
ES
Spanish
JA
Japanese
Command line output
Display progress
--noprogress
Switch off progress information.
Display hits
--nohits
Switch off output of hits (errors, warnings, information).
Display summary
--nosummary
Switch off summary information.
.NET PDF SDK | Read & Processing PDF files provided by this .NET Imaging PDF Reader Add-on Able to convert PDF documents into other formats Include extraction of text, hyperlinks, bookmarks and metadata;
excel hyperlink to pdf bookmark; bookmarks in pdf
42
Page 25
Manual
pdfaPilot CLI
a
© 1996-2015 by callas software gmbh · Schönhauser Allee 6/7 · D 10119 Berlin · Germany · info@callassoftware.com · www.callassoftware.com
Display timestamp
--timestamp
Show a timestamp for each line of command line output.
Further options
Quick processing
-q --quick
Processing is stopped after the first detection of an error in the corrected
PDF (only applied if no report is generated).
Define the overwrite mode
--overwrite
New files override existing files with the same name (applies to report files
and to created PDF files).
Create output files only for successful conversion
--onlypdfa
Create an output file only if the file could be converted to PDF/A.
Set the result path
! If neither an output path nor an output folder is defined, any result
will be created next to the input file (default: input file name with
suffix _PDFA or _NOPDFA, will be indexed if necessary).
! The use of --outputfile together with --outputfolder is not sup-
ported within one CLI call.
Path to output file
-o --outputfile=<path>
Defines the absolute path of the destination file. The parent folder must
exist.
! Consult section "Results" to see if a new file was created.
Parameters
path
absolute path to output file
Path to output folder
-f --outputfolder=<path>
Defines an absolute path to a folder where the files resulting of an execu-
tion are stored.
Parameters
path
absolute path to output folder Out-
put file
48
Page 26
Manual
pdfaPilot CLI
a
© 1996-2015 by callas software gmbh · Schönhauser Allee 6/7 · D 10119 Berlin · Germany · info@callassoftware.com · www.callassoftware.com
Use an additional profile
--profile
Run additional checks and fixups by defining a full path to a kfp or kfpx
file (exported from pdfToolbox / pdfaPilot Desktop or Preflight in Adobe
Acrobat). The input file is converted if no warnings or errors occur.
Using response files
To keep the command line call structured and straightforward, pdfaPilot
CLI supports the usage of response files. These offer the possibility to
define each command line switch line by line and also add some comments.
Example
Response file analyze.rsp:
###################
# PDF/A analysis
#
--analyze
#
###################
# EOF
Command line call:
pdfaPilot @analyze.rsp <PDF file>
Structure of command line output
Checks
Hit Type of hit Name of check [Name of font] [Name of glyph]
1. Hit
• always visible
• keyword
2. Type of hit
• always visible
• possible values: "PDFA", "Error", "Info", "Warning" (only for additional
profile)
3. Name of check
• always visible
• never empty
4. Name of font
• only visible for hits that belong to a font check
• can be empty
5. Name of glyph
• only visible for hits that belong to a font check
• can be empty
Corrections
Fix
Name of fixup
[Name of font]
30
Page 27
Manual
pdfaPilot CLI
a
© 1996-2015 by callas software gmbh · Schönhauser Allee 6/7 · D 10119 Berlin · Germany · info@callassoftware.com · www.callassoftware.com
1. Fix
• always visible
• keyword
2. Name of fixup
• always visible
• never empty
3. Name of font
• only visible for fixups that belong to a font correction
• can be empty
Failed corrections
FixFailure Name of fixup
[Name of font]
1. FixFailure
• always visible
• keyword
2. Name of fixup
• always visible
• never empty
3. Name of font
• only visible for fixups that belong to a font correction
• can be empty
Progress
Progress
Value
%
60
Page 28
Manual
pdfaPilot CLI
a
© 1996-2015 by callas software gmbh · Schönhauser Allee 6/7 · D 10119 Berlin · Germany · info@callassoftware.com · www.callassoftware.com
Results
Return codes and their usage
All return codes below 100 indicate a successful operation.
When executing kfpx profiles
0
No hit, no fixups executed
1
At least one hit with severity 'info',
no fixups executed
2
At least one hit with severity 'warn-
ing', no fixups executed
3
At least one hit with severity 'error',
no fixups executed
5
No hit, fixups have been executed
6
At least one hit with severity 'info',
fixups have been executed
7
At least one hit with severity 'warn-
ing', fixups have been executed
8
At least one hit with severity 'error',
fixups have been executed; fixup
failed
When executing in pdfa mode
0
PDF is valid PDF/A-file additional
checks wihtout problems
1
PDF is valid PDF/A-file but addi-
tional checks with problems – sever-
ity info
2
PDF is valid PDF/A-file but addition-
al checks with problems – severity
warning
3
PDF is valid PDF/A-file but addition-
al checks with problems – severity
error
4
PDF is not a valid PDF/A-file
When executing an e-mail conversion
0
Successful conversion to PDF/A
2
PDF is valid PDF/A file, but some
attachments of the converted e-mail
are missing
4
E-mail was converted to PDF, but is
not a valid PDF/A-file
73
Page 29
Manual
pdfaPilot CLI
a
© 1996-2015 by callas software gmbh · Schönhauser Allee 6/7 · D 10119 Berlin · Germany · info@callassoftware.com · www.callassoftware.com
When executing the compare action
0
Compared PDFs are equal
1
Compared PDFs have differences
Other commands or actions
0
Successful operation
Errors:
100
Not serialized (no valid serialization
found or keycode expired)
101
Command line parameter error
102
Command line syntax error (illegal
command)
103
Unknown error (internal error)
104
A file could not be opened
105
An encrypted PDF file could not be
opened for writing
106
A file could not be saved
! On a Windows computer the return code may be accessed by using the
system variable errorlevel, on a Linux/Sun Solaris/MacOS computer $?
can be used.
Errors for distributed processing
110
Action is not distributable
111
No Dispatcher was found
112
No Satellite was found or is ready
for execution
130
Execution is cancelled after timeout
Reason codes
1000
Unknown reason
1001
A parameter is wrong
1002
A requested file could not be found
1003
A requested folder could not be
found
1004
A requested folder is a file
1005
A requested file is a folder
1006
30 days trial period expired
1007
Time limited keycode expired
1008
Invalid activation
1009
PDF does not contain ICC profiles
1010
A file could not be opened
1011
An encrypted PDF file could not be
opened for writing
1012
A file could not be saved
45
Page 30
Manual
pdfaPilot CLI
a
© 2015 by callas software gmbh · Schönhauser Allee 6/7 · D 10119 Berlin · Germany · info@callassoftware.com · www.callassoftware.com
Run as a Server / Distributed Processing
Start as a Server
callas pdfaPilot Server/CLI can also be used for processing hotfolders on
platforms, where no user interface for the configuration of the require set-
tings is available (like Linux, SunSparc, SunIntel).
Remote access is not available for AIX.
This possiblity to start a Server without a user interface is available on
MacOS and Windows also of course.
First, the pdfaPilot CLI has to be started in server mode:
--server [--quiet] [--accesskey=accesskey]
[--port=port] [--cachefolder=cachefolder]
Options
--quiet
optional, suppresses outpput
--accesskey
optional, sets a accesskey for restricting the pos-
sibilty to change configuration using the server
user interface
--port
optional, defines the port for communication
between CLI and server user interface via the
network (Default: 1302)
--cachefolder
optional, defines the path to cachefolder
Example:
--server --port=1302 --accesskey=123456
For setting up a job for hotfolder processing, connect to the remote server
using any pdfaPilot Desktop installation in the same network:
After entering the accesskey, new jobs can be configured, started or
stopped. Profiles and Settings will be transfered to the remote server,
where the are stored at
/usr/share/callas software
(path must be writable)
If this location can not be used caused by limitations on the respective
environment, the additional option --cachefolder can be used for defining
a custom path when starting the server:
Example:
--server --port=1302 --cachefolder=<PATH>
All paths defined for hotfolder processing need to be entered manually
and have to be valid path specifications. (Hotfolder paths of any remote
Documents you may be interested
Documents you may be interested