Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

PdfDocumentPages

OfficeIMO.Pdf

Namespace
OfficeIMO.Pdf
Assembly
OfficeIMO.Pdf
Source revision
be6c300e4ab1 with working tree changes
Implements
IReadOnlyList<PdfReadPage> IReadOnlyCollection<PdfReadPage> IEnumerable<PdfReadPage> IEnumerable
Modifiers
sealed
Attributes
DefaultMember("Item")

Fluent page extraction and editing operations for a PdfDocument.

Inheritance

  • object
  • PdfDocumentPages

Remarks

Native page coordinates use default user-space units: one unit is /UserUnit physical points (1/72 inch each), defaulting to 1. Local text/font and matrix values retain their native coordinate spaces. Explicit visual projections use their documented coordinates.

Usage

Explore 1 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Returned or exposed by 1

Methods

Append 8 overloads
public PdfDocument Append(PdfDocument sourceDocument, PdfPageImportOptions? importOptions = null, CancellationToken cancellationToken = default) #

Appends all pages from another loaded or generated PDF to this document.

Parameters

sourceDocument OfficeIMO.Pdf.PdfDocument required
importOptions OfficeIMO.Pdf.PdfPageImportOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional
public PdfDocument Append(PdfDocument sourceDocument, PdfPageSelection sourceSelection, PdfPageImportOptions? importOptions = null, CancellationToken cancellationToken = default) #

Appends selected one-based pages from another loaded or generated PDF to this document.

Parameters

sourceDocument OfficeIMO.Pdf.PdfDocument required
sourceSelection OfficeIMO.Pdf.PdfPageSelection required
importOptions OfficeIMO.Pdf.PdfPageImportOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional
public PdfDocument Append(byte[] sourcePdf, PdfPageImportOptions? importOptions = null, CancellationToken cancellationToken = default) #

Appends all pages from source PDF bytes to this document.

Parameters

sourcePdf byte[] required
importOptions OfficeIMO.Pdf.PdfPageImportOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional
public PdfDocument Append(byte[] sourcePdf, PdfPageSelection sourceSelection, PdfPageImportOptions? importOptions = null, CancellationToken cancellationToken = default) #

Appends selected one-based pages from source PDF bytes to this document.

Parameters

sourcePdf byte[] required
sourceSelection OfficeIMO.Pdf.PdfPageSelection required
importOptions OfficeIMO.Pdf.PdfPageImportOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional
public PdfDocument Append(Stream sourceStream, PdfPageImportOptions? importOptions = null, CancellationToken cancellationToken = default) #

Appends all pages from a readable source PDF stream to this document.

Parameters

sourceStream System.IO.Stream required
importOptions OfficeIMO.Pdf.PdfPageImportOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional
public PdfDocument Append(Stream sourceStream, PdfPageSelection sourceSelection, PdfPageImportOptions? importOptions = null, CancellationToken cancellationToken = default) #

Appends selected one-based pages from a readable source PDF stream to this document.

Parameters

sourceStream System.IO.Stream required
sourceSelection OfficeIMO.Pdf.PdfPageSelection required
importOptions OfficeIMO.Pdf.PdfPageImportOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional
public PdfDocument Append(string sourcePath, PdfPageImportOptions? importOptions = null, CancellationToken cancellationToken = default) #

Appends all pages from a source PDF file to this document.

Parameters

sourcePath string required
importOptions OfficeIMO.Pdf.PdfPageImportOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional
public PdfDocument Append(string sourcePath, PdfPageSelection sourceSelection, PdfPageImportOptions? importOptions = null, CancellationToken cancellationToken = default) #

Appends selected one-based pages from a source PDF file to this document.

Parameters

sourcePath string required
sourceSelection OfficeIMO.Pdf.PdfPageSelection required
importOptions OfficeIMO.Pdf.PdfPageImportOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional
ApplyAttributes 2 overloads
public PdfDocument ApplyAttributes(params PdfPageAttributeEdit[] edits) #

Applies ordered page-attribute edits atomically through one output revision or rewrite.

Parameters

edits OfficeIMO.Pdf.PdfPageAttributeEdit[] required
public PdfDocument ApplyAttributes(IReadOnlyList<PdfPageAttributeEdit> edits, CancellationToken cancellationToken = default) #

Applies page-attribute edits atomically while observing cancellation.

Parameters

edits System.Collections.Generic.IReadOnlyList<OfficeIMO.Pdf.PdfPageAttributeEdit> required
cancellationToken System.Threading.CancellationToken = default optional
BookmarkPageRanges 4 overloads
public IReadOnlyList<PdfBookmarkPageRange> BookmarkPageRanges(params string[] bookmarkTitles) #

Returns outline/bookmark-derived page ranges in document order.

Parameters

bookmarkTitles string[] required

Returns

IReadOnlyList<PdfBookmarkPageRange>
public IReadOnlyList<PdfBookmarkPageRange> BookmarkPageRanges(int level, params string[] bookmarkTitles) #

Returns sections at a one-based outline level, retaining nested pages up to the next bookmark at the same or an outer level.

