Foxit PDF Toolkit User Manual [nl]

www.foxitsoftware.com
Foxit PDF Toolkit User Manual
Foxit PDF Toolkit User Manual
www.foxitsoftware.com
Table of Contents
1 Introduction to Foxit PDF Toolkit ..................................................................................... 1
1.1 Why Foxit PDF Toolkit is your choice ............................................................................................ 2
1.2 Foxit PDF Toolkit Features ............................................................................................................ 3
1.3 Common Use Case Scenarios ........................................................................................................ 8
1.4 System Requirements ................................................................................................................... 9
1.5 About This Manual ...................................................................................................................... 10
2 Installing and Uninstalling Foxit PDF Toolkit .................................................................. 11
2.1 Installation .................................................................................................................................. 11
2.2 Evaluation ................................................................................................................................... 12
2.3 Registration ................................................................................................................................. 13
2.4 About License .............................................................................................................................. 14
2.5 Uninstallation .............................................................................................................................. 14
3 Command Line Usage .................................................................................................... 15
Foxit PDF Toolkit User Manual
www.foxitsoftware.com
3.1 Image2PDF .................................................................................................................................. 15
3.2 Office2PDF .................................................................................................................................. 29
3.3 PDFWatermark ............................................................................................................................ 40
3.4 PDFHeaderFooter........................................................................................................................ 50
3.5 PDFOptimizer .............................................................................................................................. 62
3.6 PDFRedactor ............................................................................................................................... 78
3.7 PDFMetadata .............................................................................................................................. 97
3.8 PDF2Text ................................................................................................................................... 108
3.9 Text2PDF ................................................................................................................................... 121
Foxit PDF Toolkit User Manual
www.foxitsoftware.com
3.10 RMS ........................................................................................................................................... 135
4 Foxit Configuration Tool .............................................................................................. 136
4.1 Watermark Configuration Tool ................................................................................................. 136
4.2 PDFHeaderFooter Configuration Tool ....................................................................................... 139
5 Working with API ........................................................................................................ 143
5.1 Image2PDF ................................................................................................................................ 144
5.2 Office2PDF ................................................................................................................................ 148
5.3 PDFWatermark .......................................................................................................................... 152
5.4 PDFHeaderFooter...................................................................................................................... 155
5.5 PDFOptimizer ............................................................................................................................ 158
5.6 PDFRedactor ............................................................................................................................. 162
5.7 PDFMetadata ............................................................................................................................ 167
5.8 PDF2Text ................................................................................................................................... 171
Foxit PDF Toolkit User Manual
www.foxitsoftware.com
5.9 Text2PDF ................................................................................................................................... 174
6 Support....................................................................................................................... 180
6.1 Reporting Problem .................................................................................................................... 180
6.2 Contact 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 from http://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
file (.bmp, .png, .jpg, .jpx, .gif, .tif, .tiff), multiple
image files, or a folder.
www.foxitsoftware.com

3 Command Line Usage

3.1 Image2PDF

3.1.1 Basic Syntax

fimg2pdf <-i <srcfile/srcfolder>> <-o <destfile/destfolder>> [[-width <PDF width>] [-height <PDF height>]]
[-dpi <resolution>] [-margin <left [top right bottom]>] [-b] [-sp <password>]
[-title <title>] [-subject <subject>] [-keywords <keywords>] [-author <author>] [-creator <creator>]
[-r [recursion]] [-t <thread>] [-log <logfile>] [-l <level>]
fimg2pdf -register <code> <licensee>
fimg2pdf -license
fimg2pdf -version/-v
fimg2pdf -help/-h
Note:
<> required [ ] optional / mutually exclusive A space is needed between the command line argument and the value
Only the <-i <srcfile/srcfolder>> and <-o <destfile/destfolder>> arguments are actually required. All others are
optional, which are available for controlling the output PDF files as desired. The arguments could be given in
any order. Full details on each are explained in the following section.

3.1.2 Command Line Summary

