PDF2IMG is a Datalogics application designed to convert a selected PDF or XPS document file into one or more image files, including BMP, EPS, GIF, JPEG, PNG, RAW or TIFF. You can also select PDF itself as an output format, and thus use PDF2IMG to export a PDF document to a series of other PDF documents, one PDF export file per page.
The product offers several options for controlling Resolution, Color Model, Color Bit Depth and other settings, depending on output format selected.
For details on working with the PDF2IMGLIB library APIs, see the Appendix.
Command Line Syntax
The basic command line syntax for PDF2IMG is:
pdf2img [options] <inputFile> <outputForm>
Only the inputFile and outputForm arguments are required.
We provide many other optional arguments that you can use to create your own custom command line statements, to generate just the output you are looking for.
The PDF2IMG Pro and Premium versions of the software include the source code for the command line interpreter, pdf2img.cpp. You can use this source code with the enclosed Microsoft Visual C++ Project file (pdf2img.vcxproj) to do your own product development based on PDF2IMG.
Command Line Summary
Required Arguments
Only two command line arguments are required, <inputFile> and <outputForm>. All the rest are optional. The optional arguments can appear in any order in the command line argument, but they must come before <inputFile> and <outputForm>.
For details see Arguments and Options.
Argument name | Description | |
inputFile | Input PDF file name | |
outputForm | Output graphic format, BMP, EPS, GIF, JPG, PDF, PNG, RAW, or TIF |
Optional Arguments
Use the following optional arguments in any order, preceding the required <inputFile> and <outputForm> arguments. For example:
pdf2img -firstonly -colormodel=gray -bpc=1 -jpegquality=40 -resolution=72 input.pdf jpg
The two required arguments appear at the end, “input.pdf” as the file name (inputFile) and “jpg” as the output format (outputForm). Note that you don't actually enter "inputFile" or "outputForm" as arguments in the command line statement, just the name of the input file and the type of output format you want.
Argument name | Description | |
asprinted | If specified, reverse the Annotation handling to suppress Image-only annotations and allow Print-only annotations | |
blackisone | If specified, reverse the PhotometricInterpretation setting to be black=1 or white=0. Tiff only. | |
blendingspace | Specify a blending color space by naming a profile description or providing a name and path of the profile (.icc) file. Default=CMYK | |
bpc | Provide the number of bits used to represent each output color channel. Default=8 |
|
colormodel | Define the color model, cmyk, gray, lab, rgb, or rgba Default=rgb | |
colorprofile | Define the output ICC color profile Default determined by color space | |
compression | Define the compression method, no, jpg, lzw, g3, g4 Default=lzw |
|
digits | If provided, use to specify the number of digits to use in the sequential output filename counter. | |
firstonly | Convert only the first page of the input file Default=all pages |
|
fontlist | If specified, a quoted semicolon-delimited list of alternate directories for font resources | |
help | If specified, provide a list of available commands | |
ignoredefaultfonts | If specified, ignore default font resource locations when searching for fonts at start up (default directories and current directory) | |
ignorewarn | If specified, suppress warnings for non-renderable content. | |
intent | Define the goal or priority for rendering intent for colors: perceptual, relative, saturation, absolute, profile Default=profile if color profile is specified, otherwise perceptual | |
jpegquality | JPEG compression quality from 1 to 100. Higher values produce a better image but also a larger output file size. JPG only, Default=75 |
|
maxbandmem | Maximum memory to use per band of multiband conversion output in bytes. JPG or TIFF only, Default=300000000 |
|
multipage | If specified, produce one multipage TIFF output file of the requested name rather than the default of single-page sequentially-named output files. TIFF only |
|
noannot | If specified, suppress viewable annotations | |
nocmm | If specified, suppress Color Management Module | |
noenhancethinlines | If specified, do not enhance thin lines when rendering | |
OPP | If specified, enable Overprint Preview (OPP) in output | |
output | Provide a prefix for output filename(s) to be created Default=Input PDF filename plus sequence number |
|
outputintent | If specified, use the output intent dictionary value found in the source PDF document to define the output color profile to use when rasterizing a document. | |
pages | If specified, a page or range of pages to process; such as 14-last or 2-9 | |
password | If specified, enter password string required to open the document for conversion. | |
pdf-rasterize | Rasterize each page and export the content to a single PDF output file. | |
pdf-rasterize-split | Rasterize each page and export the content to a series of PDF output files, one for each page in the source document. | |
pdfregion | Define the region of PDF page to rasterize. Options include art, bleed, bounding, crop, media, trim Default=crop |
|
pdf-split | Split a PDF document into a series of separate PDF documents, one PDF document for each page in the source file. | |
pixelcount | If specified, define an absolute picture size expressed as horizontal by vertical number of pixels. This can be used to specify a fixed number of pixels for the width and/or height of an output image, and thus scale the image up or down as needed to a specific output size and dimension. | |
profileCMYK | Provide the name and location of the CMYK color profile or description of the color profile to use for CMYK values specified in uncalibrated (device) color values in the input PDF file. Default=Adobe Reader 9 CMYK | |
profileGray | If specified, provide the name and location of the grayscale color profile or description of the color profile to use for grayscale values specified in uncalibrated (device) color values in the input PDF file. Default=Gray Gamma 2.2 | |
profileRGB | If specified, provide the name and location of the RGB color profile or description of the color profile to use for grayscale values specified in uncalibrated (device) color values in the input PDF file. Default=sRGB | |
relaxParseSyntax | If specified, relaxes parsing restrictions to fix minor syntax issues in PDF source documents. | |
removewhitespace | If specified, direct PDF2IMG to remove the white space margins around the content on a page in the PDF document. | |
resampler | Apply bicubic resampling: auto bicubic or none. Default=auto |
|
resolution | Define the output resolution from 12 to 2400 in Dots per Inch. Default=300 |
|
reverse | If specified, use to create a negative image. Grayscale output formats only |
|
smoothing | Specify to apply image antialiasing. Options include none, text, line, image, or all. |