Question: I am trying to write a program that takes as input a .PDF file and separates each page into their own .PDF files in Linux command line. I have tried some software but for some reason I keep getting errors. Some software has poor performance and a limitation on the size of the PDF file. Is there any good recommendation on VeryPDF?
Answer: According to your needs, maybe you can have a free trial of this software:VeryPDF PDF Toolbox Shell for Linux, by which you can merge, split, remove page, export page, encrypt, fill form, edit description information of PDF, and even repair damaged PDF. Because it is a terminal based program, it is easy to perform batch process within shell script under Linux system. Please get more detail information on homepage, in the following part, let us check how to use this software.
Supported system: all popular Linux distributions, e.g., CentOS, Red Hat, Fedora, Debian, Ubuntu, and SUSE.
- When downloading finishes, there will be an tar.gz file. Please unpack it to your disk mounted in Linux system. The executable in saved in sub directory bin, and it can be directly called in a terminal.
- When you use this software, please refer to the usage and examples.
Step 2. Split PDF by command line under Linux.
- Here is the usage for your reference: pdftoolbox <input files> [options] <-outfile output >
- When you need to
When you need to split a multiple-page PDF file into single-page PDF files, the following templates are available.
pdftoolbox in.pdf -split
pdftoolbox in.pdf -split -outfile pg_4202794.pdf
pdftoolbox in.pdf -split -outfile out_%02d.pdf
pdftoolbox in.pdf -split -outfile out_%04d.pdf
By the above command line, you can name output PDF file in different name templates.
under Mac system, please refer to the following command line templates and parameters:
When you need to split a multiple-page PDF file into several encrypted single-page PDF files and denying some limitation, please refer to the following command line templates.
pdftoolbox in.pdf -split -ownerpassword foopass -permit lowprinting
Now let us check some related parameters:
-split : split a multi-page PDF file into single-page PDF files. When , 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.
-ownerpassword : set owner password to output PDF file.
-userpassword : set user password to output PDF file.
There are more functions of this software, please check detail in user manual. During the using, if you have any question, please contact us as soon as possible.