Commands related to Document
Actions
Overlay
pdfToolbox --overlay [--voffset=0] [--hoffset=0] [--placement=TopRight]
[--placebelow[=1|2]]
Purpose
Places the selected overlay content on top of (or underneath) the processed PDF.
Parameters
hoffset |
Optional, horizontal offset from placement (pt, in, mm, cm) |
voffset |
Optional, vertical offset from placement (pt, in, mm, cm) |
placement |
Optional, placement of the pages (any of TopLeft, TopCenter, TopRight, LeftCenter, Center, RightCenter, BottomLeft, BottomCenter, BottomRight) |
placebelow |
Optional, places the selected overlay content underneath the input PDF. Number of pages in resulting PDF is determined from the number of pages of: 1: first argument (= overlay file) 2: input file (Default behavior of --placebelow) If no output name is defined, the name of output file will be derived from the input file name. |
overlay file |
Full path to PDF to put on top of the input PDF, pre-installed overlay files can be found in <Application folder>/var/Actions/Overlay |
Example
pdfToolbox --overlay --voffset=10mm --hoffset=50mm <overlay file> <input PDF file>
Create EPS
--createeps [--rect=rect] [--pagebox=pagebox] [--transparencyquality=100]
[--gradientresolution=360] [--bitmapresolution=1200]
[--applyoutputpreviewsettings]
[--simulationprofile='ISO Coated v2 (ECI)'] [--colormanagement]
[--marksweight=0.125] [--pageinformation] [--colorbars]
[--registrationmarks] [--cutmarks] [--simulateoverprint]
[--postscript=3] [--ascii] [--workingspacecmyk=<ICC-profile>]
[--workingspacergb=<ICC-profile>]
[--workingspacegray=<ICC-profile>]
Purpose
Converts all pages of the PDF into EPS. The EPS files are saved next to the input PDF file unless you use -f to define an output path.
Parameters
rect | optional, define and use only part of page relative to --pagebox <lower left x>,<lower left y>,<upper right x>,<upper right y>[<unit=pt (default), mm>] |
pagebox | optional, crop at page geometry box (options: MEDIABOX, CROPBOX (default), TRIMBOX, BLEEDBOX, ARTBOX) |
transparencyquality |
optional, transparency quality in % (default: 100) |
gradientresolution |
optional, gradient resolution in ppi (default: 360) |
bitmapresolution |
optional, bitmap resolution in ppi (default: 1200) |
applyoutputpreviewsettings |
optional, apply output preview settings |
simulationprofile |
optional, simulation profile (default: 'ISO Coated v2 (ECI)') Not available on Unix |
colormanagement |
optional, apply host based color management |
marksweight |
optional, line weight of cut marks in pt (default: 0.125) |
pageinformation |
optional, add page information |
colorbars |
optional, add color bars |
registrationmarks |
optional, add registration marks |
cutmarks |
optional, add cutmarks |
simulateoverprint |
optional, simulate overprint |
postscript |
optional, Postscript level [2|3] (default: 3) |
ascii |
optional, Postscript is written 'Clean 7 Bit' |
workingspacecmyk |
optional, working space profile CMYK (default: ISO Coated v2 (ECI)) |
workingspacergb |
optional, working space profile RGB (default: sRGB IEC61966-2.1) |
workingspacegray |
optional, working space profile Gray (default: Dot Gain 15%) |
Example
pdfToolbox --createeps --postscript=2 --pageinformation
--colorbars --registrationmarks --cutmarks <PDF file>
Create PostScript
--createps [--transparencyquality=100]
[--gradientresolution=360] [--bitmapresolution=1200]
[--applyoutputpreviewsettings]
[--simulationprofile='ISO Coated v2 (ECI)'] [--colormanagement]
[--marksweight=0.125] [--pageinformation] [--colorbars]
[--registrationmarks] [--cutmarks] [--simulateoverprint]
[--postscript=3] [--ascii] [--workingspacecmyk=<ICC-profile>]
[--workingspacergb=<ICC-profile>]
[--workingspacegray=<ICC-profile>]
Purpose
Converts all pages of the PDF into PostScript. The PostScript files are saved next to the input PDF file unless you use -f to define an output path.
Parameters
transparencyquality |
optional, transparency quality in % (default: 100) |
gradientresolution |
optional, gradient resolution in ppi (default: 360) |
bitmapresolution |
optional, bitmap resolution in ppi (default: 1200) |
applyoutputpreviewsettings |
optional, apply output preview settings |
simulationprofile |
optional, simulation profile (default: 'ISO Coated v2 (ECI)') Not available on Unix |
colormanagement |
optional, apply host based color management |
marksweight |
optional, line weight of cut marks in pt (default: 0.125) |
pageinformation |
optional, add page information |
colorbars |
optional, add color bars |
registrationmarks |
optional, add registration marks |
cutmarks |
optional, add cutmarks |
simulateoverprint |
optional, simulate overprint |
postscript |
optional, Postscript level [2|3] (default: 3) |
ascii |
optional, Postscript is written 'Clean 7 Bit |
workingspacecmyk |
optional, working space profile CMYK (default: ISO Coated v2 (ECI)) |
workingspacergb |
optional, working space profile RGB (default: sRGB IEC61966-2.1) |
workingspacegray |
optional, working space profile Gray (default: Dot Gain 15%)' |
Example
pdfToolbox --createps --postscript=2 --pageinformation
--colorbars --registrationmarks --cutmarks <PDF file>
Save as image
--saveasimg [--parallel=parallel][--nosimulateoverprint] [--simulationprofile=<ICC profile>]
[--smoothing=lines] [--resolution=72] [--colorspace=colorspace]
[--jpegformat=Baseline_Standard] [--compression=JPEG_medium]
[--imgformat=JPEG] [--pagebox=cropbox] [--rect=<left>,<bottom>,<right>,<top>[unit] [--digits=4]]
Purpose
Renders an image per page preserving the page's aspect ratio. RGB images always use sRGB as Destination ICC profile which gets embedded into the resulting image. CMYK and gray TIFF images are saved without an ICC profile, while JPEG images will contain the ICC profile.
For rendering purposes, the order in which profiles used as a working space (and in which is rendered) are determined:
- if a simulationprofile is defined, it will be used
- if a simulationprofile is not defined, the Output Intent is used
- if no simulationprofile or Output Intent exists, the following profiles will be used:
- RGB: sRGB IEC61966-2.1;
- CMYK: ISO Coated v2 (ECI);
- Gray: Dot Gain 15%.
The defined simulation profile will only replace the default profile for the respective colorspace.
If the destination colorspace is same as used for rendering, this ICC profile will be used. Otherwise one of the following is used:
- RGB: sRGB IEC61966-2.1;
- CMYK: ISO Coated v2 (ECI);
- Gray: Dot Gain 15%.
As Rendering Intent "AC_RelColorimetric" is used by default.
Starting pdfToolbox 12.3, Gray with Alpha channel(GrayA) is now supported for TIFF and PNG. "RGBA" is now also added for TIFF (only PNG up until now)
Parameters:
parallel | optional; Parallel processing for page rendering. Usage e.g. --parallel=4 (Rendering with 4 cores) |
nosimulateoverprint |
optional; avoids the overprint-simulation |
simulationprofile |
optional; using a user-defined ICC-profile for rendering (RGB, CMYK or Gray) |
smoothing |
optional; None, All, Lines, Images, Text, NTLH (default: All; NTLH includes "All") |
resolution |
optional; resolution in ppi or width x height in pixel, e.g. 1024x800 (default: 72) |
colorspace |
optional; one of RGB, RGBA, CMYK, Gray, Multichannel (default: RGB) availabilty depends on imageformat: JPEG: RGB, Gray, CMYK (default: RGB) PDF: RGB, Gray, CMYK (default: RGB) TIFF: RGB, RGBA, Gray, GrayA, CMYK, Multichannel (default: RGB) PNG: RGB, RGBA, Gray, GrayA (default: RGB) |
jpegformat |
optional; Baseline_Standard, Progressive_3_Scan (default: Baseline_Standard) |
compression |
optional; for JPEG: JPEG_minimum, JPEG_low, JPEG_medium, JPEG_high, JPEG_maximum (default: JPEG_medium) for TIFF: TIFF_None, TIFF_LZW, TIFF_Flate (default: TIFF_LZW) |
imgformat |
optional; JPEG, PNG, TIFF, PDF (default: JPEG) |
pagebox |
optional; using a geometry box as size for image: CROPBOX, TRIMBOX, BLEEDBOX, MEDIABOX (default: CROPBOX) |
rect |
optional; render only the part defined by lower left and upper right from origin geometry box (default: CROPBOX); in pt or mm (default:pt) |
simulatepaper |
optional; simulates paper color (by using absolute colorimetric color conversion) not available if --nosimulateoverprint is set; needs a defined --simulationprofile; only available for colorspace = RGB |
blackpointcompensation |
optional; using blackpoint compensation (not available if --nosimulateoverprint is set) |
digits |
Defines the number of digits for page number in file name of created image |
Example
pdfToolbox --saveasimg --imgformat=PNG --resolution=800x600 <PDF file>
Extract text
--extracttext
Purpose
Extracts the text of PDF documents to the command line or to a specified file.
Example
pdfToolbox --extracttext <PDF file>
Extract content
--extractcontent [--words] [--wordbbox] [--wordquads]
[--chars] [--docxmp] [--docinfo] [--annots]
Purpose
Extracts the text in the form of words or characters to an XML file.
Parameters
words |
Include words |
wordbbox |
|
wordquads |
Include quad point information for word parts |
chars |
Include quad point information for individual characters |
docxmp |
Include document XMP metadata |
docinfo |
Include document info |
annots |
Include link annotations |
Example
pdfToolbox --extractcontent [--words] [--docinfo] <PDF file>
Extract images
--extractimages [--threshold=0] [--report=<path>]
Purpose
Extracts images from the file and creates a special XML report, which lists all extracted images with their relevant details.
Parameters
threshold |
Extracts only images with width and height larger than threshold (default: 0) |
report |
Creates a report with details about the extracted images and their former position in the PDF. |
Example
pdfToolbox --extractimages --report --threshold=250 <PDF file>
This action can not be used with distributed processing.
Redistill
--redistill [--topdf_pdfsetting=<joboptions>] <PDF file>
Purpose
Recreates the PDF via PostScript, prepares for use with older equipment (RIPs).
Parameters
topdf_pdfsetting |
Path to PDF settings file to be used for conversion of PS and EPS files only, must be a Distiller .joboptions file |
Example
pdfToolbox --redistill <PDF file>
Optimize PDF
--optimizepdf <PDF file>
Purpose
Optimizes the internal structure of the PDF and saves for Fast Web View.
Example
pdfToolbox --optimizepdf <PDF file>
This action is deprecated with pdfToolbox 12 as a single action and has become a option for normal processing.
To perform a complete file optimization, just use "--topdf" with the additional option "--optimizepdf".
To PDF
--topdf [--topdf_pdfsetting=<path>] [--topdf_psprologue=<path>][--topdf_psepilogue=<path>] [--ignorefontembeddingproblems=<on|off>]
Purpose
Converts supported non-PDF files to PDF. Information about supported file types can be found here:
http://www.callassoftware.com/goto/tbx_ENU_topdf
Parameters
topdf_pdfsetting |
Full path to PDF settings file to be used for conversion of PS and EPS files only, must be a Distiller .joboptions file |
topdf_psprologue |
Full path to a prologue file which will be prepended to the PostScript/EPS file to be converted. To be used for conversion of PS and EPS files only. Must be a valid PostScript file. |
topdf_psepilogue |
Full path to a epilogue file which will be appended to the PostScript/EPS file to be converted. To be used for conversion of PS and EPS files only. Must be a valid PostScript file. |
Note:
-
ICC profiles referenced in a PDF settings file (.joboptions) need to be copied into the operating system folder for ICC profiles, e.g.:
- Windows:
C:\Windows\system32\spool\drivers\color - MacOS:
/MacOS HD/Library/ColorSync/Profiles
- Windows:
- The application will also look into the following folders for ICC profiles:
- /Library/Application Support/Adobe/Color/Profiles/Recommended
- /Library/Application Support/Adobe/Color/Profiles
- /System/Library/ColorSync/Profiles
- Alternatively, you can put ICC-files for PostScript to PDF in the subfolder of the application:
.../etc/PDFPSTool/ICCProfiles - A Color settings file (.csf) that is referenced in the PDF settings file is not necessary for the processing.
Examples
pdfToolbox --topdf <non-PDF file>
pdfToolbox --topdf /path/to/file/mypostscript.ps
--topdf_pdfsetting=/path/to/file/mysettings.joboptions
--topdf_psprologue=/path/to/file/myprologue.ps
--topdf_psepilogue=/path/to/file/myepilogue.ps
Uncertify
--uncertify <PDF file>
Purpose
Removes a Preflight certificate if present.
Example
pdfToolbox --uncertify <PDF file>
Secure PDF
--securepdf --password=<password>
Restrict editing and printing of the PDF. A password is needed in order to change these permission settings or to perform changes. The PDF can only be read afterwards
The entered password will be visible and may be grabbed or logged by other processes on the machine.
Parameters
password |
password to avoid editing or printing |
Creating file packages
Some PDF standards allows the embedding of PDF- and also non-PDF-files into another PDF file. Sometime these file packages are also called collections.
Using pdfToolbox CLI it is possible to create such file packages from a complete folder or to define different ways how a file which shall be embedded is handled.
In general a file package is created with --collection This will create an index document, which lists all embedded files from the given folder. Also an existing folder structure will be respected
--collection <folder>
In general a file package is created with --collection This will create an
index document, which lists all embedded files.
--collection <file> [<file>]
Settings for file embedding
--collection [--embedinto=[target],<file>] [--embedfile= [target,[relationship],<file>] [--embedwithlink= [area,<file>]
--embedinto
It is possible to use own templates or normal PDF for embedding files. The standard for the file where other files will be embedded can be defined using the conversion target (see below). If no file is defined, an index file is created.
--embedfile
Also for files to embed a conversion target can be defined using the conversion target. For PDF/A-3 standards also a relationship entry for each embedded file can be set.
Parameters
target |
A3b, A3u, A3a, A2b, A2u, A2a, A1b, A1a or No (Default) |
Using the target "No", no conversion to PDF is done. (Only available for embedded files.)
relationship |
Source, Data, Alternative, Supplement, Unspecified (Default) |
--embedwithlink
Alternatively, files can be embedded with defining an area in the containing document, where a link to the contained file is created. No conversion will take place with the file to embed.
Parameters
Defines a rectangular area, based on the lower left corner of the page, where a link to the embedded file is inserted. Default unit is pt.
area |
X1,X2,Y1,Y2[pt, in, cm, mm] |
Example:
--collection --embedinto=A3b,<PDF file> --embedfile=A3b,Alternative,<file> --embedfile=A2b,Source,<Office file>
--embedfile=No,Data,<file>
--collection --embedwithlink=10,10,100,100,<file> --embedwithlink=10mm,100mm,100mm,200mm,<file>
Extracting files from file packages
--extractembeddedfiles [--plain] [--filter=filter] <PDF file>
Purpose
Extracts embedded files from a PDF.
Parameters
plain |
Files are extracted directly into the destination folder without restoring an existing folder structure of the embedded files. |
filter |
RegEx based file name filter, e.g. =.*.doc |
Example:
--extractembeddedfiles --plain <PDF file>
Extract dieline
--extractdieline [--format] [--includeclippingpaths] [--pagebox=TRIMBOX] <Profile> <PDF file>
Purpose
Extract dieline(s) from PDF
Parameters
format | svg, dxf, cf2 svg:fill, svg:stroke, svg:fillstroke Default: svg (which is the same as svg:fill) The fill, stroke, fillstroke variations specify whether from stroked PDF paths filled, stroked or filled and stroked SVG objects are created. What format should be used depends on the machinery used. |
includeclippingpaths |
Export clipping paths as well (in addition to stroking paths) |
pagebox | Defines the box used for the dimension of the created dieline format Available: MEDIABOX, CROPBOX (default), TRIMBOX, BLEEDBOX, ARTBOX |
Example:
--extractdieline --format=svg:fillstroke ./dieline.kfpx <PDF file>