PDF Toolkit Command Line Tools & Utilities
PDF Toolkit Command Line gives you a wide range of professional, robust tools to modify PDF files manually from the command line, from scripts or within programs.
VeryPDF offers easy-to-use command line tools and other utilities that enable processing PDF documents individually and in batch mode for use in high-throughput server environments, or as building blocks for client or server-based applications. All tools are built on VeryPDF technology and are available on Windows, Linux* and MacOS* (available on request).
PDF Toolkit Command Line consists of various specialized command line options that can be used without any programming effort. They can be concatenated – for instance, if documents in a batch process should first be checked for content prior to merging.
PDF Toolkit Command Line is a Command Line application for Developers to Manipulate and Compress PDF Files. PDF Toolkit Command Line is the powerful developer tool to create, modify, view, extract, and automate data to and from PDF files within software applications. The PDF Toolkit Command Line contains hundreds of command line options, designed to tackle any PDF-related task.
Whether you need a few documents a day or thousands of pages a second, Toolkit is the high-performance PDF manipulation and compression tool that helps get the job done!
PDF Toolkit Command Line features:
* PDF Merge Program for merging multiple PDF documents.
* PDF Split Program for splitting a single PDF document into multiple PDF
documents.
* PDF Select Program for reading out selected pages.
* PDF Text Extraction Program.
* PDF Form Filling Program for simple form-based functions.
* PDF Web Link Program for inserting web links.
* PDF Table of Contents Program for creating tables of contents.
* PDF Bookmarks Program for reading out and creating bookmarks.
* PDF Info Program for listing document properties such as the number of pages
or page dimensions.
* Quality Split and Merge, keeping bookmarks. Extract pages. Split on Bookmarks.
* All operations can apply to any page range, e.g 1-3,1-end or 6-30even.
* Linearize (Fast web view).
* Losslessly squeeze files to reduce their size.
* Encrypt and Decrypt (including AES 128 and AES 256 encryption).
* Read and set info and metadata from a PDF file. NEW Print XMP Metadata.
* Scale, rotate, crop and flip pages. Scale pages to fit.
* Copy, Remove and Add bookmarks.
* Stamp logos, shapes, watermarks, page numbers and multiline text. NEW
Transparency, more positions, and pre-position stamp.
* Supports Unicode UTF8 text input and output.
* Make PDF-based presentations.
* Put multiple pages on a single page.
* Add, remove and manipulate annotations.
* Add and remove file attachments to document or page.
* Thicken hairlines, blacken text, make draft documents.
* Reconstruct malformed files.
* Detect missing fonts, low resolution images.
* Read commands from a control file.
* List spot colours.
* Set the open action of a PDF.
* Add, modify, remove, or print page labels.
* Combine multiple operations in a single command.
Other areas of use:
* Preparing documents for printing and dispatch.
* Personalizing documents in web server applications or in batch processing (e.
g. quotes for customers).
* Completing form fields in batch processing mode (e. g. compiling reports from
a database).
* Document assembly, i.e. splitting and merging pages such as title page and
blank pages, as well as enriching pages by adding logos, page numbering and
other content.
Syntax: pdftoolkit [op] [op-specific arguments] [-o [output file]] [input files] Input names are distinguished by containing a '.' and may be followed by a page range specification, for instance "1,2,3" or "1-6,9-end" or "even" or "odd" or "reverse". Operations (See manual for full details): -version Print the pdftoolkit version number -o Set the output file, if appropriate -i Add an input file -idir Add a directory of files -stdin Read input from standard input -stdin-owner Owner password for -stdin -stdin-user User password for -stdin -stdout Send result to standard output -range Explicitly add a range -change-id Change the file's /ID tag -no-preserve-objstm Don't preserve object streams -create-objstm Create object streams anew -keep-version Don't change the version number -l Linearize output file -keep-l Linearize if the input file was linearized -pdftoolkitlin Set location of 'pdftoolkitlin' -recrypt Keep this file's encryption when writing -raw Do not process text -stripped Process text by simple stripping to ASCII -utf8 Process text by conversion to UTF8 Unicode -fast Speed over correctness with malformed documents -control Use a control file. Deprecated. Use -args. -merge Merge a number of files into one -retain-numbering Don't renumber pages when merging -remove-duplicate-fonts Remove duplicate fonts when merging -split Split a file into individual pages -chunk Set chunk size for -split (default 1) -split-bookmarks Split a file at bookmarks at a given level -scale-page -scale-page "sx sy" scales by (sx, sy) -scale-to-fit -scale-to-fit "x y" scales to page size (x, y) -scale-contents Scale Contents by the given factor -scale-center Scale contents around center -scale-to-fit-scale -scale-to-fit-scale (1.0 = 100%) -shift -shift "dx dy" shifts the chosen pages -rotate Set rotation of pages to 0, 90, 180, 270 -rotateby Rotate pages by 90, 180 or 270 degrees -rotate-contents Rotate contents of pages -upright Make pages upright -hflip Flip pages horizontally -vflip Flip pages vertically -crop Crop specified pages -hard-box Hard crop specified pages to the given box -remove-crop Remove cropping on specified pages -frombox Set box to copy from -tobox Set box to copy to -mediabox-if-missing If copy from box missing, substitute media box -mediabox Set media box on specified pages -encrypt Encrypt a document -decrypt Decrypt a file -no-edit No edits -no-print No printing -no-copy No copying -no-annot No annotations -no-forms No forms -no-extract No extracting -no-assemble No assembling -no-hq-print No high quality printing -no-encrypt-metadata Don't encrypt metadata (AES only) -decompress Decompress -compress Compress streams, leaving metadata alone -list-bookmarks List Bookmarks -remove-bookmarks Remove bookmarks from a file -add-bookmarks Add bookmarks from the given file -presentation Make a presentation -trans Set the transition method for -presentation -duration Set the display duration for -presentation -vertical Set dimension for Split and Blinds styles -outward Set direction for Split and Box styles -direction Set direction for Wipe and Glitter styles -effect-duration Set the effect duration in seconds -stamp-on Stamp a file on some pages of another -stamp-under Stamp a file under some pages of another -scale-stamp-to-fit Scale the stamp to fit the page -combine-pages Combine two files by merging individual pages -add-text Superimpose text on the given range of pages -remove-text Remove text previously added by pdftoolkit -add-rectangle Add a rectangle to the page -bates Set the base bates number -bates-at-range Set the base bates number at first page in range -bates-pad-to Pad the bates number with leading zeroes to width -font Set the font -font-size Set the font size -no-embed-font Do not embed fonts -color Set the color -opacity Set the text opacity -outline Use outline mode for text -linewidth Set line width for outline text -pos-center Set position relative to center of baseline -pos-left Set position relative to left of baseline -pos-right Set position relative to right of baseline -top Set position relative to center top of page -topleft Set position relative to top left of page -topright Set position relative to top right of page -left Set position relative to center left of page -bottomleft Set position relative to bottom left of page -bottom Set position relative to center bottom of page -bottomright Set position relative to bottom right of page -right Set position relative to center right of page -diagonal Place text diagonally across page -reverse-diagonal Place text diagonally across page from top left -center Place text in the center of the page -justify-left Justify multiline text left -justify-right Justify multiline text right -justify-center Justify multiline text centre -underneath Text stamp is underneath content -line-spacing Line spacing (1 is normal) -midline Adjust text to midline rather than baseline -topline Adjust text to topline rather than baseline -relative-to-cropbox Add text relative to Crop Box not Media Box -prerotate Calls -upright on pages before adding text -twoup Put 2 pages onto one -twoup-stack Stack 2 pages onto one twice the size -pad-before Add a blank page before the given pages -pad-after Add a blank page after the given pages -pad-every Add a blank page after every n pages -pad-multiple Pad the document to a multiple of n pages -list-annotations List annotations -copy-annotations Copy annotations from given file -remove-annotations Remove annotations -list-fonts Output font list -info Output file information -page-info Output file information -set-author Set Author -set-title Set Title -set-subject Set Subject -set-keywords Set Keywords -set-create Set Creation date -set-modify Set Modification date -set-creator Set Creator -set-producer Set Producer -set-trapped Mark as trapped -set-untrapped Mark as not trapped -set-page-layout Set page layout upon document opening -set-page-mode Set page mode upon document opening -open-at-page Set initial page -open-at-page-fit Set inital page, scaling to fit -set-metadata Set metadata to the contents of a file -print-metadata Output metadata information -remove-metadata Remove document metadata -hide-toolbar Hide the viewer's toolbar -hide-menubar Hide the viewer's menubar -hide-window-ui Hide the viewer's scroll bars etc. -fit-window Resize document's window to fit size of page -center-window Position window in the center of screen -display-doc-title Display document's title in the title bar -pages Count pages -list-attached-files List attached files -attach-file Attach a file -to-page Attach file to given page instead of document -remove-files Remove embedded attached document-level files -image-resolution List images under a given dpi -copy-font Copy a named font -copy-font-page Set the page a copied font is drawn from -remove-fonts Remove embedded fonts -copy-font-name Set the name of the font to copy -missing-fonts List missing fonts -remove-id Remove the file's /ID tag -draft Remove images from the file -boxes Add crossed boxes to -draft option -blacktext Blacken document text -blacklines Blacken lines in document -blackfills Blacken fills in document -thinlines Set minimum line thickness to the given width -remove-clipping Remove clipping paths -clean Garbage-collect a file -set-version Set PDF version number -copy-id-from Copy one file's ID tag to another -print-page-labels Print page labels -remove-page-labels Remove page labels -add-page-labels Add or replace page labels -label-style Set label style (default DecimalArabic) -label-prefix Set label prefix (default none) -label-startval Set label start value (default 1) -remove-dict-entry Remove an entry from all dictionaries -producer Change the /Producer entry in the /Info dictionary -creator Change the /Creator entry in the /Info dictionary -list-spot-colors List spot colors -squeeze Squeeze -squeeze-log-to Squeeze log location -help Display this list of options --help Display this list of options
PDF Command Line Tools Usage Examples:
Here are some examples of the PDF command line tools in action. This is just a
small selection, for more examples, see the Full PDF Manual in the download
package.
Index
1. Basic Usage
2. Merging and Splitting
3. Pages
4. Encryption and Decryption
5. Compression
6. Bookmarks
7. Presentations
8. Logos, Watermarks and Stamps
9. Multipage Facilities
10. Annotations
11. Document Information and Metadata
12. File Attachments
13. Miscellaneous
1. Basic Usage
pdftoolkit in.pdf 1-3,6 -o out.pdf
Read in.pdf, select pages 1, 2, 3 and 6, and write those pages to out.pdf.
pdftoolkit in.pdf even -o out.pdf
Select the even pages (2, 4, 6...) from in.pdf and write those pages to out.pdf.
pdftoolkit -merge in.pdf in2.pdf AND -add-text "Copyright
2016" -o out.pdf
Using AND to perform several operations in order, here merging two files
together and adding a copyright stamp to every page.
pdftoolkit -control control.txt
Read control.txt and use its contents as the command line arguments for
pdftoolkit.
2. Merging and Splitting
pdftoolkit -merge in.pdf in2.pdf -o out.pdf
Merge in.pdf and in2.pdf into one document, writing to out.pdf.
pdftoolkit -split in.pdf -o Chunk%%%.pdf -chunk 10
Split in.pdf into ten-page chunks, writing them to Chunk001.pdf, Chunk002.pdf
etc.
pdftoolkit -split-bookmarks 0 in.pdf -o @N.pdf
Split in.pdf on bookmark boundaries, writing each to a file whose name is the
bookmark label.
3. Pages
pdftoolkit -scale-page "2 2" in.pdf -o out.pdf
Scale both the dimensions and contents of in.pdf by a factor of two in x and y
directions.
pdftoolkit -scale-to-fit usletterportrait in.pdf -o
out.pdf
Scale the pages in in.pdf to fit the US Letter page size, writing to out.pdf
pdftoolkit -shift "26pt 18mm" in.pdf -o out.pdf
Shift the contents of the page by 26 pts in the x direction, and 18 millimetres
in the y direction, writing to out.pdf
pdftoolkit -rotate-contents 90 in.pdf -o out.pdf
Rotate the contents of the pages in in.pdf by ninety degrees and write to
out.pdf.
pdftoolkit -crop "0 0 600pt 400pt" in.pdf -o out.pdf
Crop the pages in in.pdf to a 600 pts by 400 pts rectangle.
4. Encryption and Decryption
pdftoolkit -encrypt 128bit ownerpwd userpwd in.pdf -o out.pdf
pdftoolkit -encrypt 40bit ownerpwd userpwd -no-print sample_verypdf.pdf -o _out_encrypt1.pdf
pdftoolkit -encrypt 128bit ownerpwd userpwd -no-extract sample_verypdf.pdf -o _out_encrypt2.pdf
pdftoolkit -encrypt AES ownerpwd "" -no-edit -no-copy sample_verypdf.pdf -o _out_encrypt3.pdf
pdftoolkit -encrypt AES256 ownerpwd "" -no-forms sample_verypdf.pdf -o _out_encrypt4.pdf
Encrypt in.pdf using 128bit PDF encryption using the owner password ownerpwd and the
user password userpwd and writing the encrypted file to out.pdf
pdftoolkit -decrypt in.pdf owner=fred -o out.pdf
Decrypt in.pdf using the owner password, writing to out.pdf.
5. Compression
pdftoolkit -compress in.pdf -o out.pdf
Compress the data streams in in.pdf, writing the result to out.pdf.
pdftoolkit -decompress in.pdf -o out.pdf
Decompress the data streams in in.pdf, writing to out.pdf.
6. Bookmarks
pdftoolkit -list-bookmarks in.pdf
List the bookmarks in in.pdf. This would produce:
0 "Part 1" 1 open
1 "Part 1A" 2
2 "Part 1B" 3
0 "Part 2" 4
1 "Part 2a" 5
pdftoolkit -add-bookmarks bookmarks.txt in.pdf -o out.pdf
Add bookmarks in the same form from a prepared file bookmarks.txt to in.pdf,
writing to out.pdf.
7. Presentations
pdftoolkit -presentation in.pdf 2-end -trans Split
-duration 10 -o out.pdf
Use the Split style to build a presentation from the PDF in.pdf, each slide
staying 10 seconds on screen unless manually advanced. The first page, being a
title does not move on automatically, and has no transition effect.
8. Logos, Watermarks and Stamps
pdftoolkit -stamp-on watermark.pdf in.pdf -o out.pdf
Stamp the file watermark.pdf on to each page of in.pdf, writing the result to
out.pdf.
pdftoolkit -topleft 10 -font Courier -add-text "Page
%Page\nDate %d-%m-%Y" in.pdf -o out.pdf
Add a page number and date to all the pages in in.pdf using the Courier font,
writing to out.pdf
9. Multipage Facilities
pdftoolkit -twoup-stack in.pdf -o out.pdf
Two up impose the file in.pdf, writing to out.pdf
pdftoolkit -pad-after 1,3,4 in.pdf -o out.pdf
Add extra blank pages after pages one, three and four of a document.
10. Annotations
pdftoolkit -list-annotations in.pdf
List the annotations in a file in.pdf to standard output. This might produce:
--------------------------------
Annotation text content 1
--------------------------------
--------------------------------
Annotation text content 2
--------------------------------
pdftoolkit -copy-annotations from.pdf in.pdf -o out.pdf
Copy the annotations from from.pdf to in.pdf, writing to out.pdf.
11. Document Information and Metadata
pdftoolkit -set-title "The New Title" in.pdf -o out.pdf
Set the document title of in.pdf. writing to out.pdf.
pdftoolkit -hide-toolbar true in.pdf -o out.pdf
Set the document in.pdf to open with the Acrobat Viewer's toolbar hidden,
writing to out.pdf.
pdftoolkit -set-metadata metadata.xml in.pdf -o out.pdf
Set the metadata in a PDF in.pdf to the contents of the file metadata.xml, and
write the output to out.pdf.
pdftoolkit -set-page-layout TwoColumnRight in.pdf -o
out.pdf
Set the document in.pdf to open in Acrobat Viewer showing two columns of pages,
starting on the right, putting the result in out.pdf.
pdftoolkit -set-page-mode FullScreen in.pdf -o out.pdf
Set the document in.pdf to open in Acrobat Viewer in full screen mode, putting
the result in out.pdf.
12. File Attachments
pdftoolkit -attach-file sheet.xls in.pdf -o out.pdf
Attach the file sheet.xls to in.pdf, writing to out.pdf.
pdftoolkit -remove-files in.pdf -o out.pdf
Remove any attachments from in.pdf, writing to out.pdf.
13. Miscellaneous
pdftoolkit -blacktext in.pdf -o out.pdf
Blacken all the text in in.pdf, writing to out.pdf.
pdftoolkit -thinlines 2pt in.pdf -o out.pdf
Make sure all lines in in.pdf are at least 2 pts wide, writing to out.pdf.
Related Products
Tags: add text to pdf, aes, aes 128, aes 256, aes algorithm, aes decrypt, aes decryption, aes encrypt, aes encryption, aes pdf, aes protection, aes security, aes128, aes256, annotate pdf, combine pdf, compress pdf, cpdf, decompress pdf, decrypt pdf, encrypt pdf, jpdfkit, lock pdf, merge pdf, optimize pdf, overlay pdf, pdf aes, pdf annotations, pdf attachments, pdf bates, pdf bookmark, pdf box, pdf command line, pdf decryption, pdf encryption, pdf info, pdf library, pdf logo, pdf merging, pdf metadata, pdf numbers, pdf splitting, pdf stamp, pdf stamper, pdf stamping, pdf text watermark, pdf tool, pdf toolbox, pdf toolkit, pdf tools, pdf watermark, pdfbox, pdfkit, pdflib, pdftoolkit, pdftools, resize pdf, scale pdf, split pdf, split pdf by bookmark, stamp pdf, toolkit pdf, underlay pdf, unlock pdf, watermark pdf, zoom pdf