You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! Sure, you can use the MuPDFDocument.CreateDocument static method to create a new PDF file using only some pages from another document:
// Create a new context.usingMuPDFContextctx=new MuPDFContext();// Open a PDF document.usingMuPDFDocumentdoc=new MuPDFDocument(ctx,"path/to/inputFile.pdf");// Create a list with all the pages in the document.List<MuPDFPage>pagesToKeep=newList<MuPDFPage>(doc.Pages);// Remove some pages.
pagesToKeep.Remove(doc.Pages[2]);
pagesToKeep.Remove(doc.Pages[4]);// Create a new document with the specified pages.
MuPDFDocument.CreateDocument(ctx,"path/to/outputFile.pdf", DocumentOutputFileTypes.PDF, pages: pagesToKeep.ToArray());
Do you support deleting pages
The text was updated successfully, but these errors were encountered: