I am evaluating PDFToolbox, and believe it will help us automate our PDF processing.
I have a multi-page PDF that I want to extract each page separately, saving, renaming and encrypting each page with unique values. So, in a PDF with 5 pages, I want to end up with 5 one-page PDF files, each with a unique name and encryption password.
I am having trouble in that the following command seems to terminate normally, but I can't find the output file (if one was generated):
C:\PortableApps\PDFToolbox_Cmd\pdftoolbox.exe MultiPageSource.pdf -split -outfile %%a.pdf -ownerpassword %%b -key128bit 128
I'm invoking the command inside a loop from a batch file, where the arguments %%a and %%b resolve to a name and a number, respectively.
I know I'm missing something simple, but I can't find it. Help!
Thanks for your message, in general, you can use two command lines to finish following functions,
1. Split a PDF file with 5 pages to 5 one page PDF files,
2. Encrypt 5 PDF files with a unique name and encryption password,
The following two command lines will finish above two functions.
This command line will split a multiple PDF file to single page PDF files,
pdftoolbox.exe sample_in1.pdf -split -outfile "_outpages_%02d.pdf"
You can use following command line to encrypt one PDF file at a time,
pdftoolbox.exe sample_in1.pdf -outfile "_permit_secure.pdf" -ownerpassword 123 -key128bit -permit printing modifyannot
You can use DOS FOR Loop Command to batch encrypt all PDF files in a folder,
for %F in (D:\temp\*.pdf) do pdftoolbox.exe "%F" -outfile "%~nF.pdf" -ownerpassword 123 -key128bit -permit printing modifyannot
Please notice, if you wish include these command lines into a .bat file, you need replace all % with %%, for example,
pdftoolbox.exe sample_in1.pdf -split -outfile "_outpages_%%02d.pdf"
for %%F in (D:\temp\_outpages_*.pdf) do pdftoolbox.exe "%%F" -outfile "%%~nF.pdf" -ownerpassword 123 -key128bit -permit printing modifyannot
If you encounter any problem with above command lines, please feel free to let us know, we are glad to assist you asap.
How to make pdf file password protected?
We can easily create PDF file from MS WORD. After completing all your useful work on Microsoft office, we need to save all of our work and there comes an option which is save as in that option you can save your work in the desired format such as pdf. But we can’t make password protect pdf file through Microsoft office word because Microsoft office only supports word format file and it only converts word file but cannot protect pdf file with a password. Then, how to make password protect pdf file?
Don't worry! you also heard that saying if all road gets blocks then there still exists one way. Yes, that's true you can make your pdf file password protect with VeryPDF PDF Toolbox Command Line to protect pdf from copying. There are also many benefits of Password protected pdf document because no one can easily modify your document and cannot easily accessible to documents without a password.