Parameters

level int required
bookmarkTitles string[] required

Returns

IReadOnlyList<PdfBookmarkPageRange>
public IReadOnlyList<PdfBookmarkPageRange> BookmarkPageRanges(int level, IReadOnlyList<string> bookmarkTitles, CancellationToken cancellationToken = default) #

Returns outline-level sections with cancellation and optional exact title selection.

Parameters

level int required
bookmarkTitles System.Collections.Generic.IReadOnlyList<string> required
cancellationToken System.Threading.CancellationToken = default optional

Returns

IReadOnlyList<PdfBookmarkPageRange>
public IReadOnlyList<PdfBookmarkPageRange> BookmarkPageRanges(IReadOnlyList<string> bookmarkTitles, CancellationToken cancellationToken = default) #

Resolves bookmark ranges while observing cancellation and retaining captured read limits.

Parameters

bookmarkTitles System.Collections.Generic.IReadOnlyList<string> required
cancellationToken System.Threading.CancellationToken = default optional

Returns

IReadOnlyList<PdfBookmarkPageRange>
CropAndTranslate 2 overloads
public PdfDocument CropAndTranslate(double left, double bottom, double right, double top, params int[] pageNumbers) #

Non-destructively crops selected pages and translates the chosen source rectangle to a zero-based page origin. Content outside the rectangle remains in source streams but is clipped from display.

Parameters

left double required
bottom double required
right double required
top double required
pageNumbers int[] required
public PdfDocument CropAndTranslate(double left, double bottom, double right, double top, PdfPageSelection? selection, CancellationToken cancellationToken = default) #

Crops and translates selected pages while retaining the source read options and observing cancellation.

Parameters

left double required
bottom double required
right double required
top double required
selection OfficeIMO.Pdf.PdfPageSelection? required
cancellationToken System.Threading.CancellationToken = default optional
Delete 9 overloads
public PdfDocument Delete(params int[] pageNumbers) #

Creates a new PDF with selected pages deleted.

Parameters

pageNumbers int[] required
public PdfDocument Delete(PdfPageRange pageRange) #

Creates a new PDF with one inclusive page range deleted.

Parameters

pageRange OfficeIMO.Pdf.PdfPageRange required
public PdfDocument Delete(PdfPageSelection selection) #

Creates a new PDF with selected pages deleted.

Parameters

selection OfficeIMO.Pdf.PdfPageSelection required
public PdfDocument Delete(string pageRanges) #

Creates a new PDF with comma- or semicolon-separated inclusive page ranges deleted.

Parameters

pageRanges string required
public PdfDocument Delete(PdfPageSelection selection, CancellationToken cancellationToken) #

Deletes the selected pages with cancellation through selection, rewriting, and output adoption.

Parameters

selection OfficeIMO.Pdf.PdfPageSelection required
cancellationToken System.Threading.CancellationToken required
public PdfDocument Delete(OfficePageSelector selector, CancellationToken cancellationToken) #

Deletes pages resolved by a document-relative selector with cooperative cancellation.

Parameters

selector OfficeIMO.OfficePageSelector required
cancellationToken System.Threading.CancellationToken required
public PdfDocument Delete(string pageRanges, CancellationToken cancellationToken) #

Deletes parsed page ranges with cooperative cancellation.

Parameters

pageRanges string required
cancellationToken System.Threading.CancellationToken required
public PdfDocument Delete(PdfPageRange pageRange, CancellationToken cancellationToken) #

Deletes an inclusive page range with cooperative cancellation.

Parameters

pageRange OfficeIMO.Pdf.PdfPageRange required
cancellationToken System.Threading.CancellationToken required
public PdfDocument Delete(OfficePageSelector selector) #

Creates a new PDF with pages resolved from a document-relative selector deleted.

Parameters

selector OfficeIMO.OfficePageSelector required
public PdfDestructiveCropResult DestructiveCrop(double left, double bottom, double right, double top, PdfDestructiveCropOptions? options = null, PdfPageSelection? selection = null, CancellationToken cancellationToken = default) #

Destructively crops selected pages, or every page when selection is null, by replacing the retained visual rectangle with a validated opaque raster page.

Parameters

left double required
bottom double required
right double required
top double required
options OfficeIMO.Pdf.PdfDestructiveCropOptions? = null optional
selection OfficeIMO.Pdf.PdfPageSelection? = null optional
cancellationToken System.Threading.CancellationToken = default optional
Duplicate 9 overloads
public PdfDocument Duplicate(params int[] pageNumbers) #

Creates a new PDF with selected pages duplicated immediately after each source page.

Parameters

pageNumbers int[] required
public PdfDocument Duplicate(PdfPageRange pageRange) #

Creates a new PDF with one inclusive page range duplicated.

Parameters

pageRange OfficeIMO.Pdf.PdfPageRange required
public PdfDocument Duplicate(PdfPageSelection selection) #

Creates a new PDF with selected pages duplicated immediately after each source page.

Parameters

selection OfficeIMO.Pdf.PdfPageSelection required
public PdfDocument Duplicate(string pageRanges) #

