PdfDocumentPages
OfficeIMO.Pdf
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
- Property PdfDocument.Pages
Methods
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
- importOptions OfficeIMO.Pdf.PdfPageImportOptions? = null
- cancellationToken System.Threading.CancellationToken = default
Returns
PdfDocumentpublic 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
- sourceSelection OfficeIMO.Pdf.PdfPageSelection
- importOptions OfficeIMO.Pdf.PdfPageImportOptions? = null
- cancellationToken System.Threading.CancellationToken = default
Returns
PdfDocumentpublic PdfDocument Append(byte[] sourcePdf, PdfPageImportOptions? importOptions = null, CancellationToken cancellationToken = default) #Appends all pages from source PDF bytes to this document.
Parameters
- sourcePdf byte[]
- importOptions OfficeIMO.Pdf.PdfPageImportOptions? = null
- cancellationToken System.Threading.CancellationToken = default
Returns
PdfDocumentpublic 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[]
- sourceSelection OfficeIMO.Pdf.PdfPageSelection
- importOptions OfficeIMO.Pdf.PdfPageImportOptions? = null
- cancellationToken System.Threading.CancellationToken = default
Returns
PdfDocumentpublic 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
- importOptions OfficeIMO.Pdf.PdfPageImportOptions? = null
- cancellationToken System.Threading.CancellationToken = default
Returns
PdfDocumentpublic 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
- sourceSelection OfficeIMO.Pdf.PdfPageSelection
- importOptions OfficeIMO.Pdf.PdfPageImportOptions? = null
- cancellationToken System.Threading.CancellationToken = default
Returns
PdfDocumentpublic PdfDocument Append(string sourcePath, PdfPageImportOptions? importOptions = null, CancellationToken cancellationToken = default) #Appends all pages from a source PDF file to this document.
Parameters
- sourcePath string
- importOptions OfficeIMO.Pdf.PdfPageImportOptions? = null
- cancellationToken System.Threading.CancellationToken = default
Returns
PdfDocumentpublic 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
- sourceSelection OfficeIMO.Pdf.PdfPageSelection
- importOptions OfficeIMO.Pdf.PdfPageImportOptions? = null
- cancellationToken System.Threading.CancellationToken = default
Returns
PdfDocumentpublic PdfDocument ApplyAttributes(params PdfPageAttributeEdit[] edits) #Applies ordered page-attribute edits atomically through one output revision or rewrite.
Parameters
- edits OfficeIMO.Pdf.PdfPageAttributeEdit[]
Returns
PdfDocumentpublic 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>
- cancellationToken System.Threading.CancellationToken = default
Returns
PdfDocumentpublic IReadOnlyList<PdfBookmarkPageRange> BookmarkPageRanges(params string[] bookmarkTitles) #Returns outline/bookmark-derived page ranges in document order.
Parameters
- bookmarkTitles string[]
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
- bookmarkTitles string[]
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
- bookmarkTitles System.Collections.Generic.IReadOnlyList<string>
- cancellationToken System.Threading.CancellationToken = default
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>
- cancellationToken System.Threading.CancellationToken = default
Returns
IReadOnlyList<PdfBookmarkPageRange>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
- bottom double
- right double
- top double
- pageNumbers int[]
Returns
PdfDocumentpublic 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
- bottom double
- right double
- top double
- selection OfficeIMO.Pdf.PdfPageSelection?
- cancellationToken System.Threading.CancellationToken = default
Returns
PdfDocumentpublic PdfDocument Delete(params int[] pageNumbers) #Creates a new PDF with selected pages deleted.
Parameters
- pageNumbers int[]
Returns
PdfDocumentpublic PdfDocument Delete(PdfPageRange pageRange) #Creates a new PDF with one inclusive page range deleted.
Parameters
- pageRange OfficeIMO.Pdf.PdfPageRange
Returns
PdfDocumentpublic PdfDocument Delete(PdfPageSelection selection) #Creates a new PDF with selected pages deleted.
Parameters
- selection OfficeIMO.Pdf.PdfPageSelection
Returns
PdfDocumentpublic PdfDocument Delete(string pageRanges) #Creates a new PDF with comma- or semicolon-separated inclusive page ranges deleted.
Parameters
- pageRanges string
Returns
PdfDocumentpublic PdfDocument Delete(PdfPageSelection selection, CancellationToken cancellationToken) #Deletes the selected pages with cancellation through selection, rewriting, and output adoption.
Parameters
- selection OfficeIMO.Pdf.PdfPageSelection
- cancellationToken System.Threading.CancellationToken
Returns
PdfDocumentpublic PdfDocument Delete(OfficePageSelector selector, CancellationToken cancellationToken) #Deletes pages resolved by a document-relative selector with cooperative cancellation.
Parameters
- selector OfficeIMO.OfficePageSelector
- cancellationToken System.Threading.CancellationToken
Returns
PdfDocumentpublic PdfDocument Delete(string pageRanges, CancellationToken cancellationToken) #Deletes parsed page ranges with cooperative cancellation.
Parameters
- pageRanges string
- cancellationToken System.Threading.CancellationToken
Returns
PdfDocumentpublic PdfDocument Delete(PdfPageRange pageRange, CancellationToken cancellationToken) #Deletes an inclusive page range with cooperative cancellation.
Parameters
- pageRange OfficeIMO.Pdf.PdfPageRange
- cancellationToken System.Threading.CancellationToken
Returns
PdfDocumentpublic PdfDocument Delete(OfficePageSelector selector) #Creates a new PDF with pages resolved from a document-relative selector deleted.
Parameters
- selector OfficeIMO.OfficePageSelector
Returns
PdfDocumentpublic 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
- bottom double
- right double
- top double
- options OfficeIMO.Pdf.PdfDestructiveCropOptions? = null
- selection OfficeIMO.Pdf.PdfPageSelection? = null
- cancellationToken System.Threading.CancellationToken = default
Returns
PdfDestructiveCropResultpublic PdfDocument Duplicate(params int[] pageNumbers) #Creates a new PDF with selected pages duplicated immediately after each source page.
Parameters
- pageNumbers int[]
Returns
PdfDocumentpublic PdfDocument Duplicate(PdfPageRange pageRange) #Creates a new PDF with one inclusive page range duplicated.
Parameters
- pageRange OfficeIMO.Pdf.PdfPageRange
Returns
PdfDocumentpublic PdfDocument Duplicate(PdfPageSelection selection) #Creates a new PDF with selected pages duplicated immediately after each source page.
Parameters
- selection OfficeIMO.Pdf.PdfPageSelection
Returns
PdfDocumentpublic PdfDocument Duplicate(string pageRanges) #Creates a new PDF with parsed page ranges duplicated.
Parameters
- pageRanges string
Returns
PdfDocumentpublic PdfDocument Duplicate(PdfPageSelection selection, CancellationToken cancellationToken) #Duplicates the selected pages with cancellation through selection, rewriting, and output adoption.
Parameters
- selection OfficeIMO.Pdf.PdfPageSelection
- cancellationToken System.Threading.CancellationToken
Returns
PdfDocumentpublic PdfDocument Duplicate(OfficePageSelector selector, CancellationToken cancellationToken) #Duplicates pages resolved by a document-relative selector with cooperative cancellation.
Parameters
- selector OfficeIMO.OfficePageSelector
- cancellationToken System.Threading.CancellationToken
Returns
PdfDocumentpublic PdfDocument Duplicate(string pageRanges, CancellationToken cancellationToken) #Duplicates parsed page ranges with cooperative cancellation.
Parameters
- pageRanges string
- cancellationToken System.Threading.CancellationToken
Returns
PdfDocumentpublic PdfDocument Duplicate(PdfPageRange pageRange, CancellationToken cancellationToken) #Duplicates an inclusive page range with cooperative cancellation.
Parameters
- pageRange OfficeIMO.Pdf.PdfPageRange
- cancellationToken System.Threading.CancellationToken
Returns
PdfDocumentpublic PdfDocument Duplicate(OfficePageSelector selector) #Creates a new PDF with pages resolved from a document-relative selector duplicated.
Parameters
- selector OfficeIMO.OfficePageSelector
Returns
PdfDocumentpublic 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
- cancellationToken System.Threading.CancellationToken
Returns
PdfDocumentpublic 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
- cancellationToken System.Threading.CancellationToken
Returns
PdfDocumentpublic PdfDocument Extract(string pageRanges, CancellationToken cancellationToken) #Extracts parsed page ranges while observing cancellation and retaining the source document unchanged.
Parameters
- pageRanges string
- cancellationToken System.Threading.CancellationToken
Returns
PdfDocumentpublic PdfDocument Extract(OfficePageSelector selector, CancellationToken cancellationToken) #Extracts a document-relative selection while observing cancellation during resolution and rewriting.
Parameters
- selector OfficeIMO.OfficePageSelector
- cancellationToken System.Threading.CancellationToken
Returns
PdfDocumentpublic PdfDocument Extract(params int[] pageNumbers) #Creates a new PDF containing selected pages in caller order.
Parameters
- pageNumbers int[]
Returns
PdfDocumentpublic 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
- pageNumbers int[]
Returns
PdfDocumentpublic PdfDocument Extract(PdfPageRange pageRange) #Creates a new PDF containing one inclusive one-based page range.
Parameters
- pageRange OfficeIMO.Pdf.PdfPageRange
Returns
PdfDocumentpublic PdfDocument Extract(PdfPageSelection selection) #Creates a new PDF containing selected pages in caller order.
Parameters
- selection OfficeIMO.Pdf.PdfPageSelection
Returns
PdfDocumentpublic PdfDocument Extract(string pageRanges) #Creates a new PDF containing comma- or semicolon-separated inclusive page ranges.
Parameters
- pageRanges string
Returns
PdfDocumentpublic PdfDocument Extract(OfficePageSelector selector) #Creates a new PDF containing pages resolved from a document-relative selector.
Parameters
- selector OfficeIMO.OfficePageSelector
Returns
PdfDocumentpublic 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
- selection OfficeIMO.Pdf.PdfPageSelection? = null
Returns
PdfImpositionResultpublic 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
- selection OfficeIMO.Pdf.PdfPageSelection? = null
Returns
PdfImpositionResultpublic 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
- sourceDocument OfficeIMO.Pdf.PdfDocument
- importOptions OfficeIMO.Pdf.PdfPageImportOptions? = null
- cancellationToken System.Threading.CancellationToken = default
Returns
PdfDocumentpublic 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
- sourceDocument OfficeIMO.Pdf.PdfDocument
- sourceSelection OfficeIMO.Pdf.PdfPageSelection
- importOptions OfficeIMO.Pdf.PdfPageImportOptions? = null
- cancellationToken System.Threading.CancellationToken = default
Returns
PdfDocumentpublic 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
- sourcePdf byte[]
- importOptions OfficeIMO.Pdf.PdfPageImportOptions? = null
- cancellationToken System.Threading.CancellationToken = default
Returns
PdfDocumentpublic 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
- sourcePdf byte[]
- sourceSelection OfficeIMO.Pdf.PdfPageSelection
- importOptions OfficeIMO.Pdf.PdfPageImportOptions? = null
- cancellationToken System.Threading.CancellationToken = default
Returns
PdfDocumentpublic 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
- sourceStream System.IO.Stream
- importOptions OfficeIMO.Pdf.PdfPageImportOptions? = null
- cancellationToken System.Threading.CancellationToken = default
Returns
PdfDocumentpublic 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
- sourceStream System.IO.Stream
- sourceSelection OfficeIMO.Pdf.PdfPageSelection
- importOptions OfficeIMO.Pdf.PdfPageImportOptions? = null
- cancellationToken System.Threading.CancellationToken = default
Returns
PdfDocumentpublic 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
- sourcePath string
- importOptions OfficeIMO.Pdf.PdfPageImportOptions? = null
- cancellationToken System.Threading.CancellationToken = default
Returns
PdfDocumentpublic 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
- sourcePath string
- sourceSelection OfficeIMO.Pdf.PdfPageSelection
- importOptions OfficeIMO.Pdf.PdfPageImportOptions? = null
- cancellationToken System.Threading.CancellationToken = default
Returns
PdfDocumentpublic 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
- pageNumbers int[]
Returns
PdfDocumentpublic 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
- pageRange OfficeIMO.Pdf.PdfPageRange
Returns
PdfDocumentpublic 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
- selection OfficeIMO.Pdf.PdfPageSelection
Returns
PdfDocumentpublic 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
- pageRanges string
Returns
PdfDocumentpublic PdfDocument Move(int insertBeforePageNumber, PdfPageSelection selection, CancellationToken cancellationToken) #Moves the selected pages with cancellation through selection, rewriting, and output adoption.
Parameters
- insertBeforePageNumber int
- selection OfficeIMO.Pdf.PdfPageSelection
- cancellationToken System.Threading.CancellationToken
Returns
PdfDocumentpublic PdfDocument Move(int insertBeforePageNumber, OfficePageSelector selector, CancellationToken cancellationToken) #Moves pages resolved by a document-relative selector with cooperative cancellation.
Parameters
- insertBeforePageNumber int
- selector OfficeIMO.OfficePageSelector
- cancellationToken System.Threading.CancellationToken
Returns
PdfDocumentpublic PdfDocument Move(int insertBeforePageNumber, string pageRanges, CancellationToken cancellationToken) #Moves parsed page ranges with cooperative cancellation.
Parameters
- insertBeforePageNumber int
- pageRanges string
- cancellationToken System.Threading.CancellationToken
Returns
PdfDocumentpublic PdfDocument Move(int insertBeforePageNumber, PdfPageRange pageRange, CancellationToken cancellationToken) #Moves an inclusive page range with cooperative cancellation.
Parameters
- insertBeforePageNumber int
- pageRange OfficeIMO.Pdf.PdfPageRange
- cancellationToken System.Threading.CancellationToken
Returns
PdfDocumentpublic PdfDocument Move(int insertBeforePageNumber, OfficePageSelector selector) #Moves pages resolved from a document-relative selector before a one-based page number.
Parameters
- insertBeforePageNumber int
- selector OfficeIMO.OfficePageSelector
Returns
PdfDocumentpublic 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
- cancellationToken System.Threading.CancellationToken = default
Returns
PdfDocumentpublic 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
- importOptions OfficeIMO.Pdf.PdfPageImportOptions? = null
- cancellationToken System.Threading.CancellationToken = default
Returns
PdfDocumentpublic 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
- sourceSelection OfficeIMO.Pdf.PdfPageSelection
- importOptions OfficeIMO.Pdf.PdfPageImportOptions? = null
- cancellationToken System.Threading.CancellationToken = default
Returns
PdfDocumentpublic PdfDocument Prepend(byte[] sourcePdf, PdfPageImportOptions? importOptions = null, CancellationToken cancellationToken = default) #Prepends all pages from source PDF bytes before this document.
Parameters
- sourcePdf byte[]
- importOptions OfficeIMO.Pdf.PdfPageImportOptions? = null
- cancellationToken System.Threading.CancellationToken = default
Returns
PdfDocumentpublic 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[]
- sourceSelection OfficeIMO.Pdf.PdfPageSelection
- importOptions OfficeIMO.Pdf.PdfPageImportOptions? = null
- cancellationToken System.Threading.CancellationToken = default
Returns
PdfDocumentpublic 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
- importOptions OfficeIMO.Pdf.PdfPageImportOptions? = null
- cancellationToken System.Threading.CancellationToken = default
Returns
PdfDocumentpublic 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
- sourceSelection OfficeIMO.Pdf.PdfPageSelection
- importOptions OfficeIMO.Pdf.PdfPageImportOptions? = null
- cancellationToken System.Threading.CancellationToken = default
Returns
PdfDocumentpublic PdfDocument Prepend(string sourcePath, PdfPageImportOptions? importOptions = null, CancellationToken cancellationToken = default) #Prepends all pages from a source PDF file before this document.
Parameters
- sourcePath string
- importOptions OfficeIMO.Pdf.PdfPageImportOptions? = null
- cancellationToken System.Threading.CancellationToken = default
Returns
PdfDocumentpublic 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
- sourceSelection OfficeIMO.Pdf.PdfPageSelection
- importOptions OfficeIMO.Pdf.PdfPageImportOptions? = null
- cancellationToken System.Threading.CancellationToken = default
Returns
PdfDocumentpublic PdfDocument Reorder(params int[] pageNumbers) #Creates a new PDF with every page copied in the specified one-based order.
Parameters
- pageNumbers int[]
Returns
PdfDocumentpublic PdfDocument Reorder(string pageRanges) #Creates a new PDF with every page copied in parsed page-range order.
Parameters
- pageRanges string
Returns
PdfDocumentpublic PdfDocument Reorder(PdfPageSelection selection) #Creates a new PDF with every page copied in the selected one-based order.
Parameters
- selection OfficeIMO.Pdf.PdfPageSelection
Returns
PdfDocumentpublic PdfDocument Reorder(PdfPageSelection selection, CancellationToken cancellationToken) #Reorders the selected pages with cancellation through selection, rewriting, and output adoption.
Parameters
- selection OfficeIMO.Pdf.PdfPageSelection
- cancellationToken System.Threading.CancellationToken
Returns
PdfDocumentpublic PdfDocument Reorder(OfficePageSelector selector, CancellationToken cancellationToken) #Reorders pages resolved by a document-relative selector with cooperative cancellation.
Parameters
- selector OfficeIMO.OfficePageSelector
- cancellationToken System.Threading.CancellationToken
Returns
PdfDocumentpublic PdfDocument Reorder(string pageRanges, CancellationToken cancellationToken) #Reorders parsed page ranges with cooperative cancellation.
Parameters
- pageRanges string
- cancellationToken System.Threading.CancellationToken
Returns
PdfDocumentpublic PdfDocument Reorder(OfficePageSelector selector) #Creates a new PDF with pages copied in the order resolved by a document-relative selector.
Parameters
- selector OfficeIMO.OfficePageSelector
Returns
PdfDocumentpublic PdfPageRewriteResult ReorderWithMapping(params int[] pageNumbers) #Reorders every page and reports the object numbers needed to retain annotation or object selections.
Parameters
- pageNumbers int[]
Returns
PdfPageRewriteResultpublic PdfPageRewriteResult ReorderWithMapping(PdfPageSelection order, CancellationToken cancellationToken = default) #Reorders pages and reports object remapping with cooperative cancellation.
Parameters
- order OfficeIMO.Pdf.PdfPageSelection
- cancellationToken System.Threading.CancellationToken = default
Returns
PdfPageRewriteResultpublic PdfDocument Resize(PdfPageSize pageSize, params int[] pageNumbers) #Resizes selected pages to the supplied page size.
Parameters
- pageSize OfficeIMO.Pdf.PdfPageSize
- pageNumbers int[]
Returns
PdfDocumentpublic 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
- selection OfficeIMO.Pdf.PdfPageSelection? = null
- cancellationToken System.Threading.CancellationToken = default
Returns
PdfDocumentpublic PdfDocument Resize(PdfPageSize pageSize, PdfPageSelection? selection, CancellationToken cancellationToken = default) #Resizes selected pages with cooperative cancellation.
Parameters
- pageSize OfficeIMO.Pdf.PdfPageSize
- selection OfficeIMO.Pdf.PdfPageSelection?
- cancellationToken System.Threading.CancellationToken = default
Returns
PdfDocumentpublic 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
- pageNumbers int[]
Returns
PdfDocumentpublic PdfDocument Rotate(int rotationDegrees, PdfPageRange pageRange) #Creates a new PDF with one inclusive page range rotated.
Parameters
- rotationDegrees int
- pageRange OfficeIMO.Pdf.PdfPageRange
Returns
PdfDocumentpublic PdfDocument Rotate(int rotationDegrees, PdfPageSelection selection) #Creates a new PDF with selected pages rotated.
Parameters
- rotationDegrees int
- selection OfficeIMO.Pdf.PdfPageSelection
Returns
PdfDocumentpublic PdfDocument Rotate(int rotationDegrees, string pageRanges) #Creates a new PDF with parsed page ranges rotated.
Parameters
- rotationDegrees int
- pageRanges string
Returns
PdfDocumentpublic PdfDocument Rotate(int rotationDegrees, PdfPageSelection selection, CancellationToken cancellationToken) #Rotates the selected pages with cancellation through selection, rewriting, and output adoption.
Parameters
- rotationDegrees int
- selection OfficeIMO.Pdf.PdfPageSelection
- cancellationToken System.Threading.CancellationToken
Returns
PdfDocumentpublic PdfDocument Rotate(int rotationDegrees, OfficePageSelector selector, CancellationToken cancellationToken) #Rotates pages resolved by a document-relative selector with cooperative cancellation.
Parameters
- rotationDegrees int
- selector OfficeIMO.OfficePageSelector
- cancellationToken System.Threading.CancellationToken
Returns
PdfDocumentpublic PdfDocument Rotate(int rotationDegrees, string pageRanges, CancellationToken cancellationToken) #Rotates parsed page ranges with cooperative cancellation.
Parameters
- rotationDegrees int
- pageRanges string
- cancellationToken System.Threading.CancellationToken
Returns
PdfDocumentpublic PdfDocument Rotate(int rotationDegrees, PdfPageRange pageRange, CancellationToken cancellationToken) #Rotates an inclusive page range with cooperative cancellation.
Parameters
- rotationDegrees int
- pageRange OfficeIMO.Pdf.PdfPageRange
- cancellationToken System.Threading.CancellationToken
Returns
PdfDocumentpublic PdfDocument Rotate(int rotationDegrees, OfficePageSelector selector) #Rotates pages resolved from a document-relative selector.
Parameters
- rotationDegrees int
- selector OfficeIMO.OfficePageSelector
Returns
PdfDocumentpublic 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
- pageNumbers int[]
Returns
PdfDocumentpublic PdfDocument RotateBy(int rotationDegrees, PdfPageSelection selection) #Turns the selected pages relative to their effective rotation.
Parameters
- rotationDegrees int
- selection OfficeIMO.Pdf.PdfPageSelection
Returns
PdfDocumentpublic PdfDocument RotateBy(int rotationDegrees, OfficePageSelector selector) #Turns pages resolved by a document-relative selector.
Parameters
- rotationDegrees int
- selector OfficeIMO.OfficePageSelector
Returns
PdfDocumentpublic PdfDocument RotateBy(int rotationDegrees, string selector) #Turns pages resolved by a document-relative selection expression.
Parameters
- rotationDegrees int
- selector string
Returns
PdfDocumentpublic PdfDocument RotateBy(int rotationDegrees, PdfPageSelection selection, CancellationToken cancellationToken) #Turns selected pages relative to their effective rotation with cooperative cancellation.
Parameters
- rotationDegrees int
- selection OfficeIMO.Pdf.PdfPageSelection
- cancellationToken System.Threading.CancellationToken
Returns
PdfDocumentpublic PdfDocument RotateBy(int rotationDegrees, OfficePageSelector selector, CancellationToken cancellationToken) #Turns pages resolved by a document-relative selector with cooperative cancellation.
Parameters
- rotationDegrees int
- selector OfficeIMO.OfficePageSelector
- cancellationToken System.Threading.CancellationToken
Returns
PdfDocumentpublic PdfDocument RotateBy(int rotationDegrees, string selector, CancellationToken cancellationToken) #Turns pages resolved by a document-relative expression with cooperative cancellation.
Parameters
- rotationDegrees int
- selector string
- cancellationToken System.Threading.CancellationToken
Returns
PdfDocumentpublic PdfDocument SetArtBox(double left, double bottom, double right, double top, params int[] pageNumbers) #Sets the art box for selected pages.
Parameters
- left double
- bottom double
- right double
- top double
- pageNumbers int[]
Returns
PdfDocumentpublic 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
- bottom double
- right double
- top double
- selection OfficeIMO.Pdf.PdfPageSelection?
- cancellationToken System.Threading.CancellationToken = default
Returns
PdfDocumentpublic PdfDocument SetBleedBox(double left, double bottom, double right, double top, params int[] pageNumbers) #Sets the bleed box for selected pages.
Parameters
- left double
- bottom double
- right double
- top double
- pageNumbers int[]
Returns
PdfDocumentpublic 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
- bottom double
- right double
- top double
- selection OfficeIMO.Pdf.PdfPageSelection?
- cancellationToken System.Threading.CancellationToken = default
Returns
PdfDocumentpublic PdfDocument SetCropBox(double left, double bottom, double right, double top, params int[] pageNumbers) #Sets the crop box for selected pages.
Parameters
- left double
- bottom double
- right double
- top double
- pageNumbers int[]
Returns
PdfDocumentpublic 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
- bottom double
- right double
- top double
- selection OfficeIMO.Pdf.PdfPageSelection?
- cancellationToken System.Threading.CancellationToken = default
Returns
PdfDocumentpublic PdfDocument SetMediaBox(double left, double bottom, double right, double top, params int[] pageNumbers) #Sets the media box for selected pages.
Parameters
- left double
- bottom double
- right double
- top double
- pageNumbers int[]
Returns
PdfDocumentpublic 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
- bottom double
- right double
- top double
- selection OfficeIMO.Pdf.PdfPageSelection?
- cancellationToken System.Threading.CancellationToken = default
Returns
PdfDocumentpublic 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
- left double
- bottom double
- right double
- top double
- pageNumbers int[]
Returns
PdfDocumentpublic 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
- left double
- bottom double
- right double
- top double
- selection OfficeIMO.Pdf.PdfPageSelection?
- cancellationToken System.Threading.CancellationToken = default
Returns
PdfDocumentpublic PdfDocument SetTrimBox(double left, double bottom, double right, double top, params int[] pageNumbers) #Sets the trim box for selected pages.
Parameters
- left double
- bottom double
- right double
- top double
- pageNumbers int[]
Returns
PdfDocumentpublic 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
- bottom double
- right double
- top double
- selection OfficeIMO.Pdf.PdfPageSelection?
- cancellationToken System.Threading.CancellationToken = default
Returns
PdfDocumentpublic IReadOnlyList<PdfDocument> Split(CancellationToken cancellationToken) #Creates one PDF per source page with cooperative cancellation; the source is unchanged.
Parameters
- cancellationToken System.Threading.CancellationToken
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
- cancellationToken System.Threading.CancellationToken
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>
- cancellationToken System.Threading.CancellationToken = default
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>
- cancellationToken System.Threading.CancellationToken
Returns
IReadOnlyList<PdfDocument>public IReadOnlyList<PdfDocument> Split(string pageRanges, CancellationToken cancellationToken) #Creates parts from parsed inclusive ranges with cooperative cancellation.
Parameters
- pageRanges string
- cancellationToken System.Threading.CancellationToken
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
Returns
IReadOnlyList<PdfDocument>public IReadOnlyList<PdfDocument> Split(params PdfPageSelection[] selections) #Creates one PDF for each supplied page selection.
Parameters
- selections OfficeIMO.Pdf.PdfPageSelection[]
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>
Returns
IReadOnlyList<PdfDocument>public IReadOnlyList<PdfDocument> Split(string pageRanges) #Creates one PDF for each comma- or semicolon-separated inclusive page range.
Parameters
- pageRanges string
Returns
IReadOnlyList<PdfDocument>public IReadOnlyList<PdfDocument> SplitByBookmarks(params string[] bookmarkTitles) #Creates one PDF for each outline/bookmark-derived page range.
Parameters
- bookmarkTitles string[]
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>
- cancellationToken System.Threading.CancellationToken = default
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
- cancellationToken System.Threading.CancellationToken = default
Returns
IReadOnlyList<PdfProductionSplitPart>Inherited Methods
Properties
public PdfReadPage this[int index] { get; } #Gets a page by its zero-based index.
Parameters
- index int