As my B-Tech Final Year Project is almost finished, now I can relax more and get back to blogging like before. Sorry for such a long gap. Now no more. CHEERS!!!
Yesterday, I was stuck when my friend asked me about software to merge two or more PDF documents at one go. I knew many software but none were as fast as desired and also most of them were not free as well.
Recently, I found a tool that can easily merge, split and repair your PDF files at such a rapid pace that you wouldn’t believe it. Not only that you can also decrypt, encrypt and rotate your PDF files. With no installation needed, PDFTK (PDF Tool Kit) is a command-line tool for doing everyday things with PDF documents. It does not require Acrobat, and it runs on Windows, Linux, Mac OS X, FreeBSD and Solaris.
First download the tool from this location. After you have downloaded the software, unzip it to the location easily accessible from command prompt. In my case I have copied the file PDFTK to C: / and also all the required PDF files to the same location. Open a command prompt and type pdftk --help. You should get various usage instructions.
Pdftk can also be used for many other functions such as the following:-
- Merge PDF Documents
- Split PDF Pages into a New Document
- Rotate PDF Pages or Documents
- Decrypt Input as Necessary (Password Required)
- Encrypt Output as Desired
- Fill PDF Forms with FDF Data or XFDF Data and/or Flatten Forms
- Apply a Background Watermark or a Foreground Stamp
- Report on PDF Metrics such as Metadata, Bookmarks, and Page Labels
- Update PDF Metadata
- Attach Files to PDF Pages or the PDF Document
- Unpack PDF Attachments
- Burst a PDF Document into Single Pages
- Uncompress and Re-Compress Page Streams
- Repair Corrupted PDF (Where Possible)
Below are the different commands by which you can manipulate various PDF files. Open Command Prompt and go to the location where you have copied your pdftk file along with other pdf files. At that location perform the below mentioned commands to get the desired outputs.
Merge Two or More PDFs into a New Document
pdftk 1.pdf 2.pdf 3.pdf cat output 123.pdf
Split Select Pages from Multiple PDFs into a New Documentpdftk A=one.pdf B=two.pdf cat A1-7 B1-5 A8 output combined.pdf
Rotate the First Page of a PDF to 90 Degrees Clockwise
pdftk in.pdf cat 1E 2-end output out.pdf
Rotate an Entire PDF Document’s Pages to 180 Degrees
pdftk in.pdf cat 1-endS output out.pdf
Encrypt a PDF using 128-Bit Strength (the Default) and Withhold All Permissions (the Default)
pdftk mydoc.pdf output mydoc.128.pdf owner_pw foopass
Same as Above, Except a Password is Required to Open the PDF
pdftk mydoc.pdf output mydoc.128.pdf owner_pw foo user_pw baz
Same as Above, Except Printing is Allowed (after the PDF is Open)
pdftk mydoc.pdf output mydoc.128.pdf owner_pw foo user_pw baz allow printing
Decrypt a PDF
pdftk secured.pdf input_pw foopass output unsecured.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 combined.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
Report on PDF Document Metadata, Bookmarks and Page Labels
pdftk mydoc.pdf dump_data output report.txt
Hope you like the above mentioned utility. Try it and if you encounter any problem, please share that with us. We will try to resolve it as soon as possible.
Other than that, do you know any other similar utility that is as fast and as efficient as this? Do share that with us as well.