Table of Contents

Class PdfPages

Namespace
DocWright.Formats.Pdf
Assembly
DocWright.Formats.Pdf.dll

Delete, extract, reorder, merge and split pages of existing PDFs.

public static class PdfPages
Inheritance
PdfPages
Inherited Members

Remarks

Every method here is a call into PdfPageAssembly and nothing else. They are five spellings of one operation — build a list of (source, page) pairs and write it — and the only thing that differs between them is how the list is built. None of them copies an object graph of its own; if one ever did, two of the five would have subtly different link repair and only one of them would be tested.

Page content is never touched. Pages move whole, in the encoded form the source held, so rotation, cropping, scaling, stamping and N-up are not here — each of those is a content-stream transformation rather than a page move.

Methods

Delete(byte[], PageRange, Stream, PdfAssemblyOptions?)

Writes a copy of a document with the selected pages removed.

Delete(string, PageRange, string, PdfAssemblyOptions?)

Writes a copy of a document with the selected pages removed.

DeleteInPlace(string, PageRange, PdfAssemblyOptions?)

Removes the selected pages from a document, replacing it.

Extract(byte[], PageRange, Stream, PdfAssemblyOptions?)

Writes a document containing only the selected pages, in ascending order.

Extract(string, PageRange, string, PdfAssemblyOptions?)

Writes a document containing only the selected pages, in ascending order.

ExtractInPlace(string, PageRange, PdfAssemblyOptions?)

Reduces a document to the selected pages, replacing it.

Merge(IReadOnlyList<byte[]>, Stream, PdfAssemblyOptions?)

Writes one document holding every source's pages, in the order given.

Merge(IReadOnlyList<string>, string, PdfAssemblyOptions?)

Writes one document holding every source's pages, in the order given.

Reorder(byte[], IReadOnlyList<int>, Stream, PdfAssemblyOptions?)

Writes a document whose pages are the source's in a new order.

Reorder(string, IReadOnlyList<int>, string, PdfAssemblyOptions?)

Writes a document whose pages are the source's in a new order.

ReorderInPlace(string, IReadOnlyList<int>, PdfAssemblyOptions?)

Rearranges a document's pages, replacing it.

Split(byte[], IReadOnlyList<PageRange>, IReadOnlyList<Stream>, PdfAssemblyOptions?)

Writes one document per selection, all taken from one source.

Split(string, IReadOnlyList<PageRange>, IReadOnlyList<string>, PdfAssemblyOptions?)

Writes one document per selection, all taken from one source.