Creates a new PDF with parsed page ranges duplicated.

Parameters

pageRanges string required
public PdfDocument Duplicate(PdfPageSelection selection, CancellationToken cancellationToken) #

Duplicates the selected pages with cancellation through selection, rewriting, and output adoption.

Parameters

selection OfficeIMO.Pdf.PdfPageSelection required
cancellationToken System.Threading.CancellationToken required
public PdfDocument Duplicate(OfficePageSelector selector, CancellationToken cancellationToken) #

Duplicates pages resolved by a document-relative selector with cooperative cancellation.

Parameters

selector OfficeIMO.OfficePageSelector required
cancellationToken System.Threading.CancellationToken required
public PdfDocument Duplicate(string pageRanges, CancellationToken cancellationToken) #

Duplicates parsed page ranges with cooperative cancellation.

Parameters

pageRanges string required
cancellationToken System.Threading.CancellationToken required
public PdfDocument Duplicate(PdfPageRange pageRange, CancellationToken cancellationToken) #

Duplicates an inclusive page range with cooperative cancellation.

Parameters

pageRange OfficeIMO.Pdf.PdfPageRange required
cancellationToken System.Threading.CancellationToken required
public PdfDocument Duplicate(OfficePageSelector selector) #

Creates a new PDF with pages resolved from a document-relative selector duplicated.

Parameters

selector OfficeIMO.OfficePageSelector required
Extract 10 overloads
public PdfDocument Extract(PdfPageRange pageRange, CancellationToken cancellationToken) #

Extracts one inclusive page range while observing cancellation through parsing, rewriting and output adoption.

Parameters

pageRange OfficeIMO.Pdf.PdfPageRange required
cancellationToken System.Threading.CancellationToken required
public PdfDocument Extract(PdfPageSelection selection, CancellationToken cancellationToken) #

Extracts a selection while observing cancellation and retaining this document's captured read limits.

Parameters

selection OfficeIMO.Pdf.PdfPageSelection required
cancellationToken System.Threading.CancellationToken required
public PdfDocument Extract(string pageRanges, CancellationToken cancellationToken) #

Extracts parsed page ranges while observing cancellation and retaining the source document unchanged.

Parameters

pageRanges string required
cancellationToken System.Threading.CancellationToken required
public PdfDocument Extract(OfficePageSelector selector, CancellationToken cancellationToken) #

Extracts a document-relative selection while observing cancellation during resolution and rewriting.

Parameters

selector OfficeIMO.OfficePageSelector required
cancellationToken System.Threading.CancellationToken required
public PdfDocument Extract(params int[] pageNumbers) #

Creates a new PDF containing selected pages in caller order.

Parameters

pageNumbers int[] required
public PdfDocument Extract(CancellationToken cancellationToken, params int[] pageNumbers) #

Creates a new PDF containing selected pages in caller order with cooperative cancellation.

Parameters

cancellationToken System.Threading.CancellationToken required
pageNumbers int[] required
public PdfDocument Extract(PdfPageRange pageRange) #

Creates a new PDF containing one inclusive one-based page range.

Parameters

pageRange OfficeIMO.Pdf.PdfPageRange required
public PdfDocument Extract(PdfPageSelection selection) #

Creates a new PDF containing selected pages in caller order.

Parameters

selection OfficeIMO.Pdf.PdfPageSelection required
public PdfDocument Extract(string pageRanges) #

Creates a new PDF containing comma- or semicolon-separated inclusive page ranges.

Parameters

pageRanges string required
public PdfDocument Extract(OfficePageSelector selector) #

Creates a new PDF containing pages resolved from a document-relative selector.

Parameters

selector OfficeIMO.OfficePageSelector required
public IEnumerator<PdfReadPage> GetEnumerator() #

Enumerates pages in document order.

Returns

IEnumerator<PdfReadPage>
public PdfImpositionResult ImposeBooklet(PdfBookletOptions options, PdfPageSelection? selection = null) #

Creates a two-up duplex booklet in front/back print order. Source pages become visual sheet content.

Parameters

options OfficeIMO.Pdf.PdfBookletOptions required
selection OfficeIMO.Pdf.PdfPageSelection? = null optional
public PdfImpositionResult ImposeNUp(PdfNUpOptions options, PdfPageSelection? selection = null) #

Places selected source pages onto printable sheets as vector page content and returns their cell mapping.

Parameters

options OfficeIMO.Pdf.PdfNUpOptions required
selection OfficeIMO.Pdf.PdfPageSelection? = null optional
Insert 8 overloads
public PdfDocument Insert(int insertBeforePageNumber, PdfDocument sourceDocument, PdfPageImportOptions? importOptions = null, CancellationToken cancellationToken = default) #

Inserts all pages from another loaded or generated PDF before the supplied one-based page number. Use target page count + 1 to insert at the end.

Parameters

insertBeforePageNumber int required
sourceDocument OfficeIMO.Pdf.PdfDocument required
importOptions OfficeIMO.Pdf.PdfPageImportOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional
public PdfDocument Insert(int insertBeforePageNumber, PdfDocument sourceDocument, PdfPageSelection sourceSelection, PdfPageImportOptions? importOptions = null, CancellationToken cancellationToken = default) #

