6.1Reporting Problem .................................................................................................................... 180
6.2Contact Information .................................................................................................................. 180
Foxit PDF Toolkit User Manual
www.foxitsoftware.com
1 Introduction to Foxit PDF Toolkit
Foxit PDF Toolkit consists of a series of command line tools to perform batch PDF generation and
processing. It includes ten modules: Image2PDF, Office2PDF, PDFWatermark, PDFHeaderFooter,
PDFOptimizer, PDFRedactor, PDFMetadata, PDF2Text, Text2PDF and RMS. Each module offers a simple-
to-use API for users who want to perform PDF manipulation through API.
In this manual, we will introduce the modules: Image2PDF, Office2PDF, PDFWatermark,
PDFHeaderFooter, PDFOptimizer, PDFRedactor, PDFMetadata, PDF2Text and Text2PDF. For the RMS PDF
Protection module, the user manual will cover in detail the module’s basic syntax in section 3.10 “RMS”.
Browse to the “rms” folder in the installation package for a more detailed introduction.
Image2PDF is an easy-to-use command line tool used to batch convert large volumes of image files into high-
quality PDF files, without needing to install any additional software. Image2PDF currently supports the
following image formats: BMP, PNG, JPEG, JPX, GIF, TIFF (or TIF, including the image with a single page or
multiple pages). This module provides many features to customize the output properties of the generated
PDF files.
Office2PDF batch converts Microsoft Office documents into professional-quality PDF files. Microsoft Office
must be installed, because the Office2PDF tool saves the converted PDF files using the Microsoft Office
Engine. Office2PDF currently supports the more popular document formats, which includes doc, docx, xls,
xlsx, ppt and pptx. Additionally, the tool can convert and create professional-quality PDF files that support
PDF/A Standard compliances.
PDFWatermark allows users to batch add a watermark into PDF files, without needing to install any
additional software. The PDFWatermark tool applies a pre-made watermark to PDF files, which supports
watermarks in both text or image formats. The watermark is saved as a configuration file with the extension
“.xml”, which is generated by the build-in Foxit Configuration Tool (Either fpdfwmconf.exe or
fpdfwmconf64.exe, a GUI application, depending on your operating system).
PDFWatermark allows users to batch add a watermark into PDF files, without needing to install any
additional software. The PDFWatermark tool applies a pre-made watermark to PDF files, which supports
three types of watermarks: text, image and PDF. The watermark is saved as a configuration file with the
extension “.xml”, which is generated by the build-in Foxit Configuration Tool (Either fpdfwmconf.exe or
fpdfwmconf64.exe, a GUI application, depending on your operating system).
1
Foxit PDF Toolkit User Manual
www.foxitsoftware.com
PDFHeaderFooter batch adds header/footer into large volumes of PDF files, without needing to install any
additional software. The PDFHeaderFooter tool applies pre-made header/footer to PDF files. The headers
and footers are saved as a configuration file with the extension “.xml”, which is generated by the build-in
Foxit Configuration Tool (Either fpdfhfconf.exe or fpdfhfconf64.exe, a GUI application, depending on your
operating system).
PDFOptimizer batch reduces the size of PDF files to reduce disk space, making them easier to share or
archive, without needing to install any additional software. This tool optimizes PDF files by downsampling or
compressing images, unembedding fonts, and discarding objects or user data. PDFOptimizer offers some
options to clean up PDF files, such as using Flate to encode streams that are not encoded, converting LZW
encoding to Flate encoding, and removing invalid bookmarks and invalid links.
PDFRedactor batch removes sensitive content or private information from your PDF documents prior to
making them available to others, without needing to install any additional software. With PDFRedactor, users
can use redaction marks to redact or remove the sensitive contents that are visible in a PDF document and
can specify custom text to appear over the redaction marks.
PDFMetadata batch adds document metadata information to PDF files, without needing to install any
additional software. With PDFMetadata, users can set the title, author, subject, keywords and creator of PDF
files, and view the metadata information.
PDF2text batch converts large volumes of PDF files into plain text files, without needing to install any
additional software. With PDF2Text, users can extract text content from a textual PDF file and save the text
as a plain text file, which is useful for text indexing or content retrieval.
Text2PDF batch converts large volumes of plain text files into high-quality PDF files with a minimum loss of
formatting information, without needing to install any additional software. This tool converts plain text to
PDF files including settings of the page size, page margin, font style, font size, font color, password, and
metadata.
1.1 Why Foxit PDF Toolkit is your choice
Foxit is an Amazon-invested leading software provider of solutions for reading, editing, creating, organizing,
and securing PDF documents. Foxit PDF Toolkit is a suite of modules to perform high volume PDF creation
and processing on Windows servers. These modules help IT organizations develop workflows to process large
amounts of PDF files. They also provide libraries for software development groups to incorporate PDF
processing into their applications. Customers choose this product for the following reasons:
2
Foxit PDF Toolkit User Manual
www.foxitsoftware.com
High performance – Multi-threading support speeds up the PDF processing based on today's server
architectures.
Professional quality – Professional-quality on PDF manipulation and PDF conversion.
Lightweight footprint – Lower memory usage and faster installation.
Perfect message mechanism – Gives more perfect message hints if users encounter problems when
using the tools, so Foxit PDF Toolkit can offer better user experience.
Robust and stable – Ensures smooth running of the application and enhancement of fault tolerant.
Easy to integrate – Command line or application interfaces enable flexible and seamless integration
with user's existing workflows.
Plug and Play – Choose one or more of the specific modules that meet your needs.
Foxit offers 24/7 support for its products and are fully supported by the PDF industry’s largest development
team of support engineers. Updates are released on a regular basis to improve user experience by fixing bugs
and adding new features and functionalities. Foxit PDF Toolkit is the best solution for PDF batch processing
and integration of high performance features at a low cost!
1.2 Foxit PDF Toolkit Features
1.2.1 Image2PDF Features
Batch convert image files into PDF files in server environments.
Support multi-thread processing.
Support sub-folder recursion processing.
Support single-file processing, single-folder processing and multi-file processing.
Support various image formats like BMP, PNG, JPEG, JPX, GIF and TIFF (TIF).
Convert multiple image files into one PDF file, or individual PDF files.
Specify any resolution (DPI) for the PDF file to be converted.
Set page width and height for the PDF file to be converted.
Set open password for the PDF file to be converted.
Add bookmarks to the PDF file to be converted.
Set margin for each PDF page.
Set document metadata information of PDF files, such as the title, subject, keywords, author and
creator.
Support wildcard character in batch conversion, e.g., *.jpg, *.png.
Offer simple-to-use API.
3
Foxit PDF Toolkit User Manual
www.foxitsoftware.com
1.2.2 Office2PDF Features
Batch convert Microsoft Office files into PDF files in server environments.
Support multi-thread processing.
Support sub-folder recursion processing.
Support single PDF file processing or single-folder processing.
Support password-protected Microsoft Office files.
Support the popular Microsoft Office document formats, including doc, docx, xls, xlsx, ppt and pptx.
Add bookmarks to PDF files converted only from Microsoft Word documents.
Support scale options for Microsoft Excel conversion.
Convert every sheet of a Microsoft Excel document into a single PDF file.
Retain hyperlinks in PDF files from Microsoft Office files.
Support wildcard character in batch conversion, e.g., *.docx, *.pptx.
Support PDF/A Standard for the PDF file to be converted.
Offer simple-to-use API.
1.2.3 PDFWatermark Features
Batch add a watermark into PDF files.
Support multi-thread processing.
Support sub-folder recursion processing.
Support single PDF file processing or single-folder processing.
Support password-protected PDF files.
Support text, image, and PDF watermarks.
Support stylized text watermarks that include font, font size, font color and underline settings.
Support image watermarks in various formats (BMP, DIB, JPG, JPEG, JPE, GIF, TIF, PNG, and TIFF).
Support one page and multi-page PDF watermarks.
Rotate watermark in 360 degree rotations.
Set opacity for watermarks.
Scale relative to target page for watermarks.
Control the visibility of watermarks when printing.
Control the visibility of watermarks when being displayed on screen.
Keep watermark position and size for different page sizes.
Appear on top or in the background of the page.
Set watermark position in PDF page.
Specify a page range to add watermark.
Set document metadata information of PDF files, such as the title, subject, keywords, author and
creator.
4
Foxit PDF Toolkit User Manual
www.foxitsoftware.com
Support wildcard character in batch processing, e.g., *.pdf.
Preview watermark in the build-in Foxit Configuration Tool.
Offer simple-to-use API.
1.2.4 PDFHeaderFooter Features
Batch add header/footer into PDF files.
Support multi-thread processing.
Support sub-folder recursion processing.
Support single PDF file processing or single-folder processing.
Support password-protected PDF files.
Support stylized text for the header/footer, including font, font size, font color, underline and
embedded font settings.
Support margins settings.
Shrink a document to avoid overwriting the document’s text and graphics.
Keep position and size of header/footer constant on different page sizes.
Set page number and date as header/footer.
Support page number and date format settings.
Specify the page range to add header/footer.
Set document metadata information of PDF files, such as the title, subject, keywords, author and
creator.
Support wildcard character in batch processing, e.g., *.pdf.
Preview header/footer in the build-in Foxit Configuration Tool.
Offer simple-to-use API.
1.2.5 PDFOptimizer Features
Batch optimize PDF files.
Support multi-thread processing.
Support sub-folder recursion processing.
Support single PDF file processing or single-folder processing.
Support password-protected PDF files.
Support downsampling and compression for color/grayscale and monochrome images.
Unembed fonts in PDF files.
Discard objects and user data of PDF files:
Discard all form submission, import and reset actions.
Flatten form fields.
Discard all JavaScript actions.
Discard embedded page thumbnails.
5
Foxit PDF Toolkit User Manual
www.foxitsoftware.com
Discard embedded print settings.
Discard bookmarks.
Discard all comments, forms and multimedia.
Discard external cross references.
Discard document information and metadata.
Discard file attachments.
Discard private data of other applications.
Clear up PDF files:
Discard all form submission, import and reset actions.
Use Flate to encode streams that are not encoded.
In streams that use LZW encoding, use Flate instead.
Remove invalid bookmarks.
Remove invalid links.
Set document metadata information of PDF files, such as the title, subject, keywords, author and
creator.
Support wildcard character in batch processing, e.g., *.pdf.
Offer simple-to-use API.
1.2.6 PDFRedactor Features
Batch redact or remove sensitive content from PDF files.
Support multi-thread processing.
Support sub-folder recursion processing.
Support single PDF file processing or single-folder processing.
Support password-protected PDF files.
Option to set the search keyword mode for specific words/phrases or patterns.
Specify the characters of keyword you want to redact.
Set a page range to apply redaction.
Set a fill color to mark redaction.
Overlay redaction marks with specified text.
Set the alignment of the overlay text.
Set the font style of the overlay text.
Set the font size of the overlay text.
Set the font color of the overlay text.
Set document metadata information of PDF files, such as the title, subject, keywords, author and
creator.
Support wildcard character in batch processing, e.g., *.pdf.
Offer simple-to-use API.
6
www.foxitsoftware.com
1.2.7 PDFMetadata Features
Batch add document metadata information to PDF files.
Support multi-thread processing.
Support sub-folder recursion processing.
Support single PDF file processing or single-folder processing.
Support password-protected PDF files.
Set the title of PDF files.
Set the subject of PDF files.
Set the keywords of PDF files.
Set the author of PDF files.
Set the creator of PDF files.
View PDF metadata information.
Support wildcard characters in batch processing, e.g., *.pdf.
Offer simple-to-use API.
Foxit PDF Toolkit User Manual
1.2.8 PDF2text Features
Batch convert PDF files into plain text files.
Support multi-thread processing.
Support sub-folder recursion processing.
Support single-file processing and single-folder processing.
Support password-protected PDF files.
Specify a page range you want to extract text from.
Get the total number of characters on each page.
Print the characters number of each page to the screen.
Option to retain PDF page layout.
Option to retain the page break of PDFs.
Option to convert each PDF page into individual text files.
Support UTF8 and UTF16 text encoding.
Support wildcard character in batch processing, e.g., *.pdf.
Offer simple-to-use API.
1.2.9 Text2PDF Features
Batch convert text files into PDF files.
Support multi-thread processing.
Support sub-folder recursion processing.
Support single-file processing and single-folder processing.
7
Foxit PDF Toolkit User Manual
www.foxitsoftware.com
Support most commonly used languages.
Set page width and height for the PDF file to be converted.
Set margin for each PDF page.
Support font style, font size and font color settings.
Set open password for the PDF file to be converted.
Set document metadata information of PDF files, such as the title, subject, keywords, author and
creator.
Support wildcard character in batch processing, e.g., *.txt.
Offer simple-to-use API.
1.3 Common Use Case Scenarios
1.3.1 Image2PDF Use Case Scenarios
Batch convert images into PDF files in server environments for better image management.
Create electronic books for users to scan paper documents to image files, and then convert them
into a single PDF file.
Make image albums for users to collect their photos and then convert them into a single PDF file.
1.3.2 Office2PDF Use Case Scenarios
Batch convert Microsoft Office files into PDF files in server environments.
Set the converted PDF files to be compliant with PDF/A standard for better archiving.
1.3.3 PDFWatermark Use Case Scenarios
Batch add a watermark into PDF files to protect users and their copyrights. Users can use company
logos, author signatures, products, PDF files or web addresses as watermarks to protect their PDF
files.
Label PDF file status for better management. Users can easily label status of their PDF files, such as
approved, draft, final or confidential. For example, label “Confidential” on PDF pages that include
sensitive information or “Draft” on a preliminary PDF document to be distributed for review.
1.3.4 PDFHeaderFooter Use Case Scenarios
Batch add header/footer into PDF files to include information such as the date, page numbers, or the
title of the document.
8
Foxit PDF Toolkit User Manual
www.foxitsoftware.com
1.3.5 PDFOptimizer Use Case Scenarios
Batch optimize large PDF files for electronic document exchange or space-saving document archiving
in server environments. Large PDF files are not suitable for electronic document exchange or
document archiving. Users can optimize large PDF documents instead of converting them into other
formats.
1.3.6 PDFRedactor Use Case Scenarios
Batch redact or remove sensitive content or private information from PDF files. Users can redact or
remove sensitive text that are visible in PDF documents before distributing them to others, which
could also help prevent the receivers from tracing the documents back to the sender.
1.3.7 PDFMetadata Use Case Scenarios
Batch add document metadata information to PDF files. Users can set the title, author, subject,
keywords and creator of PDF files, which could help them to find particular documents through
searching these descriptions. For example, the keywords can be particularly useful for narrowing
searches.
1.3.8 PDF2Text Use Case Scenarios
Batch convert PDF files into plain text files for better archiving and indexing PDF files. It is indeed
helpful for text indexing and content retrieval by creating a full-text searchable archive database.
1.3.9 Text2PDF Use Case Scenarios
Batch convert plain text files into PDF files for better viewing or editing. It is not easy for users to
view or edit plain text files, and in this case, users can convert them into PDF files for further
processing.
1.4 System Requirements
Windows Platform:
Windows Server 2012
Windows Server 2008 R2
Windows Server 2003
9
Foxit PDF Toolkit User Manual
www.foxitsoftware.com
Windows 10
Windows 8.1
Windows 7
Windows Vista
Note For the Office2PDF tool, please make sure that you have already installed Microsoft Office 2007 SP2 or
later, and the virtual printers. If Microsoft Office 2007 is not the SP2 version, please download the “Microsoft
Save as PDF” plugin fromhttp://www.microsoft.com/en-us/download/details.aspx?id=9943.
1.5 About This Manual
This manual aims at introducing the command line usage of Foxit PDF Toolkit. It is intended for the audiences
who want to batch generate or process PDF files in server environments.
Section 1: gives an introduction of Foxit PDF Toolkit.
Section 2: illustrates how to install and uninstall Foxit PDF Toolkit.
Section 3: describes basic usage of Foxit PDF Toolkit.
Section 4: introduces Foxit Configuration Tool of PDFWatermark and PDFHeaderFooter modules.
Section 5: shows how to work with API.
Section 6: provides support information.
10
Foxit PDF Toolkit User Manual
www.foxitsoftware.com
2 Installing and Uninstalling Foxit PDF Toolkit
2.1 Installation
Installation of Foxit PDF Toolkit is straightforward. You can download the trial release package, which is a zip
file from our website (www.foxitsoftware.com), and then extract the package to the desired location as
shown in the following figure. In this manual, we rename the package “pdftools” and unzip it to the directory
“C:\pdftools”. The package contains:
configtool: configuration tools for pdfwatermark and pdfheaderFooter
doc: user manual for Foxit PDF Toolkit
include: header file for Foxit PDF Toolkit
lib: third-part libraries and databases for Foxit PDF Toolkit
rms: RMS command line tool
samples: some batch samples for Foxit PDF Toolkit
testfiles: testfiles for Foxit PDF Toolkit
Foxit PDF Toolkit package
11
Foxit PDF Toolkit User Manual
www.foxitsoftware.com
After that, open a terminal session and change the directory to the installation location to run your
application (except for PDFWatermark and PDFHeaderFooter modules, which are used only after using the
Foxit Configuration Tool to generate configuration file containing the setting information of watermark or
header/footer). For the Office2PDF module, please make sure that you have already installed Microsoft
Office 2007 SP2 or later, and the virtual printers. If Microsoft Office 2007 is not the SP2 version, please
download the “Microsoft Save as PDF” plugin from http://www.microsoft.com/en-
us/download/details.aspx?id=9943.
Tips: You can set the installation path to Environment Variables, which allows you to use the commands in
the terminal window directly without needing to change the directory to the installation location. Go to
Start-> Control Panel-> System-> Advanced system settings -> Advanced -> Environment Variables, in the
“User variables for Administrator” box, select PATH and Edit, and then add the installation path as shown in
the following figure. If the environment variable “path” does not exist, create it by clicking New.
Set installation path to Environment Variables
2.2 Evaluation
The Foxit PDF Toolkit is distributed on a “try-before-you -buy” basis. Foxit allows users to download trial
version to evaluate the features. You have a free 30-day trial, but the pages of all created PDF files will
contain our watermark, and for the PDF2Text module, you can only convert first ten PDF pages into plain text
12
Foxit PDF Toolkit User Manual
www.foxitsoftware.com
files. After the evaluation period, customers that want to continue to use the product should contact Foxit
sales team to purchase corresponding activation codes for the desired modules.
2.3 Registration
When you get the activation code for the module you want to purchase, please use the argument “-register
<code> <licensee>” to active it in the command line window. For example, assume you get the activation
code (77505-010G0-91000-PN37T-4Z8GS-0JKC3) for the Image2PDF module, you may type “fimg2pdf -
register 77505-010G0-91000-PN37T-4Z8GS-0JKC3 FoxitTest” in the command line window as shown below.
Here, “FoxitTest” is the name of the licensee you designated. After activation, a key file named “ftlkey.txt”
will be generated in the installed path with the contents shown in the following figure.
Then you can run “-fimg2pdf -license” in the command line window to check the license agreement as
follows.
13
Foxit PDF Toolkit User Manual
www.foxitsoftware.com
2.4 About License
Foxit PDF Toolkit provides three types of licenses for customers to choose.
Desktop License- It is only available on desktop systems, which is perfect for personal or small
business use. Each license is good for one user on one machine.
Server License- It is available on servers, with 8 CPUs, which is good for small-to medium-sized
businesses that need higher performance on a single server. If your server has more than 8 CPUs,
please contact Foxit sales team to purchase Enterprise License.
Enterprise License- It is intended for large companies that need to process a large number of PDF
documents on multiple high-performance servers. Enterprise License also includes features for
integrating the Foxit PDF Toolkit into your own applications. Please contact Foxit sales team to
purchase Enterprise License.
2.5 Uninstallation
If you want to uninstall the Foxit PDF Toolkit, all you need to do is to delete the installed folder.
14
Foxit PDF Toolkit User Manual
Option
Parameter
Description
-i
<-i <string>>
e.g.
-i c:\input\1.jpg
-i “c:\input\1.jpg” “c:\
input\2.tif”
Specifies the input file to be converted.
The input string can be the name of a single image