Foxit Convert2PDF User Manual

Foxit Convert2PDF User Manual
www.foxitsoftware.com
TABLE OF CONTENTS
1 Introduction to Foxit Convert2PDF .................................................................................. 1
1.1 Why Foxit Convert2PDF is your choice ......................................................................................... 1
1.2 Features ........................................................................................................................................ 2
1.3 Common Use Case Scenarios ........................................................................................................ 2
1.4 System Requirements ................................................................................................................... 3
1.5 About This Manual ........................................................................................................................ 3
2 Installing and Uninstalling Foxit Convert2PDF .................................................................. 4
2.1 Installation .................................................................................................................................... 4
2.2 Evaluation ...................................................................................................................................... 5
2.3 About License ................................................................................................................................ 6
2.4 Registration ................................................................................................................................... 6
2.5 Uninstallation ................................................................................................................................ 8
3 Command line usage ....................................................................................................... 9
3.1 Basic Syntax ................................................................................................................................... 9
3.2 Command Line Summary .............................................................................................................. 9
3.3 Basic Usage ................................................................................................................................. 17
3.3.1 Input and Output ................................................................................................................... 17
3.3.2 File Types Selection for Conversion ....................................................................................... 19
3.3.3 Settings for Image, Text, and Html Conversion ...................................................................... 19
3.3.4 Settings for Text Conversion .................................................................................................. 22
3.3.5 Settings for Html Conversion ................................................................................................. 23
3.3.6 Settings for Office Conversion ............................................................................................... 26
3.3.7 Recursion Depth of Sub-folders ............................................................................................. 28
3.3.8 Multi-thread Support ............................................................................................................. 29
3.3.9 Other Optional Arguments .................................................................................................... 30
4 Working with API .......................................................................................................... 32
4.1 Working with Convert2PDF API .................................................................................................. 33
4.2 Reporting Progress Messages and Errors ................................................................................... 37
5 Support......................................................................................................................... 39
Foxit Convert2PDF User Manual
www.foxitsoftware.com
5.1 Reporting Problem ...................................................................................................................... 39
5.2 Contact Information .................................................................................................................... 40
Foxit Convert2PDF User Manual
www.foxitsoftware.com

1 Introduction to Foxit Convert2PDF

Foxit Convert2PDF is an easy-to-use command line tool used to batch convert large volumes of images, text,
html, Office files into high-quality PDF files, without requiring additional software installation except for
Microsoft Office which is needed for Office documents conversion. Convert2PDF is an all-in-one PDF
conversion solution, which gathers the features of image2pdf, text2pdf, html2pdf, and office2pdf. It supports
various image formats like bmp, png, jpeg, jpx, gif, tiff (including the image with a single page or multiple
pages); most popular Office document formats which include doc, docx, xls, xlsx, ppt and pptx; plain text files
with the extension “.txt” and html files with the extension “.htm” or “.html”.

1.1 Why Foxit Convert2PDF is your choice

Foxit is an Amazon-invested leading software provider of solutions for reading, editing, creating, organizing,
and securing PDF documents. Foxit Convert2PDF is a command line tool to perform high volume PDF
generation and processing. This tool helps IT organizations develop workflows to convert large different types
of files into PDF files. It also provides libraries for software development groups to incorporate PDF
conversion into their applications. Customers choose this product for the following reasons:
High performance – Multi-threading support speeds up the PDF conversion based on today's server
architectures.
Professional quality – Professional-quality on 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 tool to 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 adding
new features and enhancements. Foxit Convert2PDF is the best solution for PDF batch conversion and
integration of high performance features at a low cost!
1
Foxit Convert2PDF User Manual
www.foxitsoftware.com

1.2 Features

Foxit Convert2PDF provides the following features:
Batch convert image, text, local html files, and Office files into PDF files. Convert a webpage (URL) into a PDF file. Finish faster with multi-threaded processing. Make the complex simple with sub-folder recursion processing. Support single-file processing and single-folder processing. Support image formats like bmp, png, jpeg, jpx, gif, and tiff. Support plain text files with the extension “.txt”. Support html formats like htm and html. Support most popular Office document formats like doc, docx, xls, xlsx, ppt and pptx. Set page width and height for image, text, and html conversion. Set page margin for image, text, and html conversion. Support font style, font size, and font color for text conversion. Optionally support pagination wherever there is a page break for text conversion. Support cache address, timeout, and page rotation settings for html conversion. Set all the page contents to one single PDF page for html conversion. Optionally disable retaining hyperlinks in the generated PDF files for html conversion. Support password-protected Microsoft Office files. Provide scale options for Microsoft Excel conversion. Support wildcard characters in batch processing, e.g., *.jpg, *.html, *.txt, and *.doc. Offer simple-to-use API.

1.3 Common Use Case Scenarios

Batch convert images into PDF files for better image management. For example, 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.
Batch convert Microsoft Office files into PDF files for better archiving. Convert a batch of local html files or a webpage (URL) into PDF file(s) for better printing or archiving.
For some large html files or a webpage which contain(s) many contents, it is not convenient to print
or archive them directly. In this case, users can convert them into PDF file(s) which are widely used in
printing and document archiving.
2
Foxit Convert2PDF User Manual
www.foxitsoftware.com
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.
Batch convert image, text, html and Office files into PDF files at the same time.

1.4 System Requirements

Windows Platform
Windows Server 2012 Windows Server 2008 R2 Windows Server 2003 Windows 10 Windows 8.1 Windows 7
Note For the Office conversion, 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 how to use the command line of Foxit Convert2PDF tool. It is intended for
the users who want to batch convert different types of files into PDF files.
Section 1: gives an introduction of Foxit Convert2PDF. Section 2: illustrates how to install and uninstall Foxit Convert2PDF. Section 3: describes basic usage of Foxit Convert2PDF. Section 4: shows how to work with API. Section 5: provides support information.
3
Foxit Convert2PDF User Manual
www.foxitsoftware.com