Inserts selected one-based pages from another loaded or generated PDF before the supplied one-based page number. Use target page count + 1 to insert at the end.

Parameters

insertBeforePageNumber int required
sourceDocument OfficeIMO.Pdf.PdfDocument required
sourceSelection OfficeIMO.Pdf.PdfPageSelection required
importOptions OfficeIMO.Pdf.PdfPageImportOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional
public PdfDocument Insert(int insertBeforePageNumber, byte[] sourcePdf, PdfPageImportOptions? importOptions = null, CancellationToken cancellationToken = default) #

Inserts all pages from source PDF bytes before the supplied one-based page number. Use target page count + 1 to insert at the end.

Parameters

insertBeforePageNumber int required
sourcePdf byte[] required
importOptions OfficeIMO.Pdf.PdfPageImportOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional
public PdfDocument Insert(int insertBeforePageNumber, byte[] sourcePdf, PdfPageSelection sourceSelection, PdfPageImportOptions? importOptions = null, CancellationToken cancellationToken = default) #

Inserts selected one-based pages from source PDF bytes before the supplied one-based page number. Use target page count + 1 to insert at the end.

Parameters

insertBeforePageNumber int required
sourcePdf byte[] required
sourceSelection OfficeIMO.Pdf.PdfPageSelection required
importOptions OfficeIMO.Pdf.PdfPageImportOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional
public PdfDocument Insert(int insertBeforePageNumber, Stream sourceStream, PdfPageImportOptions? importOptions = null, CancellationToken cancellationToken = default) #

Inserts all pages from a readable source PDF stream before the supplied one-based page number. Use target page count + 1 to insert at the end.

Parameters

insertBeforePageNumber int required
sourceStream System.IO.Stream required
importOptions OfficeIMO.Pdf.PdfPageImportOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional
public PdfDocument Insert(int insertBeforePageNumber, Stream sourceStream, PdfPageSelection sourceSelection, PdfPageImportOptions? importOptions = null, CancellationToken cancellationToken = default) #

Inserts selected one-based pages from a readable source PDF stream before the supplied one-based page number. Use target page count + 1 to insert at the end.

Parameters

insertBeforePageNumber int required
sourceStream System.IO.Stream required
sourceSelection OfficeIMO.Pdf.PdfPageSelection required
importOptions OfficeIMO.Pdf.PdfPageImportOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional
public PdfDocument Insert(int insertBeforePageNumber, string sourcePath, PdfPageImportOptions? importOptions = null, CancellationToken cancellationToken = default) #

Inserts all pages from a source PDF file before the supplied one-based page number. Use target page count + 1 to insert at the end.

Parameters

insertBeforePageNumber int required
sourcePath string required
importOptions OfficeIMO.Pdf.PdfPageImportOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional
public PdfDocument Insert(int insertBeforePageNumber, string sourcePath, PdfPageSelection sourceSelection, PdfPageImportOptions? importOptions = null, CancellationToken cancellationToken = default) #

Inserts selected one-based pages from a source PDF file before the supplied one-based page number. Use target page count + 1 to insert at the end.

Parameters

insertBeforePageNumber int required
sourcePath string required
sourceSelection OfficeIMO.Pdf.PdfPageSelection required
importOptions OfficeIMO.Pdf.PdfPageImportOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional
Move 9 overloads
public PdfDocument Move(int insertBeforePageNumber, params int[] pageNumbers) #

Creates a new PDF with selected pages moved before the supplied one-based page number. Use page count + 1 to move pages to the end.

Parameters

insertBeforePageNumber int required
pageNumbers int[] required
public PdfDocument Move(int insertBeforePageNumber, PdfPageRange pageRange) #

Creates a new PDF with one inclusive page range moved before the supplied one-based page number. Use page count + 1 to move pages to the end.

Parameters

insertBeforePageNumber int required
pageRange OfficeIMO.Pdf.PdfPageRange required
public PdfDocument Move(int insertBeforePageNumber, PdfPageSelection selection) #

Creates a new PDF with selected pages moved before the supplied one-based page number. Use page count + 1 to move pages to the end.

Parameters

insertBeforePageNumber int required
selection OfficeIMO.Pdf.PdfPageSelection required
public PdfDocument Move(int insertBeforePageNumber, string pageRanges) #

Creates a new PDF with parsed page ranges moved before the supplied one-based page number. Use page count + 1 to move pages to the end.

Parameters

insertBeforePageNumber int required
pageRanges string required
public PdfDocument Move(int insertBeforePageNumber, PdfPageSelection selection, CancellationToken cancellationToken) #

Moves the selected pages with cancellation through selection, rewriting, and output adoption.

Parameters

insertBeforePageNumber int required
selection OfficeIMO.Pdf.PdfPageSelection required
cancellationToken System.Threading.CancellationToken required
public PdfDocument Move(int insertBeforePageNumber, OfficePageSelector selector, CancellationToken cancellationToken) #

Moves pages resolved by a document-relative selector with cooperative cancellation.

