Splitting PDF File with PdfMerger

Q

How to split a PDF file using PdfMerger? I want split a PDF file into 2 parts: part 1 is from page 1 to 20 part 2 is from page 21 to the end.

✍: FYIcenter.com

A

You can run PdfMerge interactively and specify the input PDF file. Then change the value of "Pages" from "All" to "1-20". Click the "Merge/Split" button to generate the first part of the input PDF files.

Run PdfMerge interactively again and specify the input PDF file. Then change the value of "Pages" from "All" to "21". Click the "Merge/Split" button to generate the second part of the input PDF files.

You can also split the input PDF file by running PdfMerger at the command line twice with two XML files.

Create the first XML file called first.xml like this:

<?xml version="1.0" encoding="utf-8"?>
<merge>
  <file>
    <path>\fyicenter\input.pdf</path>
    <pages>1-20</pages>
  </file>
</merge>

Create the second XML file called second.xml like this:

<?xml version="1.0" encoding="utf-8"?>
<merge>
  <file>
    <path>\fyicenter\input.pdf</path>
    <pages>21</pages>
  </file>
</merge>

Then run the following commands: \fyicenter\PdfMerge first.xml output1.pdf \fyicenter\PdfMerge second.xml output2.pdf

2015-05-30, 1225🔥, 0💬