When you need to split many pages PDF file to single pages and then set password to protect output PDF file, the following article will be helpful for you. Here I will show you how to use split PDF and then add password to protect them by command line. The software I use is VeryPDF PDF Toolbox Command Line, by which you can merge, split, encrypt, fill PDF form, edit PDF description information, and optimize PDF. Please check more information on homepage, in the following part, I will show you how to use this software.
- Checking from its name, we can know that this is Windows command line version software. If you need to use the Mac and Linux version of this software, there is also one available for you.
- When downloading finishes, there will be a zip file. You need to extract it to some folder then you can use it normally. In the extracted folder, you can find the executable file and help document.
Step 2. Split PDF into single pages and set password for output.
- When you use this software, please refer to the usage and examples. Here is the usage for your reference:
pdftoolbox <input files> [options] <-outfile output >
- When split PDF to single pages and set password, please refer to the following command line templates.
pdftoolbox in.pdf -split -ownerpassword foopass -permit lowprinting
By this command line, we can blast a multiple-page PDF file into several encrypted single-page PDF files and denying low-quality printing. You can also set the following options:
pdftoolbox in.pdf –split -userpassword foopass
By this command line, we can split PDF and add user or open password to output PDF file.
pdftoolbox in.pdf -split -outfile pg_4202794.pdf
pdftoolbox in.pdf -split -outfile out_%02d.pdf
pdftoolbox in.pdf -split -outfile out_%04d.pdf
The above command line and help you split PDF and name output PDF by different methods. Simply add parameters of setting password then you can do the splitting and password setting together. Now let us check related parameters:
-split : split a multi-page PDF file into single-page PDF files.When split PDF, you can add suffix like _%04d to the end
of the specified output file name so that numbers like 0001 can be added to the result file names.
-key40bit : set output PDF encryption strength as 40 bits.
-key128bit : set output PDF encryption strength as 128 bits.
-permit <permissions> : permissions are applied to the output PDF only if
encryption strength is specified or an owner or
user password is given.
printing : allow top quality printing.
lowprinting : allow lower quality printing.
modifycontents : allow modifying contents.
assembly : allow document assembly.
copying : allow copying.
screenreader : allow screenreader.
modifyannot : allow adding annotation.
filling : allow filling interactive PDF form.
allowall : allow all the above permissions and top quality
-ownerpassword : set owner password to output PDF file.
-userpassword : set user password to output PDF file.
This software also can help you merge PDF file and then set password to protect it. Please check more in our knowledge base. During the using, if you have any question, please contact us as soon as possible.