Parameters

insertBeforePageNumber int required
selector OfficeIMO.OfficePageSelector required
cancellationToken System.Threading.CancellationToken required
public PdfDocument Move(int insertBeforePageNumber, string pageRanges, CancellationToken cancellationToken) #

Moves parsed page ranges with cooperative cancellation.

Parameters

insertBeforePageNumber int required
pageRanges string required
cancellationToken System.Threading.CancellationToken required
public PdfDocument Move(int insertBeforePageNumber, PdfPageRange pageRange, CancellationToken cancellationToken) #

Moves an inclusive page range with cooperative cancellation.

Parameters

insertBeforePageNumber int required
pageRange OfficeIMO.Pdf.PdfPageRange required
cancellationToken System.Threading.CancellationToken required
public PdfDocument Move(int insertBeforePageNumber, OfficePageSelector selector) #

Moves pages resolved from a document-relative selector before a one-based page number.

Parameters

insertBeforePageNumber int required
selector OfficeIMO.OfficePageSelector required
public PdfDocument NormalizeRotation(PdfPageSelection? selection = null, CancellationToken cancellationToken = default) #

Bakes selected pages' effective quarter-turn rotation into their content and geometry while preserving appearance.

Parameters

selection OfficeIMO.Pdf.PdfPageSelection? = null optional
cancellationToken System.Threading.CancellationToken = default optional
Prepend 8 overloads
public PdfDocument Prepend(PdfDocument sourceDocument, PdfPageImportOptions? importOptions = null, CancellationToken cancellationToken = default) #

Prepends all pages from another loaded or generated PDF before this document.

Parameters

sourceDocument OfficeIMO.Pdf.PdfDocument required
importOptions OfficeIMO.Pdf.PdfPageImportOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional
public PdfDocument Prepend(PdfDocument sourceDocument, PdfPageSelection sourceSelection, PdfPageImportOptions? importOptions = null, CancellationToken cancellationToken = default) #

Prepends selected one-based pages from another loaded or generated PDF before this document.

Parameters

sourceDocument OfficeIMO.Pdf.PdfDocument required
sourceSelection OfficeIMO.Pdf.PdfPageSelection required
importOptions OfficeIMO.Pdf.PdfPageImportOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional
public PdfDocument Prepend(byte[] sourcePdf, PdfPageImportOptions? importOptions = null, CancellationToken cancellationToken = default) #

Prepends all pages from source PDF bytes before this document.

Parameters

sourcePdf byte[] required
importOptions OfficeIMO.Pdf.PdfPageImportOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional
public PdfDocument Prepend(byte[] sourcePdf, PdfPageSelection sourceSelection, PdfPageImportOptions? importOptions = null, CancellationToken cancellationToken = default) #

Prepends selected one-based pages from source PDF bytes before this document.

Parameters

sourcePdf byte[] required
sourceSelection OfficeIMO.Pdf.PdfPageSelection required
importOptions OfficeIMO.Pdf.PdfPageImportOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional
public PdfDocument Prepend(Stream sourceStream, PdfPageImportOptions? importOptions = null, CancellationToken cancellationToken = default) #

Prepends all pages from a readable source PDF stream before this document.

Parameters

sourceStream System.IO.Stream required
importOptions OfficeIMO.Pdf.PdfPageImportOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional
public PdfDocument Prepend(Stream sourceStream, PdfPageSelection sourceSelection, PdfPageImportOptions? importOptions = null, CancellationToken cancellationToken = default) #

Prepends selected one-based pages from a readable source PDF stream before this document.

Parameters

sourceStream System.IO.Stream required
sourceSelection OfficeIMO.Pdf.PdfPageSelection required
importOptions OfficeIMO.Pdf.PdfPageImportOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional
public PdfDocument Prepend(string sourcePath, PdfPageImportOptions? importOptions = null, CancellationToken cancellationToken = default) #

Prepends all pages from a source PDF file before this document.

Parameters

sourcePath string required
importOptions OfficeIMO.Pdf.PdfPageImportOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional
public PdfDocument Prepend(string sourcePath, PdfPageSelection sourceSelection, PdfPageImportOptions? importOptions = null, CancellationToken cancellationToken = default) #

Prepends selected one-based pages from a source PDF file before this document.

Parameters

sourcePath string required
sourceSelection OfficeIMO.Pdf.PdfPageSelection required
importOptions OfficeIMO.Pdf.PdfPageImportOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional
Reorder 7 overloads
public PdfDocument Reorder(params int[] pageNumbers) #

Creates a new PDF with every page copied in the specified one-based order.

Parameters

pageNumbers int[] required
public PdfDocument Reorder(string pageRanges) #

Creates a new PDF with every page copied in parsed page-range order.

Parameters

pageRanges string required
public PdfDocument Reorder(PdfPageSelection selection) #

Creates a new PDF with every page copied in the selected one-based order.

Parameters

selection OfficeIMO.Pdf.PdfPageSelection required
public PdfDocument Reorder(PdfPageSelection selection, CancellationToken cancellationToken) #