Note For some arguments whose values are strings, users can choose whether to add quotation marks (“ ”)
to the strings. In the manual we have added notes where adding quotation marks (“ ”) is required.
15
www.foxitsoftware.com
Option
Parameter
Description
-i c:\input
-i “c:\input\*.jpg”
The file name can contain the wildcard character
(*). For example, use *.tiff to include all TIFF image
files in a given folder.
Note Wildcard character (*.*) is currently not
supported.
-o
<-o <string>>
e.g.
-o d:\output\one.pdf
-o d:\output
Specifies the path of the output PDF file or folder.
If user specifies a path of a PDF file, (e.g. -o
d:\output\one.pdf), all input image files will be
combined into a single PDF file.
If user specifies a path of a folder, (e.g. -o
d:\output), every input image file will be converted
into individual PDF files.
Note The specified output path must already exist.
-width
[-width <points>]
e.g.
-width 612
Sets the page width of the output PDF file in points.
Default: Width of input image.
Note The -width and -height options must be used
together with a set value greater than 0.
-height
[-height <points>]
e.g.
-height 792
Sets the page height of the output PDF file in points.
Default: Height of input image.
Note The -width and -height options must be used
together with a set value greater than 0.
-dpi [-dpi <integer>]
e.g.
-dpi 0
-dpi 1
-dpi 300
Specifies DPI (Dots Per Inch) resolution of the output
PDF file. The default value is 72.
-dpi 0: uses the default image width and height
information.
-dpi 1: uses the DPI value of the input image. -dpi <integer>: sets the DPI resolution as the
given integer.
Note
If the program failed to get the DPI value of the
input image when the (-dpi) is set to 1, the DPI
value will be 96.
The -weight, -height and -dpi options should not be
used together.
Foxit PDF Toolkit User Manual
16
www.foxitsoftware.com
Option
Parameter
Description
If you only use -width and -dpi, or -height and -
dpi, the width or height setting will be omitted.
If you use -width, -height and -dpi, the dpi
setting will be omitted.
-margin
[-margin <points [points
points points ]>]
-margin <left [top right
bottom]>
e.g.
-margin 20
-margin 10 20
-margin 10 20 0
-margin 10 20 0 40
Sets size of margin for each PDF page in points.
Default value for each margin: 0.
Allowable values: 0-size of page in points; in addition,
the sum of the left and right values must be less than
the width of the page, and the sum of the top and
bottom values must be less than the height of the page.
-margin left top right bottom
-margin 20: sets the left margin to 20 points.
-margin 10 20: sets the left margin to 10 points and
the top margin to 20 points.
-margin 10 20 0: sets the left margin to 10 points, the
top margin to 20 points, and the right margin to 0
points.
-margin 10 20 0 40: sets the left margin to 10 points,
the top margin to 20 points, the right margin to 0
points, and the bottom margin to 40 points.
-b
[-b]
e.g.
-b
Uses the filename of the image(s) to create bookmark(s)
for the output PDF.
-sp
[-sp <string>]
e.g.
-sp 123
-sp welcome
Sets the document open password of the output PDF as
the "string". By default, there is no password.
-title
<-title <string>>
e.g.
-title “Foxit PDF Toolkit
User Manual”
Sets title of PDF files.
-subject
<-subject <string>>
e.g.
-subject “Foxit PDF Toolkit”
Sets subject of PDF files.
Foxit PDF Toolkit User Manual
17
www.foxitsoftware.com
Option
Parameter
Description
-keywords
[-keywords <string>]
e.g.
-keywords “Foxit”
Sets keywords of PDF files.
-author
[-author <string>]
e.g.
-author “Jessie”
Sets author of PDF files.
-creator
[-creator <string>]
e.g.
-creator “Foxit
PhantomPDF”
-creator “Foxit Reader”
-creator “Microsoft® Word
2013”
Sets creator of PDF files.
Note It indicates the name of the application that
created the source document from which a PDF is
generated. For example, if the source document was
created from Microsoft® Word 2013, then you can set
the creator to “Microsoft® Word 2013”.
-r
[-r [integer]]
e.g.
-r
-r 0
-r 1
-r 2
Specifies the number of layers to recurse when the
input is a folder.
-r 0 <-r>: searches the full folders. -r 1: searches only the current folder. -r 2: searches the current folder and its
sub-folders
Note
If no integer value is specified, or if the integer
value is 0, then full folders will be searched. By
default, the number of layers to recurse is 1, which
means that only the current folder will be searched
and not sub-folders.
The input folder will be skipped if it is secured and
the messages will be displayed.
-t
[-t <integer>]
e.g.
-t 1
-t 2
Specifies the number of CPU threads to use.
The default value is 1.
-log
[-log <string>]
e.g. -log d:\a.log
Writes log information into a logfile at the specified
existing path.
Foxit PDF Toolkit User Manual
18
www.foxitsoftware.com
Option
Parameter
Description
-l
[-l <integer>]
e.g.
-l 1
-l 2
-l 3
-l 4
Sets the log level. The default is 4.
-l 1: logs messages only concerning program
crashes.
-l 2: logs failure messages concerning the errors
caused during execution or those returned from
underlying libraries, as well as those for level 1.
-l 3: logs warning messages concerning the PDF
files that are overwritten, as well as those for
level 2.
-l 4: logs informational messages, as well as those
for level 3.
Note The argument (-l) is valid only when (-log) is used.
-register
[-register <String> <String>]
-register <code> <licensee>
e.g.
-register 77505-010G0-
G1000-XMQ8D-2CR7R-
TPBEI Foxit
Registers the command line tool.
<code>: the activation code from Foxit. <licensee>: the Licensee name designated by the
users.
-help/-h
[-help/-h]
e.g.
-help
-h
Prints the usage information.
-version/-v
[-version/-v]
e.g.
-version
-v
Prints the version information.
-license
[-license]
e.g. -license
Prints the license agreement.
Foxit PDF Toolkit User Manual

