Pdf Handler Home
Brought to you by:
mariasekar
Blog: [http://vmariasekar.blogspot.com/]
PDF Handler is a pdf command line utility.
Common execution format is
c:\Pdfhandler.exe <<action name>> << Options specific to the action >>
The Pdfhandler.exe will do the below operations,
1. PDF Merge.
It will merge the given pdf documents into single one.
Format :
c:\Pdfhandler.exe merge <<file names separated by space>>
The final name will be name of the target file name.
Ex:
c:\Pdfhandler.exe merge F:\Sekar\dev\Books\DesignJava.pdf F:\Spring_Tutorial.pdf merge.pdf
2. Pdf informations
It will display informations related the given pdf documents
Format:
c:\Pdfhandler.exe info <<PDF file names>>
Ex:
c:\Pdfhandler.exe info F:\Sekar\dev\Books\DesignJava.pdf F:\Spring_Tutorial.pdf
3. Security (Encryption/Decryption)
It will secure your given pdf file by doing the encryption and decryption operations
Format:
Decryption:
c:\Pdfhandler.exe decrypt <<Encrypted Source pdf file name>> <<Password>> <<Decrypted output file name>>
Encryption:
c:\Pdfhandler.exe encrypt <<Source pdf file name>> <<Password>> <<Encrypted output file name>>
Ex:
Decryption:
c:\Pdfhandler.exe decrypt F:\Spring_Tutorial.pdf hello h:\decryptedspringtutorial.pdf
Encryption:
c:\Pdfhandler.exe decrypt F:\Spring_Tutorial.pdf hello h:\encryptedspringtutorial.pdf
4. Document splitter
This action will create individual pdf documents from the given single document.
Based on the given page limits it will create the sub documents.
Format:
c:\Pdfhandler.exe split <<Source File name>> <<page range limits separated by space>>
Ex:
c:\Pdfhandler.exe split F:\Sekar\dev\Books\designjava.pdf 1 23 s34-37 40-45
The above command will create below documents with the pages of original document,
1.pdf
2.pdf
34.pdf
35.pdf
36.pdf
37.pdf
40-45.pdf
It will use the range values as new document's file names.
The "s" prefix indicates that from page 34-37 will be splitted into single pages.
If you didn't mention it in prefix then by default it will considered as normal page range for a single document (Ex : 40-45.pdf).
Note: You can also mention the output folder as last parameter. If you are not given then it will use the current folder as output folder.
Format:
c:\Pdfhandler.exe sign << input.properties file>>
Ex:
c:\Pdfhandler.exe sign input.properties
The above command will create signed documents based on the given properties file.
Sample properties file is also shipped with the build.
Note:
To sign a document the end users needs to create a keystore file using the java keytool.
To know more about keytool and keystore file please go through the below link,
"http://download.oracle.com/javase/1.5.0/docs/tooldocs/windows/keytool.html"
If you want to learn more on this please search this on web.