Reorders the selected pages with cancellation through selection, rewriting, and output adoption.

Parameters

selection OfficeIMO.Pdf.PdfPageSelection required
cancellationToken System.Threading.CancellationToken required
public PdfDocument Reorder(OfficePageSelector selector, CancellationToken cancellationToken) #

Reorders pages resolved by a document-relative selector with cooperative cancellation.

Parameters

selector OfficeIMO.OfficePageSelector required
cancellationToken System.Threading.CancellationToken required
public PdfDocument Reorder(string pageRanges, CancellationToken cancellationToken) #

Reorders parsed page ranges with cooperative cancellation.

Parameters

pageRanges string required
cancellationToken System.Threading.CancellationToken required
public PdfDocument Reorder(OfficePageSelector selector) #

Creates a new PDF with pages copied in the order resolved by a document-relative selector.

Parameters

selector OfficeIMO.OfficePageSelector required
ReorderWithMapping 2 overloads
public PdfPageRewriteResult ReorderWithMapping(params int[] pageNumbers) #

Reorders every page and reports the object numbers needed to retain annotation or object selections.

Parameters

pageNumbers int[] required
public PdfPageRewriteResult ReorderWithMapping(PdfPageSelection order, CancellationToken cancellationToken = default) #

Reorders pages and reports object remapping with cooperative cancellation.

Parameters

order OfficeIMO.Pdf.PdfPageSelection required
cancellationToken System.Threading.CancellationToken = default optional
Resize 3 overloads
public PdfDocument Resize(PdfPageSize pageSize, params int[] pageNumbers) #

Resizes selected pages to the supplied page size.

Parameters

pageSize OfficeIMO.Pdf.PdfPageSize required
pageNumbers int[] required
public PdfDocument Resize(PdfPageResizeOptions options, PdfPageSelection? selection = null, CancellationToken cancellationToken = default) #

Resizes selected pages, or every page when selection is null, with explicit fit, fill, alignment, and scaling settings.

Parameters

options OfficeIMO.Pdf.PdfPageResizeOptions required
selection OfficeIMO.Pdf.PdfPageSelection? = null optional
cancellationToken System.Threading.CancellationToken = default optional
public PdfDocument Resize(PdfPageSize pageSize, PdfPageSelection? selection, CancellationToken cancellationToken = default) #

Resizes selected pages with cooperative cancellation.

Parameters

pageSize OfficeIMO.Pdf.PdfPageSize required
selection OfficeIMO.Pdf.PdfPageSelection? required
cancellationToken System.Threading.CancellationToken = default optional
Rotate 9 overloads
public PdfDocument Rotate(int rotationDegrees, params int[] pageNumbers) #

Creates a new PDF with selected pages rotated. Supplying no page numbers rotates every page.

Parameters

rotationDegrees int required
pageNumbers int[] required
public PdfDocument Rotate(int rotationDegrees, PdfPageRange pageRange) #

Creates a new PDF with one inclusive page range rotated.

Parameters

rotationDegrees int required
pageRange OfficeIMO.Pdf.PdfPageRange required
public PdfDocument Rotate(int rotationDegrees, PdfPageSelection selection) #

Creates a new PDF with selected pages rotated.

Parameters

rotationDegrees int required
selection OfficeIMO.Pdf.PdfPageSelection required
public PdfDocument Rotate(int rotationDegrees, string pageRanges) #

Creates a new PDF with parsed page ranges rotated.

Parameters

rotationDegrees int required
pageRanges string required
public PdfDocument Rotate(int rotationDegrees, PdfPageSelection selection, CancellationToken cancellationToken) #

Rotates the selected pages with cancellation through selection, rewriting, and output adoption.

Parameters

rotationDegrees int required
selection OfficeIMO.Pdf.PdfPageSelection required
cancellationToken System.Threading.CancellationToken required
public PdfDocument Rotate(int rotationDegrees, OfficePageSelector selector, CancellationToken cancellationToken) #

Rotates pages resolved by a document-relative selector with cooperative cancellation.

Parameters

rotationDegrees int required
selector OfficeIMO.OfficePageSelector required
cancellationToken System.Threading.CancellationToken required
public PdfDocument Rotate(int rotationDegrees, string pageRanges, CancellationToken cancellationToken) #

Rotates parsed page ranges with cooperative cancellation.

Parameters

rotationDegrees int required
pageRanges string required
cancellationToken System.Threading.CancellationToken required
public PdfDocument Rotate(int rotationDegrees, PdfPageRange pageRange, CancellationToken cancellationToken) #

Rotates an inclusive page range with cooperative cancellation.

Parameters

rotationDegrees int required
pageRange OfficeIMO.Pdf.PdfPageRange required
cancellationToken System.Threading.CancellationToken required
public PdfDocument Rotate(int rotationDegrees, OfficePageSelector selector) #

Rotates pages resolved from a document-relative selector.

Parameters

rotationDegrees int required
selector OfficeIMO.OfficePageSelector required
RotateBy 7 overloads
public PdfDocument RotateBy(int rotationDegrees, params int[] pageNumbers) #