2 Installing and Uninstalling Foxit Convert2PDF

2.1 Installation

Installation of Foxit Convert2PDF tool is straightforward. You can download the trial release package, which is
a zip file from Foxit website (https://www.foxitsoftware.com/products/pdf-toolkit/), and then extract the
package to the desired location as shown in the following figure. In this manual, we rename the package
“foxit_convert2pdf” and unzip it to the directory “C:\foxit_convert2pdf”. The package contains:
doc: user manual for Foxit Convert2PDF
include: header file for Foxit Convert2PDF
lib: third-part libraries and databases for Foxit Convert2PDF
samples: some batch samples for Foxit Convert2PDF
testfiles: testfiles for Foxit Convert2PDF
Foxit Convert2PDF package
After that, open a terminal session and navigate to the installation location to run your application. For the
Office conversion, 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.
4
Foxit Convert2PDF User Manual
www.foxitsoftware.com
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

Foxit Convert2PDF tool is distributed on a “try-before-you -buy” basis. Foxit allows users to download trial
version to evaluate the features. You have a 30-day free trial, during which the pages of all generated PDF
files will contain our watermark. After the evaluation period, customers that want to continue to use the
product should purchase a licensed version from Foxit website at
https://www.foxitsoftware.com/products/pdf-toolkit/.
5
Foxit Convert2PDF User Manual
www.foxitsoftware.com

2.3 About License

Foxit Convert2PDF 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 Convert2PDF into your own applications. Please contact Foxit sales team to
purchase Enterprise License.

2.4 Registration

When you get the activation code for the Convert2PDF tool, please use the argument “-register <code>
<licensee>” to activate it in the Command Prompt window. The following two steps show how to open a
Command Prompt window based on Windows 7 system.
a. Click on the Start menu. b. Type “cmd” in the Search programs and files box and press Enter.
In the opening Command Prompt window, type “cd C:\foxit_convert2pdf” to navigate to the installation
location as follows.
Navigate to the installation location
6
Foxit Convert2PDF User Manual
www.foxitsoftware.com
Assume you get an activation code (77505-010G0-O1000-3Z4D8-D4VEO-5RL1F), you may type “convert2pdf -
register 77505-010G0-O1000-3Z4D8-D4VEO-5RL1F FoxitTest” in the Command Prompt window as shown
below.
Register Foxit Convert2PDF tool
Here, “FoxitTest” is the licensee name you input. After activation, a key file named “ftlkey.txt” will be
generated in the installed path with the contents shown in the following figure.
The content of the generated key file
Then you can run “-convert2pdf -licensein the Command Prompt window to check the license agreement as
follows.
7
Foxit Convert2PDF User Manual
www.foxitsoftware.com
Check the license agreement

2.5 Uninstallation

If you want to uninstall the Foxit Convert2PDF tool, all you need to do is to delete the installation folder.
8
Foxit Convert2PDF User Manual
www.foxitsoftware.com

3 Command line usage

3.1 Basic Syntax

The basic command line syntax for Convert2PDF is:
convert2pdf <-i <srcfile/srcfolder>> <-o <destfile/destfolder>> [-modetype <mode type>]
[-width <PDF width>] [-height <PDF height>] [-margin <left [top right bottom]>]
[-font <fontname>] [-fs <fontsize>] [-fontcolor <R> <G> <B>] [-breakpage]
[-cache <cache folder>] [-timeout <load timeout>] [-singlepage] [-nolink]
[-rotate <0/90/180/270>] [-checklazyload] [-scale <page scale>] [-op <password>]
[-r [recursion]] [-t <thread>] [-log <logfile>] [-l <level>]
convert2pdf -register <code> <licensee>
convert2pdf -license
convert2pdf -version/-v
convert2pdf -help/-h
convert2pdf -copyright
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 conversion as desired. The arguments could be given in any
order. Full details on each are explained in the following section.

3.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.
9
www.foxitsoftware.com
Option
Parameter
Description
-i
<-i <string>>
e.g.
-i c:\input\1.png
-i c:\input\2.txt
-i c:\input\3.html
-i c:\input\4.docx
-i c:\input
-i “c:\input\*.pptx
Specifies the input file to be converted.
The input string can be the name of a single
file (image, text, html, or Office file) or a
folder.
The file name can contain the wildcard
character (*). For example, use *.txt to
include all text files in a given folder.
Note Wildcard character (*.*) is currently not
supported.
-o
<-o <string>>
e.g.
-o d:\output\1.pdf
-o d:\output
Specifies the path of the output PDF file or folder.
If the input is a single image, text, html or
Office file, the output should be a single PDF
file, (e.g. -o d:\output\1.pdf).
If the input is a folder, the output should be a
folder, (e.g. -o d:\output).
Note
The specified output path must already exist. The output can be a PDF file when the input
are images whose names only contain
wildcard characters, such as, -i
“c:\input\*.jpg” -o d:\output\output.pdf.
-modetype
[-modetype <string>]
-modetype <mode type for
conversion>
e.g.
-modetype “1”
-modetype “2”
-modetype “3”
-modetype “4”
--modetype “1,2,4”
-modetype “2,4”
-modetype “1,2,3,4”
Specifies the file types to be converted.
-modetype “1”: converts image to PDF. -modetype “2”: converts Office to PDF. -modetype “3”: converts text to PDF. -modetype “4”: converts html to PDF. -modetype “1,2”: converts image and
Office to PDF.
Note The <string> should be entered in the format
1,4, “1,2,3,4” without any spaces.
Foxit Convert2PDF User Manual
10
Loading...
+ 30 hidden pages