Comments (1)
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.
using MuPDFContext ctx = new MuPDFContext();
// Open a PDF document.
using MuPDFDocument doc = new MuPDFDocument(ctx, "path/to/inputFile.pdf");
// Create a list with all the pages in the document.
List<MuPDFPage> pagesToKeep = new List<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());
from mupdfcore.
Related Issues (20)
- How to improve or decrease png quality? HOT 3
- .dll problem when released HOT 3
- Method not found: 'Void MuPDFCore.MuPDFContext..ctor(Int64)'. HOT 2
- Cannot open document HOT 5
- Other output image formats HOT 3
- Accept and return ReadOnlySpan<byte> instead of IntPtr HOT 3
- do you support reading encrypted PDF files? HOT 3
- Install MuPDFCore in Blazor WebAssembly HOT 4
- PDFViewerDemo cannot chanage pages HOT 2
- show pdf files continuously HOT 1
- Don't work with musl-based linux distros HOT 2
- MuPDFCore.dll in MuPDFCore NuGet package 1.7 has no strong name HOT 3
- blank area above PDFRender
- using MuPDFRenderer control on Avalonia 11 HOT 3
- Set anti-aliasing level HOT 2
- Is there a way to support iOS and Mac Catalyst? HOT 1
- is there a plan to support the outline HOT 3
- How to extract font name, font binary data, font 2D coordinates, image binary data, image 2D coordinates within a PDF page?
- MuPDFCore.MuPDFRenderer : Incomplete Clearing of Selection Effect HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mupdfcore.