Turns selected pages by a multiple of 90 degrees relative to each page's effective rotation. Positive values turn clockwise. If no page numbers are supplied, all pages are turned. Mixed inherited rotations are resolved independently in one mutation.

Parameters

rotationDegrees int required
pageNumbers int[] required
public PdfDocument RotateBy(int rotationDegrees, PdfPageSelection selection) #

Turns the selected pages relative to their effective rotation.

Parameters

rotationDegrees int required
selection OfficeIMO.Pdf.PdfPageSelection required
public PdfDocument RotateBy(int rotationDegrees, OfficePageSelector selector) #

Turns pages resolved by a document-relative selector.

Parameters

rotationDegrees int required
selector OfficeIMO.OfficePageSelector required
public PdfDocument RotateBy(int rotationDegrees, string selector) #

Turns pages resolved by a document-relative selection expression.

Parameters

rotationDegrees int required
selector string required
public PdfDocument RotateBy(int rotationDegrees, PdfPageSelection selection, CancellationToken cancellationToken) #

Turns selected pages relative to their effective rotation with cooperative cancellation.

Parameters

rotationDegrees int required
selection OfficeIMO.Pdf.PdfPageSelection required
cancellationToken System.Threading.CancellationToken required
public PdfDocument RotateBy(int rotationDegrees, OfficePageSelector selector, CancellationToken cancellationToken) #

Turns pages resolved by a document-relative selector with cooperative cancellation.

Parameters

rotationDegrees int required
selector OfficeIMO.OfficePageSelector required
cancellationToken System.Threading.CancellationToken required
public PdfDocument RotateBy(int rotationDegrees, string selector, CancellationToken cancellationToken) #

Turns pages resolved by a document-relative expression with cooperative cancellation.

Parameters

rotationDegrees int required
selector string required
cancellationToken System.Threading.CancellationToken required
SetArtBox 2 overloads
public PdfDocument SetArtBox(double left, double bottom, double right, double top, params int[] pageNumbers) #

Sets the art box for selected pages.

Parameters

left double required
bottom double required
right double required
top double required
pageNumbers int[] required
public PdfDocument SetArtBox(double left, double bottom, double right, double top, PdfPageSelection? selection, CancellationToken cancellationToken = default) #

Sets the art box while observing cancellation.

Parameters

left double required
bottom double required
right double required
top double required
selection OfficeIMO.Pdf.PdfPageSelection? required
cancellationToken System.Threading.CancellationToken = default optional
SetBleedBox 2 overloads
public PdfDocument SetBleedBox(double left, double bottom, double right, double top, params int[] pageNumbers) #

Sets the bleed box for selected pages.

Parameters

left double required
bottom double required
right double required
top double required
pageNumbers int[] required
public PdfDocument SetBleedBox(double left, double bottom, double right, double top, PdfPageSelection? selection, CancellationToken cancellationToken = default) #

Sets the bleed box while observing cancellation.

Parameters

left double required
bottom double required
right double required
top double required
selection OfficeIMO.Pdf.PdfPageSelection? required
cancellationToken System.Threading.CancellationToken = default optional
SetCropBox 2 overloads
public PdfDocument SetCropBox(double left, double bottom, double right, double top, params int[] pageNumbers) #

Sets the crop box for selected pages.

Parameters

left double required
bottom double required
right double required
top double required
pageNumbers int[] required
public PdfDocument SetCropBox(double left, double bottom, double right, double top, PdfPageSelection? selection, CancellationToken cancellationToken = default) #

Sets the crop box while observing cancellation.

Parameters

left double required
bottom double required
right double required
top double required
selection OfficeIMO.Pdf.PdfPageSelection? required
cancellationToken System.Threading.CancellationToken = default optional
SetMediaBox 2 overloads
public PdfDocument SetMediaBox(double left, double bottom, double right, double top, params int[] pageNumbers) #

Sets the media box for selected pages.

Parameters

left double required
bottom double required
right double required
top double required
pageNumbers int[] required
public PdfDocument SetMediaBox(double left, double bottom, double right, double top, PdfPageSelection? selection, CancellationToken cancellationToken = default) #

Sets the media box while observing cancellation.

Parameters

left double required
bottom double required
right double required
top double required
selection OfficeIMO.Pdf.PdfPageSelection? required
cancellationToken System.Threading.CancellationToken = default optional
SetPageBox 2 overloads
public PdfDocument SetPageBox(PdfPageBoundaryBox box, double left, double bottom, double right, double top, params int[] pageNumbers) #

Sets a typed boundary box for selected pages, or every page when no page numbers are supplied.

Parameters

box OfficeIMO.Pdf.PdfPageBoundaryBox required
left double required
bottom double required
right double required
top double required
pageNumbers int[] required
public PdfDocument SetPageBox(PdfPageBoundaryBox box, double left, double bottom, double right, double top, PdfPageSelection? selection, CancellationToken cancellationToken = default) #

Sets page boundary geometry with cooperative cancellation.

Parameters

