API Reference
PdfDocument
Root PDF lifecycle and capability container. Author content through PdfDocument.Create or PdfDocument.Compose; use the focused capability properties for reading and existing-document operations.
Inheritance
- Object
- PdfDocument
Usage
Explore 146 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 121
- Method PdfAcroFormEditResult.ToDocument
- Method PdfAnnotationEditResult.ToDocument
- Method PdfAttachmentEditResult.ToDocument
- Method PdfBatesDocumentResult.ToDocument
- Method PdfBookmarkEditResult.ToDocument
- Method PdfDestructiveCropResult.ToDocument
- Method PdfDocument.AppendMetadataRevision
- Method PdfDocument.AppendMetadataRevisionResult
- Method PdfDocument.Compose
- Method PdfDocument.Create
- Method PdfDocument.CreateFromImages
- Method PdfDocument.FlattenVisualAnnotations
- Method PdfDocument.FlattenVisualAnnotationsResult
- Method PdfDocument.Load
- Method PdfDocument.LoadAsync
- Method PdfDocument.Merge
- Method PdfDocument.MergeBytes
- Method PdfDocument.MergeWith
- Method PdfDocument.MergeWithResult
- Method PdfDocument.Meta
- Method PdfDocument.ReplaceMetadata
- Method PdfDocument.ReplaceMetadataResult
- Method PdfDocument.SynchronizeMetadata
- Method PdfDocument.SynchronizeMetadataResult
- Method PdfDocument.UpdateMetadata
- Method PdfDocument.UpdateMetadataResult
- Method PdfDocumentConversionResult.RequireNoLoss
- Method PdfDocumentConversionResult.RequireValue
- Property PdfDocumentConversionResult.Value
- Extension method PdfDocumentForms.FillAndFlattenResult
- Extension method PdfDocumentForms.FillResult
- Extension method PdfDocumentForms.FlattenResult
- Method PdfDocumentForms.AppendRevision
- Method PdfDocumentForms.AppendRevisionResult
- Method PdfDocumentForms.Fill
- Method PdfDocumentForms.FillAndFlatten
- Method PdfDocumentForms.FillAndFlattenResult
- Method PdfDocumentForms.FillResult
- Method PdfDocumentForms.Flatten
- Method PdfDocumentForms.FlattenResult
- Method PdfDocumentForms.ImportData
- Method PdfDocumentForms.ImportXfdf
- Method PdfDocumentFormsCompatibilityExtensions.FillAndFlattenResult
- Method PdfDocumentFormsCompatibilityExtensions.FillResult
- Method PdfDocumentFormsCompatibilityExtensions.FlattenResult
- Method PdfDocumentPages.Append
- Method PdfDocumentPages.AppendResult
- Method PdfDocumentPages.ApplyAttributes
- Method PdfDocumentPages.ApplyAttributesResult
- Method PdfDocumentPages.CropAndTranslate
- Method PdfDocumentPages.Delete
- Method PdfDocumentPages.DeleteResult
- Method PdfDocumentPages.Duplicate
- Method PdfDocumentPages.DuplicateResult
- Method PdfDocumentPages.Extract
- Method PdfDocumentPages.ExtractResult
- Method PdfDocumentPages.Insert
- Method PdfDocumentPages.InsertResult
- Method PdfDocumentPages.Move
- Method PdfDocumentPages.MoveResult
- Method PdfDocumentPages.NormalizeRotation
- Method PdfDocumentPages.NormalizeRotationResult
- Method PdfDocumentPages.Prepend
- Method PdfDocumentPages.PrependResult
- Method PdfDocumentPages.Reorder
- Method PdfDocumentPages.ReorderResult
- Method PdfDocumentPages.Resize
- Method PdfDocumentPages.Rotate
- Method PdfDocumentPages.RotateBy
- Method PdfDocumentPages.RotateByResult
- Method PdfDocumentPages.RotateResult
- Method PdfDocumentPages.SetArtBox
- Method PdfDocumentPages.SetBleedBox
- Method PdfDocumentPages.SetCropBox
- Method PdfDocumentPages.SetMediaBox
- Method PdfDocumentPages.SetPageBox
- Method PdfDocumentPages.SetPageBoxResult
- Method PdfDocumentPages.SetTrimBox
- Method PdfDocumentPages.Split
- Method PdfDocumentPages.SplitByBookmarks
- Method PdfDocumentPages.SplitByBookmarksResult
- Method PdfDocumentPages.SplitResult
- Method PdfDocumentRedactions.AddAnnotation
- Method PdfDocumentRedactions.Apply
- Method PdfDocumentRedactions.ApplyResult
- Method PdfDocumentSecurity.CompleteExternalSignature
- Method PdfDocumentStamper.Content
- Method PdfDocumentStamper.ContentResult
- Method PdfDocumentStamper.Image
- Method PdfDocumentStamper.ImageResult
- Method PdfDocumentStamper.ImageWatermark
- Method PdfDocumentStamper.ImageWatermarkResult
- Method PdfDocumentStamper.OverlayPage
- Method PdfDocumentStamper.OverlayPageResult
- Method PdfDocumentStamper.Text
- Method PdfDocumentStamper.TextResult
- Method PdfDocumentStamper.TextWatermark
- Method PdfDocumentStamper.TextWatermarkResult
- Method PdfDocumentStamper.UnderlayPage
- Method PdfDocumentStamper.UnderlayPageResult
- Method PdfDocumentStamper.Watermark
- Method PdfExternalSignatureCompletion.ToDocument
- Method PdfExternalSignaturePreparation.Complete
- Property PdfImageEditResult.Document
- Method PdfImpositionResult.ToDocument
- Method PdfInteractiveContentFlattenResult.ToDocument
- Method PdfInterleaveResult.ToDocument
- Method PdfJavaScriptEditResult.ToDocument
- Method PdfMergeResult.RequireValue
- Method PdfMergeResult.ToDocument
- Property PdfMergeResult.Value
- Method PdfOptimizationActionResult.ToDocument
- Method PdfPageRewriteResult.ToDocument
- Property PdfProductionFixupResult.Document
- Method PdfProductionSplitPart.ToDocument
- Method PdfRedactionApplyResult.ToDocument
- Method PdfRepairArtifactResult.ToDocument
- Method PdfSanitizationResult.ToDocument
- Method PdfSecurityMutationResult.ToDocument
- Property PdfTextEditResult.Document
- Method PdfUnsignedDerivativeResult.ToDocument
Accepted by parameters 25
- Extension method PdfDocument.ExportImages
- Extension method PdfDocument.ToImages
- Method PdfDocument.Merge
- Method PdfDocument.MergeResult
- Method PdfDocument.MergeWith
- Method PdfDocument.MergeWithResult
- Constructor PdfDocumentConversionResult.PdfDocumentConversionResult
- Method PdfDocumentConversionResult.Process
- Method PdfDocumentConversionResult.WithValue
- Method PdfDocumentPages.Append
- Method PdfDocumentPages.AppendResult
- Method PdfDocumentPages.Insert
- Method PdfDocumentPages.InsertResult
- Method PdfDocumentPages.Prepend
- Method PdfDocumentPages.PrependResult
- Method PdfDocumentProof.AnalyzePageChanges
- Method PdfDocumentProof.AssertRewritePreservationMatrix
- Method PdfDocumentProof.AssertRewritePreserved
- Method PdfDocumentProof.AssessRewritePreservation
- Method PdfDocumentProof.AssessRewritePreservationMatrix
- Method PdfDocumentProof.CompareReview
- Method PdfDocumentProof.CompareVisual
- Method PdfDocumentProof.CompareVisualPages
- Method PdfImageExportExtensions.ExportImages
- Method PdfImageExportExtensions.ToImages
Examples
using OfficeIMO.Pdf;
PdfDocument.Create(pdf => pdf.Content(content => content
.H1("OfficeIMO.Pdf")
.Paragraph(paragraph => paragraph.Text("Hello from OfficeIMO."))))
.Save("hello.pdf");Methods
public PdfAnalysisReport Analyze(PdfComplianceProfile complianceProfile = None) #PdfAnalysisReportProduces one consolidated health and capability report. Supply a compliance profile to include artifact readback readiness.
Parameters
- complianceProfile OfficeIMO.Pdf.PdfComplianceProfile = None
public PdfAnalysisReport Analyze(PdfComplianceProfile complianceProfile, CancellationToken cancellationToken) #PdfAnalysisReportProduces one consolidated health and capability report with cooperative cancellation.
Parameters
- complianceProfile OfficeIMO.Pdf.PdfComplianceProfile
- cancellationToken System.Threading.CancellationToken
public PdfAppendOnlyMutationReport AnalyzeAppendOnlyMutation(PdfLoadOptions? options = null) #PdfAppendOnlyMutationReportAnalyzes which append-only mutation actions OfficeIMO.Pdf can safely attempt for this PDF.
Parameters
- options OfficeIMO.Pdf.PdfLoadOptions? = null
public IReadOnlyList<PdfTextEncodingDiagnostic> AnalyzeTextEncoding() #IReadOnlyList<PdfTextEncodingDiagnostic>Analyzes generated document text against the configured PDF text encoding before rendering.
public IReadOnlyList<PdfTextEncodingDiagnostic> AnalyzeTextEncoding(CancellationToken cancellationToken) #IReadOnlyList<PdfTextEncodingDiagnostic>Analyzes generated PDF text while honoring cancellation during document traversal.
Parameters
- cancellationToken System.Threading.CancellationToken
- Token checked before preflight and while visiting generated content.
Returns
Encoding diagnostics in generated document order.
Exceptions
OperationCanceledException– The supplied token is canceled.
public PdfDocument AppendMetadataRevision(String? title = null, String? author = null, String? subject = null, String? keywords = null, Boolean createXmpMetadata = false) #PdfDocumentAppends a metadata-only incremental revision without rewriting the existing PDF bytes.
Parameters
- title System.String? = null
- author System.String? = null
- subject System.String? = null
- keywords System.String? = null
- createXmpMetadata System.Boolean = false
public PdfOperationResult<PdfDocument> AppendMetadataRevisionResult(String? title = null, String? author = null, String? subject = null, String? keywords = null, PdfLoadOptions? options = null, Boolean createXmpMetadata = false) #PdfOperationResult<PdfDocument>Attempts to append a metadata-only incremental revision, returning diagnostics when blocked or failed.
Parameters
- title System.String? = null
- author System.String? = null
- subject System.String? = null
- keywords System.String? = null
- options OfficeIMO.Pdf.PdfLoadOptions? = null
- createXmpMetadata System.Boolean = false
public PdfComplianceReadinessReport AssessCompliance() #PdfComplianceReadinessReportAnalyzes this generated document against its configured compliance profile using the same layout path as PDF output.
public PdfComplianceReadinessReport AssessCompliance(PdfComplianceProfile profile) #PdfComplianceReadinessReportAnalyzes this document against a formal compliance profile. Generated documents use layout evidence; opened documents use artifact readback evidence.
Parameters
- profile OfficeIMO.Pdf.PdfComplianceProfile
- Compliance profile to assess without enabling formal profile generation.
public PdfComplianceReadinessReport AssessCompliance(PdfComplianceProfile profile, CancellationToken cancellationToken) #PdfComplianceReadinessReportAnalyzes a compliance profile while observing cancellation during opened-PDF readback.
Parameters
- profile OfficeIMO.Pdf.PdfComplianceProfile
- cancellationToken System.Threading.CancellationToken
public PdfComplianceProofReport AssessComplianceProof(IEnumerable<PdfExternalValidationResult>? externalValidations = null) #PdfComplianceProofReportCombines generated-document compliance readiness for the configured profile with external validator evidence.
Parameters
- externalValidations System.Collections.Generic.IEnumerable<OfficeIMO.Pdf.PdfExternalValidationResult>? = null
public PdfComplianceProofReport AssessComplianceProof(PdfComplianceProfile profile, IEnumerable<PdfExternalValidationResult>? externalValidations = null) #PdfComplianceProofReportCombines generated-document compliance readiness for a formal profile with external validator evidence.
Parameters
- profile OfficeIMO.Pdf.PdfComplianceProfile
- Compliance profile to assess without enabling formal profile generation.
- externalValidations System.Collections.Generic.IEnumerable<OfficeIMO.Pdf.PdfExternalValidationResult>? = null
- Optional external validator results to combine with OfficeIMO.Pdf readiness evidence.
public PdfDeclaredComplianceClaimsReport AssessDeclaredComplianceClaims(IEnumerable<PdfExternalValidationResult>? externalValidations = null) #PdfDeclaredComplianceClaimsReportAssesses PDF/A and PDF/UA declarations found in XMP metadata against the exact PDF bytes. Declared metadata alone is never accepted as conformance proof.
Parameters
- externalValidations System.Collections.Generic.IEnumerable<OfficeIMO.Pdf.PdfExternalValidationResult>? = null
public PdfMutationPortfolioReport AssessMutations(IEnumerable<PdfMutationOperation>? operations = null, IEnumerable<String>? fieldNames = null, PdfLoadOptions? options = null, PdfMutationExecutionPreference executionPreference = Automatic) #PdfMutationPortfolioReportAssesses several mutation families against one shared preflight snapshot.
Parameters
- operations System.Collections.Generic.IEnumerable<OfficeIMO.Pdf.PdfMutationOperation>? = null
- fieldNames System.Collections.Generic.IEnumerable<System.String>? = null
- options OfficeIMO.Pdf.PdfLoadOptions? = null
- executionPreference OfficeIMO.Pdf.PdfMutationExecutionPreference = Automatic
public PdfMutationPortfolioReport AssessMutations(CancellationToken cancellationToken, IEnumerable<PdfMutationOperation>? operations = null, IEnumerable<String>? fieldNames = null, PdfLoadOptions? options = null, PdfMutationExecutionPreference executionPreference = Automatic) #PdfMutationPortfolioReportAssesses mutation families with cooperative cancellation and one shared preflight snapshot.
Parameters
- cancellationToken System.Threading.CancellationToken
- operations System.Collections.Generic.IEnumerable<OfficeIMO.Pdf.PdfMutationOperation>? = null
- fieldNames System.Collections.Generic.IEnumerable<System.String>? = null
- options OfficeIMO.Pdf.PdfLoadOptions? = null
- executionPreference OfficeIMO.Pdf.PdfMutationExecutionPreference = Automatic
public PdfRenderCompatibilityReport AssessRenderCompatibility(PdfLoadOptions? options = null) #PdfRenderCompatibilityReportAssesses managed page-render fidelity without rasterizing or writing image artifacts.
Parameters
- options OfficeIMO.Pdf.PdfLoadOptions? = null
public PdfRenderCompatibilityReport AssessRenderCompatibility(PdfLoadOptions? options, PdfPageRenderOptions? renderOptions) #PdfRenderCompatibilityReportAssesses managed page-render fidelity with configurable per-page diagnostic limits.
Parameters
- options OfficeIMO.Pdf.PdfLoadOptions?
- renderOptions OfficeIMO.Pdf.PdfPageRenderOptions?
public PdfDocument Compose(Action<PdfDocumentBuilder> compose) #PdfDocumentHigher-level composition model (page size/margins/footer + content), similar to other document DSLs. Sugar only; composes into the same PdfDocument blocks and options.
Parameters
- compose System.Action<OfficeIMO.Pdf.PdfDocumentBuilder>
public static PdfDocument Create(PdfOptions? options = null) #PdfDocumentCreates a new, empty PDF document with optional options.
Parameters
- options OfficeIMO.Pdf.PdfOptions? = null
- Page size, margins and default font options. When null, sensible defaults are used.
Returns
New PdfDocument instance.
public static PdfDocument Create(Action<PdfDocumentBuilder> compose, PdfOptions? options = null) #PdfDocumentCreates and composes a PDF document through the canonical authoring DSL.
Parameters
- compose System.Action<OfficeIMO.Pdf.PdfDocumentBuilder>
- Document composition callback.
- options OfficeIMO.Pdf.PdfOptions? = null
- Optional document-wide rendering, catalog, security, and compliance options.
Returns
The composed PdfDocument.
public PdfComplianceArtifact CreateComplianceArtifact() #PdfComplianceArtifactAtomically renders or snapshots this document with readiness evidence for its configured compliance profile.
public PdfComplianceArtifact CreateComplianceArtifact(PdfComplianceProfile profile) #PdfComplianceArtifactAtomically renders or snapshots this document with readiness evidence for profile. Use the returned artifact's bytes for external validation, then call its PdfComplianceArtifact.AssessProof method with those validator results.
Parameters
- profile OfficeIMO.Pdf.PdfComplianceProfile
public static PdfDocument CreateFromImages(IEnumerable<String> imagePaths, PdfImageDocumentOptions? options = null) #PdfDocumentCreates one PDF page per image file in caller order.
Parameters
- imagePaths System.Collections.Generic.IEnumerable<System.String>
- options OfficeIMO.Pdf.PdfImageDocumentOptions? = null
public static PdfDocument CreateFromImages(IEnumerable<String> imagePaths, PdfImageDocumentOptions? options, CancellationToken cancellationToken) #PdfDocumentCreates one PDF page per image file in caller order with cooperative cancellation.
Parameters
- imagePaths System.Collections.Generic.IEnumerable<System.String>
- options OfficeIMO.Pdf.PdfImageDocumentOptions?
- cancellationToken System.Threading.CancellationToken
public static PdfDocument CreateFromImages(IEnumerable<PdfImageDocumentSource> images, PdfImageDocumentOptions? options = null) #PdfDocumentCreates one PDF page per encoded image source in caller order.
Parameters
- images System.Collections.Generic.IEnumerable<OfficeIMO.Pdf.PdfImageDocumentSource>
- options OfficeIMO.Pdf.PdfImageDocumentOptions? = null
public static PdfDocument CreateFromImages(IEnumerable<PdfImageDocumentSource> images, PdfImageDocumentOptions? options, CancellationToken cancellationToken) #PdfDocumentCreates one PDF page per encoded image source in caller order with cooperative cancellation.
Parameters
- images System.Collections.Generic.IEnumerable<OfficeIMO.Pdf.PdfImageDocumentSource>
- options OfficeIMO.Pdf.PdfImageDocumentOptions?
- cancellationToken System.Threading.CancellationToken
public PdfDebuggerReport Debug(PdfDebuggerOptions? options = null, PdfLoadOptions? readOptions = null) #PdfDebuggerReportCreates a bounded debugger projection of objects, revisions, pages, resources, and content operators.
Parameters
- options OfficeIMO.Pdf.PdfDebuggerOptions? = null
- readOptions OfficeIMO.Pdf.PdfLoadOptions? = null
public PdfDiagnosticReport Diagnostics(PdfLoadOptions? options = null) #PdfDiagnosticReportBuilds a combined PDF diagnostic report for this document.
Parameters
- options OfficeIMO.Pdf.PdfLoadOptions? = null
public PdfInteractiveContentFlattenResult FlattenInteractiveContent(PdfInteractiveContentFlattenOptions? options = null) #PdfInteractiveContentFlattenResultFlattens readable AcroForm fields and supported visual annotations into one new PDF artifact.
Parameters
- options OfficeIMO.Pdf.PdfInteractiveContentFlattenOptions? = null
public PdfDocument FlattenVisualAnnotations() #PdfDocumentCreates a new PDF with visual annotation appearance streams painted into page content where supported.
public PdfOperationResult<PdfDocument> FlattenVisualAnnotationsResult(PdfLoadOptions? options = null) #PdfOperationResult<PdfDocument>Attempts to flatten visual annotation appearance streams, returning diagnostics when blocked or failed.
Parameters
- options OfficeIMO.Pdf.PdfLoadOptions? = null
public PdfPageInteractionMap GetEditingInteractions(Int32 pageNumber) #PdfPageInteractionMapReads visual hit regions for permitted annotation and form editing, without extracting page text or images.
Parameters
- pageNumber System.Int32
public IReadOnlyList<PdfPageLayoutInfo> GetPageLayouts(PdfLoadOptions? options = null) #IReadOnlyList<PdfPageLayoutInfo>Reads page geometry without extracting document content or requiring copy permission.
Parameters
- options OfficeIMO.Pdf.PdfLoadOptions? = null
public IReadOnlyList<PdfPageLayoutInfo> GetPageLayouts(PdfLoadOptions? options, CancellationToken cancellationToken) #IReadOnlyList<PdfPageLayoutInfo>Reads page geometry with cooperative cancellation, without extracting document content or requiring copy permission.
Parameters
- options OfficeIMO.Pdf.PdfLoadOptions?
- cancellationToken System.Threading.CancellationToken
public IReadOnlyList<PdfPageLayoutInfo> GetPrintablePageLayouts(PdfLoadOptions? options = null) #IReadOnlyList<PdfPageLayoutInfo>Reads page geometry for printing after enforcing the authenticated document permissions.
Parameters
- options OfficeIMO.Pdf.PdfLoadOptions? = null
public IReadOnlyList<PdfPageLayoutInfo> GetPrintablePageLayouts(PdfLoadOptions? options, CancellationToken cancellationToken) #IReadOnlyList<PdfPageLayoutInfo>Reads page geometry for printing with cooperative cancellation after enforcing the authenticated document permissions.
Parameters
- options OfficeIMO.Pdf.PdfLoadOptions?
- cancellationToken System.Threading.CancellationToken
public PdfDocumentInfo Inspect(PdfLoadOptions? options = null) #PdfDocumentInfoInspects metadata, pages, annotations, fields, and catalog-level state.
Parameters
- options OfficeIMO.Pdf.PdfLoadOptions? = null
public PdfDocumentInfo Inspect(PdfLoadOptions? options, CancellationToken cancellationToken) #PdfDocumentInfoInspects metadata, pages, annotations, fields, and catalog-level state with cooperative cancellation.
Parameters
- options OfficeIMO.Pdf.PdfLoadOptions?
- cancellationToken System.Threading.CancellationToken
public static OfficeContentSafetyReport InspectContentSafety(String filePath, OfficeContentSafetyOptions? options = null, PdfLoadOptions? readOptions = null) #OfficeContentSafetyReportInspects decoded PDF text for exact paint, clipping, geometry, contrast, and Unicode evidence.
Parameters
- filePath System.String
- options OfficeIMO.ContentSafety.OfficeContentSafetyOptions? = null
- readOptions OfficeIMO.Pdf.PdfLoadOptions? = null
public static OfficeContentSafetyReport InspectContentSafety(Byte[] pdf, OfficeContentSafetyOptions? options = null, PdfLoadOptions? readOptions = null) #OfficeContentSafetyReportInspects encoded PDF bytes without treating concealment as evidence of AI authorship.
Parameters
- pdf System.Byte[]
- options OfficeIMO.ContentSafety.OfficeContentSafetyOptions? = null
- readOptions OfficeIMO.Pdf.PdfLoadOptions? = null
public PdfDocumentViewInfo InspectForViewing(PdfLoadOptions? options = null, CancellationToken cancellationToken = default) #PdfDocumentViewInfoInspects authenticated page geometry for viewing without requiring content-copy permission. Full logical inspection is included only when extraction is authorized. This does not change mutation or extraction policy.
Parameters
- options OfficeIMO.Pdf.PdfLoadOptions? = null
- cancellationToken System.Threading.CancellationToken = default
public PdfDocumentViewInfo InspectGeometryForViewing(PdfLoadOptions? options = null, CancellationToken cancellationToken = default) #PdfDocumentViewInfoInspects authenticated page geometry and permissions without decoding logical page content, even when extraction is permitted.
Parameters
- options OfficeIMO.Pdf.PdfLoadOptions? = null
- cancellationToken System.Threading.CancellationToken = default
public PdfSanitizationReport InspectSanitization(PdfSanitizationOptions? options = null) #PdfSanitizationReportInspects what the supplied sanitization policy would remove without modifying the PDF.
Parameters
- options OfficeIMO.Pdf.PdfSanitizationOptions? = null
public static PdfDocument Load(Byte[] pdf, PdfLoadOptions? loadOptions = null) #PdfDocumentLoads an existing PDF from bytes and snapshots the caller-owned input once.
Parameters
- pdf System.Byte[]
- loadOptions OfficeIMO.Pdf.PdfLoadOptions? = null
public static PdfDocument Load(String path, PdfLoadOptions? loadOptions = null) #PdfDocumentLoads an existing PDF from a bounded file snapshot.
Parameters
- path System.String
- loadOptions OfficeIMO.Pdf.PdfLoadOptions? = null
public static PdfDocument Load(Stream stream, PdfLoadOptions? loadOptions = null) #PdfDocumentLoads a complete PDF from a readable stream. Seekable streams are read from the beginning and restored.
Parameters
- stream System.IO.Stream
- loadOptions OfficeIMO.Pdf.PdfLoadOptions? = null
public static PdfDocument Load(String path, PdfLoadOptions? loadOptions, CancellationToken cancellationToken) #PdfDocumentLoads a bounded file snapshot with cooperative cancellation.
Parameters
- path System.String
- loadOptions OfficeIMO.Pdf.PdfLoadOptions?
- cancellationToken System.Threading.CancellationToken
public static PdfDocument Load(Stream stream, PdfLoadOptions? loadOptions, CancellationToken cancellationToken) #PdfDocumentLoads a bounded stream snapshot with cooperative cancellation and preserves seekable stream position.
Parameters
- stream System.IO.Stream
- loadOptions OfficeIMO.Pdf.PdfLoadOptions?
- cancellationToken System.Threading.CancellationToken
public static async Task<PdfDocument> LoadAsync(String path, PdfLoadOptions? loadOptions = null, CancellationToken cancellationToken = default) #Task<PdfDocument>Asynchronously loads an existing PDF from a bounded file snapshot.
Parameters
- path System.String
- loadOptions OfficeIMO.Pdf.PdfLoadOptions? = null
- cancellationToken System.Threading.CancellationToken = default
public static async Task<PdfDocument> LoadAsync(Stream stream, PdfLoadOptions? loadOptions = null, CancellationToken cancellationToken = default) #Task<PdfDocument>Asynchronously loads a complete PDF from a readable caller-owned stream.
Parameters
- stream System.IO.Stream
- loadOptions OfficeIMO.Pdf.PdfLoadOptions? = null
- cancellationToken System.Threading.CancellationToken = default
public static PdfDocument Merge(PdfMergeOptions options, params PdfDocument[] documents) #PdfDocumentMerges loaded or generated documents using an explicit structure policy.
Parameters
- options OfficeIMO.Pdf.PdfMergeOptions
- documents OfficeIMO.Pdf.PdfDocument[]
public static PdfDocument Merge(PdfMergeOptions options, IEnumerable<PdfDocument> documents) #PdfDocumentMerges loaded or generated documents using an explicit structure policy.
Parameters
- options OfficeIMO.Pdf.PdfMergeOptions
- documents System.Collections.Generic.IEnumerable<OfficeIMO.Pdf.PdfDocument>
public static PdfDocument Merge(params PdfDocument[] documents) #PdfDocumentCreates one PDF by merging all supplied documents in order through a single merge pass.
Parameters
- documents OfficeIMO.Pdf.PdfDocument[]
public static PdfDocument Merge(IEnumerable<PdfDocument> documents) #PdfDocumentCreates one PDF by merging all supplied documents in order through a single merge pass.
Parameters
- documents System.Collections.Generic.IEnumerable<OfficeIMO.Pdf.PdfDocument>
public static PdfDocument Merge(IEnumerable<PdfDocument> documents, CancellationToken cancellationToken) #PdfDocumentCreates one PDF by merging all supplied documents in order through a cancellable single merge pass.
Parameters
- documents System.Collections.Generic.IEnumerable<OfficeIMO.Pdf.PdfDocument>
- cancellationToken System.Threading.CancellationToken
public static PdfDocument MergeBytes(PdfMergeOptions options, IEnumerable<Byte[]> pdfs) #PdfDocumentMerges caller-owned PDF byte payloads using an explicit structure policy. The inputs are consumed synchronously and are not retained by the returned document.
Parameters
- options OfficeIMO.Pdf.PdfMergeOptions
- pdfs System.Collections.Generic.IEnumerable<System.Byte[]>
public static PdfDocument MergeBytes(IEnumerable<Byte[]> pdfs) #PdfDocumentCreates one PDF by merging the supplied caller-owned PDF byte payloads in order. The inputs are consumed synchronously and are not retained by the returned document.
Parameters
- pdfs System.Collections.Generic.IEnumerable<System.Byte[]>
public static PdfDocument MergeBytes(IEnumerable<Byte[]> pdfs, CancellationToken cancellationToken) #PdfDocumentCreates one PDF by merging the supplied caller-owned PDF byte payloads in order through a cancellable single merge pass. The inputs are consumed synchronously and are not retained by the returned document.
Parameters
- pdfs System.Collections.Generic.IEnumerable<System.Byte[]>
- cancellationToken System.Threading.CancellationToken
public static PdfMergeResult MergeBytesResult(PdfMergeOptions options, IEnumerable<Byte[]> pdfs) #PdfMergeResultMerges caller-owned PDF byte payloads with an explicit structure policy and returns readback evidence. The inputs are consumed synchronously and are not retained by the result.
Parameters
- options OfficeIMO.Pdf.PdfMergeOptions
- pdfs System.Collections.Generic.IEnumerable<System.Byte[]>
public static PdfMergeResult MergeResult(PdfMergeOptions options, params PdfDocument[] documents) #PdfMergeResultMerges loaded or generated documents with an explicit structure policy and returns readback evidence.
Parameters
- options OfficeIMO.Pdf.PdfMergeOptions
- documents OfficeIMO.Pdf.PdfDocument[]
public static PdfMergeResult MergeResult(PdfMergeOptions options, IEnumerable<PdfDocument> documents) #PdfMergeResultMerges loaded or generated documents with an explicit structure policy and returns readback evidence.
Parameters
- options OfficeIMO.Pdf.PdfMergeOptions
- documents System.Collections.Generic.IEnumerable<OfficeIMO.Pdf.PdfDocument>
public static PdfMergeResult MergeResult(PdfMergeOptions options, IEnumerable<PdfDocument> documents, CancellationToken cancellationToken) #PdfMergeResultMerges documents with an explicit structure policy and cooperative cancellation, returning readback evidence.
Parameters
- options OfficeIMO.Pdf.PdfMergeOptions
- documents System.Collections.Generic.IEnumerable<OfficeIMO.Pdf.PdfDocument>
- cancellationToken System.Threading.CancellationToken
public static Byte[] MergeToBytes(PdfMergeOptions options, params Byte[][] pdfs) #Byte[]Merges caller-owned PDF byte payloads using an explicit structure policy and returns the merged artifact directly. The inputs are consumed synchronously and are not retained; the returned array is owned by the caller.
Parameters
- options OfficeIMO.Pdf.PdfMergeOptions
- pdfs System.Byte[][]
public static Byte[] MergeToBytes(PdfMergeOptions options, IEnumerable<Byte[]> pdfs) #Byte[]Merges caller-owned PDF byte payloads using an explicit structure policy and returns the merged artifact directly. The inputs are consumed synchronously and are not retained; the returned array is owned by the caller.
Parameters
- options OfficeIMO.Pdf.PdfMergeOptions
- pdfs System.Collections.Generic.IEnumerable<System.Byte[]>
public static Byte[] MergeToBytes(params Byte[][] pdfs) #Byte[]Merges the supplied caller-owned PDF byte payloads and returns the merged artifact directly. The inputs are consumed synchronously and are not retained; the returned array is owned by the caller.
Parameters
- pdfs System.Byte[][]
public static Byte[] MergeToBytes(IEnumerable<Byte[]> pdfs) #Byte[]Merges the supplied caller-owned PDF byte payloads and returns the merged artifact directly. The inputs are consumed synchronously and are not retained; the returned array is owned by the caller.
Parameters
- pdfs System.Collections.Generic.IEnumerable<System.Byte[]>
public static Byte[] MergeToBytes(IEnumerable<Byte[]> pdfs, CancellationToken cancellationToken) #Byte[]Merges the supplied caller-owned PDF byte payloads through a cancellable single pass and returns the merged artifact directly. The inputs are consumed synchronously and are not retained; the returned array is owned by the caller.
Parameters
- pdfs System.Collections.Generic.IEnumerable<System.Byte[]>
- cancellationToken System.Threading.CancellationToken
public PdfDocument MergeWith(PdfDocument document, PdfMergeOptions options) #PdfDocumentMerges this PDF with another loaded or generated PDF using an explicit structure policy.
Parameters
- document OfficeIMO.Pdf.PdfDocument
- options OfficeIMO.Pdf.PdfMergeOptions
public PdfDocument MergeWith(PdfDocument document) #PdfDocumentCreates a new PDF by merging this PDF with another loaded or generated PDF.
Parameters
- document OfficeIMO.Pdf.PdfDocument
public PdfDocument MergeWith(Byte[] pdf) #PdfDocumentCreates a new PDF by merging this PDF with another PDF byte payload. The input is consumed synchronously and is not retained by the returned document.
Parameters
- pdf System.Byte[]
public PdfDocument MergeWith(String path) #PdfDocumentCreates a new PDF by merging this PDF with another PDF file.
Parameters
- path System.String
public PdfDocument MergeWith(Stream stream) #PdfDocumentCreates a new PDF by merging this PDF with another readable PDF stream.
Parameters
- stream System.IO.Stream
public PdfMergeResult MergeWithResult(PdfDocument document, PdfMergeOptions options) #PdfMergeResultMerges this PDF with another loaded or generated PDF and returns structure and readback evidence.
Parameters
- document OfficeIMO.Pdf.PdfDocument
- options OfficeIMO.Pdf.PdfMergeOptions
public PdfOperationResult<PdfDocument> MergeWithResult(PdfDocument document, PdfLoadOptions? options = null) #PdfOperationResult<PdfDocument>Attempts to merge this PDF with another loaded or generated PDF, returning diagnostics when blocked or failed.
Parameters
- document OfficeIMO.Pdf.PdfDocument
- options OfficeIMO.Pdf.PdfLoadOptions? = null
public PdfOperationResult<PdfDocument> MergeWithResult(Byte[] pdf, PdfLoadOptions? options = null) #PdfOperationResult<PdfDocument>Attempts to merge this PDF with another PDF byte payload, returning diagnostics when blocked or failed. The input is consumed synchronously and is not retained by the result.
Parameters
- pdf System.Byte[]
- options OfficeIMO.Pdf.PdfLoadOptions? = null
public PdfOperationResult<PdfDocument> MergeWithResult(String path, PdfLoadOptions? options = null) #PdfOperationResult<PdfDocument>Attempts to merge this PDF with another PDF file, returning diagnostics when blocked or failed.
Parameters
- path System.String
- options OfficeIMO.Pdf.PdfLoadOptions? = null
public PdfOperationResult<PdfDocument> MergeWithResult(Stream stream, PdfLoadOptions? options = null) #PdfOperationResult<PdfDocument>Attempts to merge this PDF with another readable PDF stream, returning diagnostics when blocked or failed.
Parameters
- stream System.IO.Stream
- options OfficeIMO.Pdf.PdfLoadOptions? = null
public PdfDocument Meta(String? title = null, String? author = null, String? subject = null, String? keywords = null) #PdfDocumentSets PDF metadata. Only values provided are updated; missing parameters keep previous values. Pass an empty string to clear a previously assigned value.
Parameters
- title System.String? = null
- Document title metadata.
- author System.String? = null
- Document author metadata.
- subject System.String? = null
- Document subject metadata.
- keywords System.String? = null
- Document keywords metadata.
Returns
This PdfDocument for chaining.
public PdfMutationPlan PlanMutation(PdfMutationOperation operation, IEnumerable<String>? fieldNames = null, PdfLoadOptions? options = null, PdfMutationExecutionPreference executionPreference = Automatic) #PdfMutationPlanChooses a full-rewrite, append-only, or blocked path for an existing-document mutation.
Parameters
- operation OfficeIMO.Pdf.PdfMutationOperation
- fieldNames System.Collections.Generic.IEnumerable<System.String>? = null
- options OfficeIMO.Pdf.PdfLoadOptions? = null
- executionPreference OfficeIMO.Pdf.PdfMutationExecutionPreference = Automatic
public PdfMutationPlan PlanMutation(PdfMutationOperation operation, IEnumerable<String>? fieldNames, PdfLoadOptions? options, PdfMutationExecutionPreference executionPreference, CancellationToken cancellationToken) #PdfMutationPlanChooses a mutation path while observing cancellation during parsing and preflight.
Parameters
- operation OfficeIMO.Pdf.PdfMutationOperation
- fieldNames System.Collections.Generic.IEnumerable<System.String>?
- options OfficeIMO.Pdf.PdfLoadOptions?
- executionPreference OfficeIMO.Pdf.PdfMutationExecutionPreference
- cancellationToken System.Threading.CancellationToken
public static PdfDocumentPreflight Preflight(Byte[] pdf, PdfLoadOptions? options = null) #PdfDocumentPreflightReports read and rewrite capabilities for a PDF byte array without requiring the document to open successfully. This is useful for encrypted, malformed, or otherwise unsupported input that still needs a diagnostic report.
Parameters
- pdf System.Byte[]
- options OfficeIMO.Pdf.PdfLoadOptions? = null
public static PdfDocumentPreflight Preflight(Byte[] pdf, PdfLoadOptions? options, CancellationToken cancellationToken) #PdfDocumentPreflightReports read and rewrite capabilities for a PDF byte array with cooperative cancellation.
Parameters
- pdf System.Byte[]
- options OfficeIMO.Pdf.PdfLoadOptions?
- cancellationToken System.Threading.CancellationToken
public static PdfDocumentPreflight Preflight(String path, PdfLoadOptions? options = null) #PdfDocumentPreflightReports read and rewrite capabilities for a PDF file without requiring the document to open successfully. This is useful for encrypted, malformed, or otherwise unsupported input that still needs a diagnostic report.
Parameters
- path System.String
- options OfficeIMO.Pdf.PdfLoadOptions? = null
public static PdfDocumentPreflight Preflight(Stream stream, PdfLoadOptions? options = null) #PdfDocumentPreflightReports read and rewrite capabilities for a readable PDF stream without requiring the document to open successfully. The stream is consumed from its current position.
Parameters
- stream System.IO.Stream
- options OfficeIMO.Pdf.PdfLoadOptions? = null
public PdfDocumentPreflight Preflight(PdfLoadOptions? options = null) #PdfDocumentPreflightReports read and rewrite capabilities for this PDF.
Parameters
- options OfficeIMO.Pdf.PdfLoadOptions? = null
public PdfDocumentPreflight Preflight(PdfLoadOptions? options, CancellationToken cancellationToken) #PdfDocumentPreflightReports read and rewrite capabilities with cooperative cancellation.
Parameters
- options OfficeIMO.Pdf.PdfLoadOptions?
- cancellationToken System.Threading.CancellationToken
public PdfDocumentReadResult Read(PdfReadOptions? options = null, CancellationToken cancellationToken = default) #PdfDocumentReadResultBuilds the canonical semantic document result using the structured profile by default.
Parameters
- options OfficeIMO.Pdf.PdfReadOptions? = null
- cancellationToken System.Threading.CancellationToken = default
public PdfInspectionReadResult ReadForInspection(PdfReadOptions? options = null, CancellationToken cancellationToken = default) #PdfInspectionReadResultReads supported selected pages while retaining structural facts and explicit outcomes for unmappable text and unsupported content-stream filters. Existing PdfDocument.Read remains fail-fast. Cancellation, resource admission, authentication, permissions, structural parsing, and unexpected stage failures remain terminal and are never converted to partial success.
Parameters
- options OfficeIMO.Pdf.PdfReadOptions? = null
- cancellationToken System.Threading.CancellationToken = default
public static OfficeContentCleanupResult RemoveSelectedContent(Byte[] pdf, OfficeContentCleanupSelection selection, OfficeContentCleanupOptions? options = null, PdfLoadOptions? readOptions = null) #OfficeContentCleanupResultPhysically removes exact selected PDF text spans and verifies the rewritten artifact.
Parameters
- pdf System.Byte[]
- selection OfficeIMO.ContentSafety.OfficeContentCleanupSelection
- options OfficeIMO.ContentSafety.OfficeContentCleanupOptions? = null
- readOptions OfficeIMO.Pdf.PdfLoadOptions? = null
public static OfficeContentCleanupResult RemoveSelectedContent(String inputPath, String outputPath, OfficeContentCleanupSelection selection, OfficeContentCleanupOptions? options = null, PdfLoadOptions? readOptions = null) #OfficeContentCleanupResultAtomically writes an explicitly cleaned PDF artifact.
Parameters
- inputPath System.String
- outputPath System.String
- selection OfficeIMO.ContentSafety.OfficeContentCleanupSelection
- options OfficeIMO.ContentSafety.OfficeContentCleanupOptions? = null
- readOptions OfficeIMO.Pdf.PdfLoadOptions? = null
public PdfDocument ReplaceMetadata(PdfMetadata metadata) #PdfDocumentCreates a new PDF with exactly the supplied metadata.
Parameters
- metadata OfficeIMO.Pdf.PdfMetadata
public PdfOperationResult<PdfDocument> ReplaceMetadataResult(PdfMetadata metadata, PdfLoadOptions? options = null) #PdfOperationResult<PdfDocument>Attempts to create a new PDF with exactly the supplied metadata, returning diagnostics when blocked or failed.
Parameters
- metadata OfficeIMO.Pdf.PdfMetadata
- options OfficeIMO.Pdf.PdfLoadOptions? = null
public PdfSanitizationResult Sanitize(PdfSanitizationOptions? options = null) #PdfSanitizationResultRemoves or quarantines active content and embedded payloads through a proven full rewrite.
Parameters
- options OfficeIMO.Pdf.PdfSanitizationOptions? = null
public PdfSaveResult Save(Stream stream) #PdfSaveResultWrites the complete document to stream. Seekable streams are overwritten and rewound.
Parameters
- stream System.IO.Stream
- Writable destination stream.
public PdfSaveResult Save(Stream stream, CancellationToken cancellationToken) #PdfSaveResultWrites the PDF while observing cancellation.
Parameters
- stream System.IO.Stream
- cancellationToken System.Threading.CancellationToken
public PdfSaveResult Save(String path) #PdfSaveResultSaves the document to path. Creates the directory if needed.
Parameters
- path System.String
- Destination file path, e.g. "C:\\Docs\\Report.pdf".
public PdfSaveResult Save(String path, CancellationToken cancellationToken) #PdfSaveResultWrites the PDF while observing cancellation.
Parameters
- path System.String
- cancellationToken System.Threading.CancellationToken
public async Task<PdfSaveResult> SaveAsync(Stream stream, CancellationToken cancellationToken = default) #Task<PdfSaveResult>Asynchronously writes the complete document to stream. Seekable streams are overwritten and rewound.
Parameters
- stream System.IO.Stream
- cancellationToken System.Threading.CancellationToken = default
public Task<PdfSaveResult> SaveAsync(String path, CancellationToken cancellationToken = default) #Task<PdfSaveResult>Asynchronously saves the document to path.
Parameters
- path System.String
- cancellationToken System.Threading.CancellationToken = default
public async Task<PdfSaveResult> SaveAsync(String path, OfficeConversionFileConflictPolicy conflictPolicy, CancellationToken cancellationToken) #Task<PdfSaveResult>Asynchronously saves the document to path using the requested destination conflict policy.
Parameters
- path System.String
- conflictPolicy OfficeIMO.OfficeConversionFileConflictPolicy
- cancellationToken System.Threading.CancellationToken
public PdfSaveResult SaveResult(Stream stream) #PdfSaveResultAttempts to write the document to stream and returns output diagnostics instead of throwing.
Parameters
- stream System.IO.Stream
public PdfSaveResult SaveResult(Stream stream, CancellationToken cancellationToken) #PdfSaveResultWrites the PDF while observing cancellation.
Parameters
- stream System.IO.Stream
- cancellationToken System.Threading.CancellationToken
public PdfSaveResult SaveResult(String path) #PdfSaveResultAttempts to save the document to path and returns output diagnostics instead of throwing.
Parameters
- path System.String
public PdfSaveResult SaveResult(String path, CancellationToken cancellationToken) #PdfSaveResultWrites the PDF while observing cancellation.
Parameters
- path System.String
- cancellationToken System.Threading.CancellationToken
public async Task<PdfSaveResult> SaveResultAsync(Stream stream, CancellationToken cancellationToken = default) #Task<PdfSaveResult>Attempts to asynchronously write the document to stream and returns output diagnostics instead of throwing.
Parameters
- stream System.IO.Stream
- cancellationToken System.Threading.CancellationToken = default
public async Task<PdfSaveResult> SaveResultAsync(String path, CancellationToken cancellationToken = default) #Task<PdfSaveResult>Attempts to asynchronously save the document to path and returns output diagnostics instead of throwing.
Parameters
- path System.String
- cancellationToken System.Threading.CancellationToken = default
public PdfDocument SynchronizeMetadata(String? title = null, String? author = null, String? subject = null, String? keywords = null, Boolean createXmpMetadata = true) #PdfDocumentCreates a normalized full-rewrite PDF whose Info dictionary and XMP packet share the supplied common fields. Null values preserve existing values and empty strings clear them.
Parameters
- title System.String? = null
- author System.String? = null
- subject System.String? = null
- keywords System.String? = null
- createXmpMetadata System.Boolean = true
public PdfOperationResult<PdfDocument> SynchronizeMetadataResult(String? title = null, String? author = null, String? subject = null, String? keywords = null, Boolean createXmpMetadata = true, PdfLoadOptions? options = null) #PdfOperationResult<PdfDocument>Attempts an Info/XMP synchronization through the planner-selected full-rewrite or append-only path.
Parameters
- title System.String? = null
- author System.String? = null
- subject System.String? = null
- keywords System.String? = null
- createXmpMetadata System.Boolean = true
- options OfficeIMO.Pdf.PdfLoadOptions? = null
public PdfBytesResult ToBytesResult() #PdfBytesResultAttempts to render the document into a PDF byte array and returns diagnostics instead of throwing.
public PdfBytesResult ToBytesResult(CancellationToken cancellationToken) #PdfBytesResultRenders the PDF while observing cancellation.
Parameters
- cancellationToken System.Threading.CancellationToken
public MemoryStream ToStream() #MemoryStreamRenders the document into a new writable memory stream positioned at the beginning.
public static Boolean TryPrepareImageBytes(Byte[] data, out Byte[] preparedBytes, out OfficeImageInfo? imageInfo, out Boolean wasTranscoded, out String? unsupportedReason) #BooleanPrepares source image bytes for first-party PDF embedding. Writer-safe JPEG and PNG data is retained; supported SVG and other raster formats supported by OfficeRasterImageDecoder are normalized to PNG.
Parameters
- data System.Byte[]
- preparedBytes System.Byte[]
- imageInfo OfficeIMO.Drawing.OfficeImageInfo?
- wasTranscoded System.Boolean
- unsupportedReason System.String?
public static Boolean TryValidateImageBytes(Byte[] data, out OfficeImageInfo? imageInfo, out String? unsupportedReason) #BooleanChecks whether image bytes can be embedded by the first-party PDF writer.
Parameters
- data System.Byte[]
- imageInfo OfficeIMO.Drawing.OfficeImageInfo?
- unsupportedReason System.String?
public PdfDocument UpdateMetadata(String? title = null, String? author = null, String? subject = null, String? keywords = null) #PdfDocumentCreates a new PDF with updated metadata. Null values preserve existing fields; empty strings clear fields.
Parameters
- title System.String? = null
- author System.String? = null
- subject System.String? = null
- keywords System.String? = null
public PdfOperationResult<PdfDocument> UpdateMetadataResult(String? title = null, String? author = null, String? subject = null, String? keywords = null, PdfLoadOptions? options = null) #PdfOperationResult<PdfDocument>Attempts to create a new PDF with updated metadata, returning diagnostics when blocked or failed.
Parameters
- title System.String? = null
- author System.String? = null
- subject System.String? = null
- keywords System.String? = null
- options OfficeIMO.Pdf.PdfLoadOptions? = null
Inherited Methods
public virtual Boolean Equals(Object? obj) #BooleanParameters
- obj Object?
Properties
public PdfContentBuilder Content { get; } #Gets the content builder for ordinary incremental authoring. It uses the same document flow as PdfDocument.Compose and cannot add generated content to a loaded PDF.
public PdfDocumentPages Pages { get; } #Page editing and extraction operations for this PDF.
public PdfDocumentRenderer Render { get; } #Managed page rendering, drawing projection, and renderer diagnostics.
public PdfDocumentResources Resources { get; } #Bounded font and raw object-resource inspection.
public PdfDocumentTextEditor Text { get; } #Existing-page text search and editing operations.
public PdfDocumentImageEditor Images { get; } #Existing-page image placement discovery and editing operations.
public PdfDocumentAttachments Attachments { get; } #Existing-document embedded and associated file editing operations.
public PdfDocumentBookmarks Bookmarks { get; } #Existing-document bookmark editing operations.
public PdfDocumentAnnotations Annotations { get; } #Existing-document annotation editing operations.
public PdfDocumentJavaScript JavaScript { get; } #Explicit active-content operations for named document-level JavaScript.
public PdfDocumentSecurity Security { get; } #Password encryption and digital-signature operations for this PDF.
public PdfDocumentRedactions Redactions { get; } #Search, planning, application, and verification operations for permanent redaction.
public PdfDocumentOptimization Optimization { get; } #Lossless optimization analysis and rewrite operations for this PDF.
public PdfDocumentProof Proof { get; } #Visual and structural preservation proof operations for this PDF.
public PdfPipelineReport Pipeline { get; } #Immutable create/open and mutation history accumulated by this document. Save and byte-generation results append their own exact output stage.
public PdfDocumentStamper Stamp { get; } #Text and image stamping operations for this PDF.
public PdfDocumentForms Forms { get; } #Simple AcroForm operations for this PDF.
Extension Methods
public static IReadOnlyList<OfficeImageExportResult> ExportImages(PdfDocument document, OfficeImageExportFormat format, PdfImageExportOptions? options = null, PdfPageSelection? selection = null, CancellationToken cancellationToken = default) #IReadOnlyList<OfficeImageExportResult>Exports pages from an authored or opened PDF document using the shared five-format result contract.
Parameters
- document OfficeIMO.Pdf.PdfDocument
- format OfficeIMO.Drawing.OfficeImageExportFormat
- options OfficeIMO.Pdf.PdfImageExportOptions? = null
- selection OfficeIMO.Pdf.PdfPageSelection? = null
- cancellationToken System.Threading.CancellationToken = default
public static PdfDocumentImageExportBuilder ToImages(PdfDocument document) #PdfDocumentImageExportBuilderStarts fluent image export for all pages in an authored or opened PDF document. The read snapshot is captured on first export so a pre-canceled operation does not materialize the document.
Parameters
- document OfficeIMO.Pdf.PdfDocument
public static PdfDocumentImageExportBuilder ToImages(PdfDocument document, PdfImageExportOptions options) #PdfDocumentImageExportBuilderStarts fluent image export for an authored or opened PDF document using a cloned options snapshot. The read snapshot is captured on first export.
Parameters
- document OfficeIMO.Pdf.PdfDocument
- options OfficeIMO.Pdf.PdfImageExportOptions