Working with PdfDocumentEditor Class
The PdfDocumentEditor class is designed to manipulate pdf document, including merge/append/insert/split/extract pages to/from pdf document.
All action (except extract and split) you performed on pdf document object will be preserved in memory until you explicitly save it by using Save() method. That means, the orginal pdf document is safe from harm when you perform action with them. But of course don't forget to SAVE changes to a file or stream, when you done modification; otherwise, all changes are lost.
Merge:
By using this method, we can combine 2 pdf documents into 1 pdf document.
Append:
By using this method, we can append specified pages (by indicating start page, end page; or an array of page numbers) from another file onto current pdf document.
Insert:
This method is similar to above append method, but with one extra parameter to indicate the position where you want the newly inserted pages to be. By specifing 0, you mean to insert them into the beginning of the current pdf document.
Split:
By using this method, all pages from current pdf document will be break into single page file. So if your current pdf document contains 10 pages, then the result will be 10 separate files with each file contians just 1 page from orginal file. This method can wtite result files onto disk, or output them as stream array.
Extract:
This method is kinda like above Split method, but with more control: ypu can specify page ranges (by indicating start page, end page; or an array of pages), then the pages you specified will be a new file write onto disk, or as an output stream.