box OfficeIMO.Pdf.PdfPageBoundaryBox required
left double required
bottom double required
right double required
top double required
selection OfficeIMO.Pdf.PdfPageSelection? required
cancellationToken System.Threading.CancellationToken = default optional
SetTrimBox 2 overloads
public PdfDocument SetTrimBox(double left, double bottom, double right, double top, params int[] pageNumbers) #

Sets the trim box for selected pages.

Parameters

left double required
bottom double required
right double required
top double required
pageNumbers int[] required
public PdfDocument SetTrimBox(double left, double bottom, double right, double top, PdfPageSelection? selection, CancellationToken cancellationToken = default) #

Sets the trim box while observing cancellation.

Parameters

left double required
bottom double required
right double required
top double required
selection OfficeIMO.Pdf.PdfPageSelection? required
cancellationToken System.Threading.CancellationToken = default optional
Split 10 overloads
public IReadOnlyList<PdfDocument> Split(CancellationToken cancellationToken) #

Creates one PDF per source page with cooperative cancellation; the source is unchanged.

Parameters

cancellationToken System.Threading.CancellationToken required

Returns

IReadOnlyList<PdfDocument>
public IReadOnlyList<PdfDocument> Split(int pagesPerDocument, CancellationToken cancellationToken) #

Creates consecutive page groups with cooperative cancellation and the source's captured read limits.

Parameters

pagesPerDocument int required
cancellationToken System.Threading.CancellationToken required

Returns

IReadOnlyList<PdfDocument>
public IReadOnlyList<PdfDocument> Split(IReadOnlyList<PdfPageSelection> selections, CancellationToken cancellationToken = default) #

Creates caller-ordered selection parts with cooperative cancellation through every part.

Parameters

selections System.Collections.Generic.IReadOnlyList<OfficeIMO.Pdf.PdfPageSelection> required
cancellationToken System.Threading.CancellationToken = default optional

Returns

IReadOnlyList<PdfDocument>
public IReadOnlyList<PdfDocument> Split(IEnumerable<PdfPageRange> pageRanges, CancellationToken cancellationToken) #

Creates caller-ordered range parts with cancellation during range enumeration and extraction.

Parameters

pageRanges System.Collections.Generic.IEnumerable<OfficeIMO.Pdf.PdfPageRange> required
cancellationToken System.Threading.CancellationToken required

Returns

IReadOnlyList<PdfDocument>
public IReadOnlyList<PdfDocument> Split(string pageRanges, CancellationToken cancellationToken) #

Creates parts from parsed inclusive ranges with cooperative cancellation.

Parameters

pageRanges string required
cancellationToken System.Threading.CancellationToken required

Returns

IReadOnlyList<PdfDocument>
public IReadOnlyList<PdfDocument> Split() #

Creates one PDF per page.

Returns

IReadOnlyList<PdfDocument>
public IReadOnlyList<PdfDocument> Split(int pagesPerDocument) #

Creates PDFs containing consecutive groups of the requested page count.

Parameters

pagesPerDocument int required

Returns

IReadOnlyList<PdfDocument>
public IReadOnlyList<PdfDocument> Split(params PdfPageSelection[] selections) #

Creates one PDF for each supplied page selection.

Parameters

selections OfficeIMO.Pdf.PdfPageSelection[] required

Returns

IReadOnlyList<PdfDocument>
public IReadOnlyList<PdfDocument> Split(IEnumerable<PdfPageRange> pageRanges) #

Creates one PDF for each supplied inclusive page range.

Parameters

pageRanges System.Collections.Generic.IEnumerable<OfficeIMO.Pdf.PdfPageRange> required

Returns

IReadOnlyList<PdfDocument>
public IReadOnlyList<PdfDocument> Split(string pageRanges) #

Creates one PDF for each comma- or semicolon-separated inclusive page range.

Parameters

pageRanges string required

Returns

IReadOnlyList<PdfDocument>
SplitByBookmarks 2 overloads
public IReadOnlyList<PdfDocument> SplitByBookmarks(params string[] bookmarkTitles) #

Creates one PDF for each outline/bookmark-derived page range.

Parameters

bookmarkTitles string[] required

Returns

IReadOnlyList<PdfDocument>
public IReadOnlyList<PdfDocument> SplitByBookmarks(IReadOnlyList<string> bookmarkTitles, CancellationToken cancellationToken = default) #

Splits bookmarked sections with cooperative cancellation through every output part.

Parameters

bookmarkTitles System.Collections.Generic.IReadOnlyList<string> required
cancellationToken System.Threading.CancellationToken = default optional

Returns

IReadOnlyList<PdfDocument>
public IReadOnlyList<PdfProductionSplitPart> SplitForProduction(PdfProductionSplitOptions options, CancellationToken cancellationToken = default) #

Splits this document using bounded page-count, target-size, and content-boundary production rules.

Parameters

options OfficeIMO.Pdf.PdfProductionSplitOptions required
cancellationToken System.Threading.CancellationToken = default optional

Returns

IReadOnlyList<PdfProductionSplitPart>

Properties

public int Count { get; } #

Gets the document's page count.

public PdfReadPage this[int index] { get; } #

Gets a page by its zero-based index.

Parameters

index int required