pvginkel / PdfiumViewer

PDF viewer based on Google's PDFium.
Apache License 2.0
966 stars 418 forks source link

Create new pdf with some pages of Pdf #153

Open okonca opened 6 years ago

okonca commented 6 years ago

Hi Is there a way to create new pdf with some page of the file. For example I want to create a new pdf file with 2nd and 3rd page of the file.

noctis0430 commented 5 years ago

It is possible to create a new pdf file with some pages of the file, by deleting pages that are not desired.

var foo = PdfDocument.Load("pdf_sample.pdf");
// 0-based.
foo.DeletePage(1);
foo.Save(@"D:\test.pdf");