3.1.3 Basic Usage

3.1.3.1 Input and Output
a) Input (-i)
The input files should be a single image file, multiple image files, or a folder. Users are not able to
input multiple folders, as well as a mixture composed of folders and image files. For example:
19
Foxit PDF Toolkit User Manual
www.foxitsoftware.com
-i c:\input\1.jpg (a single image file)
-i “c:\input\1.jpg” “c:\input\2.tif” (multiple image files)
-i c:\input (a single folder)
Note If the input files are multiple image files, it is recommended to enclose each input path with
quotation marks (“ ”). In this manual, we add (“ ”) whenever the input files are multiple image files.
It supports relative paths if the input files are in the current working folder. Users can input just the
name of the image files or folder, instead of an absolute path. For example:
-i test\3.bmp (“test\3.bmp” is in the current working folder)
-i test (“test” folder is in the current working folder)
It also supports wildcard characters, which are used to process multiple image files in specified
formats. For example:
-i “c:\input\*.jpg” (Only convert images with JPG format)
-i “c:\input\*.jpg” “c:\input\*.tif” (Only convert images with JPG and TIF formats)
-i “test\*.png” (Only convert images with PNG format)
Note When using wildcard characters in the input files, it is recommended to enclose the input files
with quotation marks (“ ”). In this manual, we add (“ ”) whenever the input files contain wildcard
characters.
b) Output (-o)
There are two output formats:
Combine multiple image files into one PDF file Convert each image file into individual PDF files
If you want to combine multiple image files into one PDF file, you should specify the output path of a
PDF file. If you want to convert each image file into individual PDF files, you should specify the
output path of a folder. For example:
-o d:\output\one.pdf (Combine multiple image files into one PDF file)
-o d:\output (Convert each image file into individual PDF files)
Note The specified output path must already exist.
20
Foxit PDF Toolkit User Manual
www.foxitsoftware.com
The output also supports relative paths if the specified output location is in the current working
folder. Users can input just the name of the PDF file or output folder, instead of an absolute path. For
example:
-o output\one.pdf (“output” folder is in the current working folder)
-o output (“output” folder is in the current working folder)
When the input is one or more image files, or if it includes wildcard characters, the output should be
a single PDF file. For example, the first following line combines the “3.bmp” and “4.gif” image files
into “out.pdf” file, where the “test” and “output” folders are both in the current working folder. And
the second line combines all the “.jpg” and “.tif” image files in the “c:\input” folder into “out.pdf” in
“d:\output” folder.
fimg2pdf -i “test\3.bmp” “test\4.gif” -o output\out.pdf
fimg2pdf -i “c:\input\*.jpg” “c:\input\*.tif” –o d:\output\out.pdf
Usage Examples
1) Convert each image file into individual PDF files:
fimg2pdf -i test -o output (“test” and “output” folders are both in the current working folder)
fimg2pdf -i c:\input -o d:\output
2) Combine multiple image files into one PDF file:
fimg2pdf -i “test\3.bmp” “test\4.gif” -o output\one.pdf
fimg2pdf -i c:\input\1.jpg -o d:\output\one.pdf
fimg2pdf -i “c:\input\1.jpg” “c:\input\2.tif” -o d:\output\one.pdf
fimg2pdf -i c:\input -o d:\output\one.pdf
fimg2pdf -i “c:\input\*.jpg” -o d:\output\one.pdf
3.1.3.2 PDF/Page Settings
a) Page size setting (-width, -height)
The optional arguments (-width) and (-height) are used to set the page width and height for the
output PDF file in points.
Note The –width and –height options must be used together with a set value greater than 0.
21
Foxit PDF Toolkit User Manual
www.foxitsoftware.com
Usage Example
1) Set the page width and height to 400 and 300 for the output PDF file (-width 400 -height 300)
fimg2pdf -i “c:\input\1.jpg” “c:\input\2.tif” -o d:\output\one.pdf -width 400 -height 300
fimg2pdf -i c:\input -o d:\output -width 400 -height 300
fimg2pdf -i “c:\input\*.jpg” -o d:\output\one.pdf -width 400 -height 300
b) Resolution (DPI) setting (-dpi)
The optional argument (-dpi) is used to set the resolution for the output PDF file. By default, the DPI
(Dots Per Inch) is 72, which is the typical resolution for web images. For more details about this
argument, please refer to section 3.1.2 “Command Line Summary”.
Note
If the program failed to get the DPI value of the input image when the (-dpi) is set to 1, the
DPI value will be 96.
The options -weight, -height and -dpi should not be used together.
If you only use -width and -dpi, or -height and -dpi, the width or height setting will be
omitted.
If you use -width, -height and -dpi, the dpi setting will be omitted.
Usage Examples
1) Use the default image width and height information (-dpi 0)
fimg2pdf -i “c:\input\1.jpg” “c:\input\2.tif” -o d:\output\one.pdf -dpi 0
fimg2pdf -i c:\input –o d:\output -dpi 0
fimg2pdf -i “c:\input\*.jpg” –o d:\output\one.pdf -dpi 0
2) Use the DPI information of the original image (-dpi 1)
fimg2pdf -i “c:\input\1.jpg” “c:\input\2.tif” -o d:\output\one.pdf -dpi 1
fimg2pdf -i c:\input –o d:\output -dpi 1
fimg2pdf -i “c:\input\*.jpg” –o d:\output\one.pdf -dpi 1
3) Set the DPI to 300 for the output PDF file (-dpi 300)
fimg2pdf -i “c:\input\1.jpg” “c:\input\2.tif” -o d:\output\one.pdf -dpi 300
22
Foxit PDF Toolkit User Manual
www.foxitsoftware.com
fimg2pdf -i c:\input –o d:\output -dpi 300
fimg2pdf -i “c:\input\*.jpg” –o d:\output\one.pdf -dpi 300
c) Bookmark (-b)
The optional argument (-b) is used to create bookmarks for the output PDF file. The name of the
bookmarks is the name of the images.
Usage Example
1) Create bookmarks for the output PDF file (-b)
fimg2pdf -i “c:\input\1.jpg” “c:\input\2.tif” -o d:\output\one.pdf -b
fimg2pdf -i c:\input -o d:\output\one.pdf -b
fimg2pdf -i “c:\input\*.jpg” -o d:\output\one.pdf -b
d) Margin setting (-margin)
The optional argument (-margin) is used to set size of margin for each PDF page in points. By default,
the output PDF page has no margin. For more details about this argument, please refer to section
3.1.2 “Command Line Summary”.
Note The sum of the left and right values must be less than the width of the page, and the sum of the top
and bottom values must be less than the height of the page.
Usage Example
1) Set the left margin to 20 points (-margin 20)
fimg2pdf -i “c:\input\1.jpg” “c:\input\2.tif” -o d:\output\one.pdf -margin 20
fimg2pdf -i c:\input -o d:\output\one.pdf -margin 20
fimg2pdf -i “c:\input\*.jpg” -o d:\output\one.pdf -margin 20
2) Set the left margin to 20 points, and the top margin to 10 points (-margin 20 10)
fimg2pdf -i “c:\input\1.jpg” “c:\input\2.tif” -o d:\output\one.pdf -margin 20 10
fimg2pdf -i c:\input -o d:\output\one.pdf -margin 20 10
fimg2pdf -i “c:\input\*.jpg” -o d:\output\one.pdf -margin 20 10
23
Foxit PDF Toolkit User Manual
www.foxitsoftware.com
3) Set the left margin to 10 points, the top margin to 10 points and the right margin to 30 points (-
margin 10 10 30)
fimg2pdf -i “c:\input\1.jpg” “c:\input\2.tif” -o d:\output\one.pdf -margin 10 10 30
fimg2pdf -i c:\input -o d:\output\one.pdf -margin 10 10 30
fimg2pdf -i “c:\input\*.jpg” -o d:\output\one.pdf -margin 10 10 30
4) Set the left margin to 10 points, the top margin to 10 points, the right margin to 30 points and the
bottom margin to 20 points (-margin 10 10 30 20)
fimg2pdf -i “c:\input\1.jpg” “c:\input\2.tif” -o d:\output\one.pdf -margin 10 10 30 20
fimg2pdf -i c:\input -o d:\output\one.pdf -margin 10 10 30 20
fimg2pdf -i “c:\input\*.jpg” -o d:\output\one.pdf -margin 10 10 30 20
e) Password setting (-sp)
The optional argument (-sp) is used to set the open password for the output PDF file. By default, the
output PDF file has no open password.
Usage Example
1) Set the open password to “welcome” for the output PDF files (-sp welcome)
fimg2pdf -i “c:\input\1.jpg” “c:\input\2.tif” -o d:\output\one.pdf -sp welcome
fimg2pdf -i c:\input –o d:\output -sp welcome
fimg2pdf -i “c:\input\*.jpg” –o d:\output\one.pdf -sp welcome
3.1.3.3 Document Metadata Settings
a) Title (-title)
The optional argument (-title) is used to set title of PDF files.
Usage Example
1) Set document title to “Foxit PDF Toolkit User Manual” (-title “Foxit PDF Toolkit User Manual”)
fimg2pdf -i “c:\input\1.jpg” “c:\input\2.tif” -o d:\output\one.pdf -title “Foxit PDF Toolkit User
Manual”
fimg2pdf -i c:\input -o d:\output\one.pdf -title “Foxit PDF Toolkit User Manual”
24
Foxit PDF Toolkit User Manual
www.foxitsoftware.com
fimg2pdf -i “c:\input\*.jpg” -o d:\output\one.pdf -title “Foxit PDF Toolkit User Manual”
b) Subject (-subject)
The optional argument (-subject) is used to set subject of PDF files.
Usage Example
1) Set document subject to “Foxit PDF Toolkit” (-subject “Foxit PDF Toolkit”)
fimg2pdf -i “c:\input\1.jpg” “c:\input\2.tif” -o d:\output\one.pdf -subject “Foxit PDF Toolkit”
fimg2pdf -i c:\input -o d:\output\one.pdf -subject “Foxit PDF Toolkit”
fimg2pdf -i “c:\input\*.jpg” -o d:\output\one.pdf -subject “Foxit PDF Toolkit”
c) Keywords (-keywords)
The optional argument (-keywords) is used to set keywords of PDF files.
Usage Example
1) Set document keywords to “toolkit” (-keywords “toolkit”)
fimg2pdf -i “c:\input\1.jpg” “c:\input\2.tif” -o d:\output\one.pdf -keywords “toolkit”
fimg2pdf -i c:\input -o d:\output\one.pdf -keywords “toolkit”
fimg2pdf -i “c:\input\*.jpg” -o d:\output\one.pdf -keywords “toolkit”
d) Author (-author)
The optional argument (-author) is used to set author of PDF files.
Usage Example
1) Set document author to “Jessie” (-author “Jessie”)
fimg2pdf -i “c:\input\1.jpg” “c:\input\2.tif” -o d:\output\one.pdf -author “Jessie”
fimg2pdf -i c:\input -o d:\output\one.pdf -author “Jessie”
fimg2pdf -i “c:\input\*.jpg” -o d:\output\one.pdf -author “Jessie”
e) Creator (-creator)
The optional argument (-creator) is used to set file creation application information of PDF files.
25
Loading...
+ 155 hidden pages