PDFUnit provides utility programs to extract several parts of a PDF document into separate files, which can then be used in tests. These programs are not described in this manual, to avoid redundant documentation. Follow the link to the PDFUnit-Java manual http://www.pdfunit.com/en/documentation/java/ to read the details. The following utilities are available:
# Utility programs belonging to PDFUnit:
#
# The detailed descriptions can be found in the manual of PDFUnit-Java (to avoid redundancy).
# The names of the methods are exactly the same.
#
# see http://www.pdfunit.com/en/documentation/java/
#
ConvertUnicodeToHex
ExtractBookmarks
ExtractEmbeddedFiles
ExtractFieldInfo
ExtractFontInfo
ExtractImages
ExtractJavaScript
ExtractNamedDestinations
ExtractSignatureInfo
ExtractXFAData
ExtractXMPData
ExtractZugferdData
RenderPdfPageRegionToImage
RenderPdfToImages
The utility programs generate files. Their names are derived from those of the input files. The following rules are used to avoid naming conflicts with existing files:
Generated file names start with an underscore.
The names have two suffices. The penultimate is .out
and the last one is the typical suffix for the kind of file type.
For example, when you extract bookmarks from foo.pdf
,
the file _bookmarks_foo.out.xml
is created. Rename it
before using it in a test, because then it is no longer an output file.
The Windows batch scripts in the following chapters demonstrate how to start the programs. These scripts are part of the PDFUnit release, but you have to adapt most of their content to your environment anyway: you need to set the classpath, input file and output directory.
When you start a program without parameters or with incorrect parameters, PDFUnit shows a message detailing the corect command line parameters.