Saturday, October 4, 2014

Tool for manipulating PDF documents: pdftk

Following this old post I want to suggest this fantastic and easy tool for manipulating PDF documents: pdftk. I used it to merge PDF files with this commands:

cd my_directory_with_pdf_files

pdftk chapter*.pdf cat output allchaptersmerged.pdf

A useful list of command is here
http://nithinkk.wordpress.com/2011/02/26/pdftk-merge-split-pdf-files/

for example:
Split Select Pages from Multiple PDFs into a New Document
 pdftk A=one.pdf B=two.pdf cat A1-7 B1-5 A8 output combined.pdf
Join Two Files, One of Which is Encrypted (the Output is Not Encrypted)
pdftk A=secured.pdf mydoc.pdf input_pw A=foopass cat output comb.pdf
Uncompress PDF Page Streams for Editing the PDF Code in a Text Editor
 pdftk mydoc.pdf output mydoc.clear.pdf uncompress
Repair a PDF’s Corrupted XREF Table and Stream Lengths (If Possible)
 pdftk broken.pdf output fixed.pdf
Burst a Single PDF Document into Single Pages and Report its Data to doc_data.txt
    pdftk mydoc.pdf burst 

No comments:

Post a Comment

AddToAny