API Reference
PdfDocument
Root PDF lifecycle and capability container. Author content through PdfOptions) or PdfCompose>); use the focused capability properties for reading and existing-document operations.
Inheritance
- Object
- PdfDocument
Usage
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by
- Method PdfAcroFormEditResult.ToDocument
- Method PdfAnnotationEditResult.ToDocument
- Method PdfAttachmentEditResult.ToDocument
- Method PdfBatesDocumentResult.ToDocument
- Method PdfBookmarkEditResult.ToDocument
- Method PdfDestructiveCropResult.ToDocument
- Method PdfDocument.AppendMetadataRevision
- Method PdfDocument.Compose
- Method PdfDocument.Create
- Method PdfDocument.CreateFromImages
- Method PdfDocument.CreateFromImages
- Method PdfDocument.CreateFromImages
- Method PdfDocument.CreateFromImages
- Method PdfDocument.FlattenVisualAnnotations
- Method PdfDocument.Load
- Method PdfDocument.Load
- Method PdfDocument.Load
- Method PdfDocument.LoadAsync
- Method PdfDocument.LoadAsync
- Method PdfDocument.Merge
- Method PdfDocument.Merge
- Method PdfDocument.Merge
- Method PdfDocument.MergeWith
- Method PdfDocument.MergeWith
- Method PdfDocument.MergeWith
- Method PdfDocument.MergeWith
- Method PdfDocument.MergeWith
- Method PdfDocument.Meta
- Method PdfDocument.ReplaceMetadata
- Method PdfDocument.SynchronizeMetadata
- Method PdfDocument.TryAppendMetadataRevision
- Method PdfDocument.TryFlattenVisualAnnotations
- Method PdfDocument.TryMergeWith
- Method PdfDocument.TryMergeWith
- Method PdfDocument.TryMergeWith
- Method PdfDocument.TryMergeWith
- Method PdfDocument.TryReplaceMetadata
- Method PdfDocument.TrySynchronizeMetadata
- Method PdfDocument.TryUpdateMetadata
- Method PdfDocument.UpdateMetadata
- Method PdfDocumentConversionResult.RequireNoLoss
- Method PdfDocumentConversionResult.RequireValue
- Property PdfDocumentConversionResult.Value
- Extension method PdfDocumentForms.TryFill
- Extension method PdfDocumentForms.TryFill
- Extension method PdfDocumentForms.TryFillAndFlatten
- Extension method PdfDocumentForms.TryFillAndFlatten
- Extension method PdfDocumentForms.TryFlatten
- Method PdfDocumentForms.AppendRevision
- Method PdfDocumentForms.AppendRevision
- Method PdfDocumentForms.AppendRevision
- Method PdfDocumentForms.AppendRevision
- Method PdfDocumentForms.Fill
- Method PdfDocumentForms.Fill
- Method PdfDocumentForms.Fill
- Method PdfDocumentForms.Fill
- Method PdfDocumentForms.FillAndFlatten
- Method PdfDocumentForms.FillAndFlatten
- Method PdfDocumentForms.FillAndFlatten
- Method PdfDocumentForms.FillAndFlatten
- Method PdfDocumentForms.Flatten
- Method PdfDocumentForms.Flatten
- Method PdfDocumentForms.Flatten
- Method PdfDocumentForms.Flatten
- Method PdfDocumentForms.ImportData
- Method PdfDocumentForms.ImportXfdf
- Method PdfDocumentForms.TryAppendRevision
- Method PdfDocumentForms.TryAppendRevision
- Method PdfDocumentForms.TryAppendRevision
- Method PdfDocumentForms.TryAppendRevision
- Method PdfDocumentForms.TryFill
- Method PdfDocumentForms.TryFill
- Method PdfDocumentForms.TryFill
- Method PdfDocumentForms.TryFill
- Method PdfDocumentForms.TryFillAndFlatten
- Method PdfDocumentForms.TryFillAndFlatten
- Method PdfDocumentForms.TryFillAndFlatten
- Method PdfDocumentForms.TryFillAndFlatten
- Method PdfDocumentForms.TryFlatten
- Method PdfDocumentForms.TryFlatten
- Method PdfDocumentFormsCompatibilityExtensions.TryFill
- Method PdfDocumentFormsCompatibilityExtensions.TryFill
- Method PdfDocumentFormsCompatibilityExtensions.TryFillAndFlatten
- Method PdfDocumentFormsCompatibilityExtensions.TryFillAndFlatten
- Method PdfDocumentFormsCompatibilityExtensions.TryFlatten
- Method PdfDocumentPages.Append
- Method PdfDocumentPages.Append
- Method PdfDocumentPages.Append
- Method PdfDocumentPages.Append
- Method PdfDocumentPages.Append
- Method PdfDocumentPages.Append
- Method PdfDocumentPages.Append
- Method PdfDocumentPages.Append
- Method PdfDocumentPages.CropAndTranslate
- Method PdfDocumentPages.Delete
- Method PdfDocumentPages.Delete
- Method PdfDocumentPages.Delete
- Method PdfDocumentPages.Delete
- Method PdfDocumentPages.Delete
- Method PdfDocumentPages.Duplicate
- Method PdfDocumentPages.Duplicate
- Method PdfDocumentPages.Duplicate
- Method PdfDocumentPages.Duplicate
- Method PdfDocumentPages.Duplicate
- Method PdfDocumentPages.Extract
- Method PdfDocumentPages.Extract
- Method PdfDocumentPages.Extract
- Method PdfDocumentPages.Extract
- Method PdfDocumentPages.Extract
- Method PdfDocumentPages.Insert
- Method PdfDocumentPages.Insert
- Method PdfDocumentPages.Insert
- Method PdfDocumentPages.Insert
- Method PdfDocumentPages.Insert
- Method PdfDocumentPages.Insert
- Method PdfDocumentPages.Insert
- Method PdfDocumentPages.Insert
- Method PdfDocumentPages.Move
- Method PdfDocumentPages.Move
- Method PdfDocumentPages.Move
- Method PdfDocumentPages.Move
- Method PdfDocumentPages.Move
- Method PdfDocumentPages.Prepend
- Method PdfDocumentPages.Prepend
- Method PdfDocumentPages.Prepend
- Method PdfDocumentPages.Prepend
- Method PdfDocumentPages.Prepend
- Method PdfDocumentPages.Prepend
- Method PdfDocumentPages.Prepend
- Method PdfDocumentPages.Prepend
- Method PdfDocumentPages.Reorder
- Method PdfDocumentPages.Reorder
- Method PdfDocumentPages.Reorder
- Method PdfDocumentPages.Reorder
- Method PdfDocumentPages.Resize
- Method PdfDocumentPages.Resize
- Method PdfDocumentPages.Rotate
- Method PdfDocumentPages.Rotate
- Method PdfDocumentPages.Rotate
- Method PdfDocumentPages.Rotate
- Method PdfDocumentPages.Rotate
- Method PdfDocumentPages.SetArtBox
- Method PdfDocumentPages.SetBleedBox
- Method PdfDocumentPages.SetCropBox
- Method PdfDocumentPages.SetMediaBox
- Method PdfDocumentPages.SetPageBox
- Method PdfDocumentPages.SetTrimBox
- Method PdfDocumentPages.Split
- Method PdfDocumentPages.Split
- Method PdfDocumentPages.Split
- Method PdfDocumentPages.Split
- Method PdfDocumentPages.Split
- Method PdfDocumentPages.SplitByBookmarks
- Method PdfDocumentPages.TryAppend
- Method PdfDocumentPages.TryAppend
- Method PdfDocumentPages.TryAppend
- Method PdfDocumentPages.TryAppend
- Method PdfDocumentPages.TryAppend
- Method PdfDocumentPages.TryAppend
- Method PdfDocumentPages.TryAppend
- Method PdfDocumentPages.TryAppend
- Method PdfDocumentPages.TryDelete
- Method PdfDocumentPages.TryDelete
- Method PdfDocumentPages.TryDelete
- Method PdfDocumentPages.TryDuplicate
- Method PdfDocumentPages.TryDuplicate
- Method PdfDocumentPages.TryDuplicate
- Method PdfDocumentPages.TryExtract
- Method PdfDocumentPages.TryExtract
- Method PdfDocumentPages.TryExtract
- Method PdfDocumentPages.TryInsert
- Method PdfDocumentPages.TryInsert
- Method PdfDocumentPages.TryInsert
- Method PdfDocumentPages.TryInsert
- Method PdfDocumentPages.TryInsert
- Method PdfDocumentPages.TryInsert
- Method PdfDocumentPages.TryInsert
- Method PdfDocumentPages.TryInsert
- Method PdfDocumentPages.TryMove
- Method PdfDocumentPages.TryMove
- Method PdfDocumentPages.TryMove
- Method PdfDocumentPages.TryPrepend
- Method PdfDocumentPages.TryPrepend
- Method PdfDocumentPages.TryPrepend
- Method PdfDocumentPages.TryPrepend
- Method PdfDocumentPages.TryPrepend
- Method PdfDocumentPages.TryPrepend
- Method PdfDocumentPages.TryPrepend
- Method PdfDocumentPages.TryPrepend
- Method PdfDocumentPages.TryReorder
- Method PdfDocumentPages.TryReorder
- Method PdfDocumentPages.TryReorder
- Method PdfDocumentPages.TryRotate
- Method PdfDocumentPages.TryRotate
- Method PdfDocumentPages.TryRotate
- Method PdfDocumentPages.TrySplit
- Method PdfDocumentPages.TrySplit
- Method PdfDocumentPages.TrySplit
- Method PdfDocumentPages.TrySplit
- Method PdfDocumentPages.TrySplit
- Method PdfDocumentPages.TrySplitByBookmarks
- Method PdfDocumentRedactions.AddAnnotation
- Method PdfDocumentRedactions.Apply
- Method PdfDocumentRedactions.Apply
- Method PdfDocumentRedactions.TryApply
- Method PdfDocumentSecurity.CompleteExternalSignature
- Method PdfDocumentStamper.Content
- Method PdfDocumentStamper.Content
- Method PdfDocumentStamper.Image
- Method PdfDocumentStamper.Image
- Method PdfDocumentStamper.Image
- Method PdfDocumentStamper.Image
- Method PdfDocumentStamper.ImageWatermark
- Method PdfDocumentStamper.ImageWatermark
- Method PdfDocumentStamper.ImageWatermark
- Method PdfDocumentStamper.ImageWatermark
- Method PdfDocumentStamper.OverlayPage
- Method PdfDocumentStamper.OverlayPage
- Method PdfDocumentStamper.OverlayPage
- Method PdfDocumentStamper.OverlayPage
- Method PdfDocumentStamper.OverlayPage
- Method PdfDocumentStamper.OverlayPage
- Method PdfDocumentStamper.Text
- Method PdfDocumentStamper.Text
- Method PdfDocumentStamper.TextWatermark
- Method PdfDocumentStamper.TextWatermark
- Method PdfDocumentStamper.TryContent
- Method PdfDocumentStamper.TryImage
- Method PdfDocumentStamper.TryImage
- Method PdfDocumentStamper.TryImageWatermark
- Method PdfDocumentStamper.TryImageWatermark
- Method PdfDocumentStamper.TryOverlayPage
- Method PdfDocumentStamper.TryOverlayPage
- Method PdfDocumentStamper.TryOverlayPage
- Method PdfDocumentStamper.TryText
- Method PdfDocumentStamper.TryTextWatermark
- Method PdfDocumentStamper.TryUnderlayPage
- Method PdfDocumentStamper.TryUnderlayPage
- Method PdfDocumentStamper.TryUnderlayPage
- Method PdfDocumentStamper.UnderlayPage
- Method PdfDocumentStamper.UnderlayPage
- Method PdfDocumentStamper.UnderlayPage
- Method PdfDocumentStamper.UnderlayPage
- Method PdfDocumentStamper.UnderlayPage
- Method PdfDocumentStamper.UnderlayPage
- Method PdfExternalSignatureCompletion.ToDocument
- Method PdfExternalSignaturePreparation.Complete
- Property PdfImageEditResult.Document
- Method PdfInteractiveContentFlattenResult.ToDocument
- Method PdfInterleaveResult.ToDocument
- Method PdfJavaScriptEditResult.ToDocument
- Method PdfMergeResult.ToDocument
- Method PdfOptimizationActionResult.ToDocument
- Method PdfProductionSplitPart.ToDocument
- Method PdfRedactionApplyResult.ToDocument
- Method PdfRepairArtifactResult.ToDocument
- Method PdfSanitizationResult.ToDocument
- Method PdfSecurityMutationResult.ToDocument
- Property PdfTextEditResult.Document
- Method PdfUnsignedDerivativeResult.ToDocument
Accepted by parameters
- Extension method PdfDocument.ExportImages
- Extension method PdfDocument.ToImages
- Extension method PdfDocument.ToImages
- Method PdfDocument.Merge
- Method PdfDocument.Merge
- Method PdfDocument.Merge
- Method PdfDocument.MergeWith
- Method PdfDocument.MergeWith
- Method PdfDocument.MergeWithReport
- Method PdfDocument.MergeWithReport
- Method PdfDocument.TryMergeWith
- Constructor PdfDocumentConversionResult.PdfDocumentConversionResult
- Method PdfDocumentConversionResult.Process
- Method PdfDocumentConversionResult.WithValue
- Method PdfDocumentPages.Append
- Method PdfDocumentPages.Append
- Method PdfDocumentPages.Insert
- Method PdfDocumentPages.Insert
- Method PdfDocumentPages.Prepend
- Method PdfDocumentPages.Prepend
- Method PdfDocumentPages.TryAppend
- Method PdfDocumentPages.TryAppend
- Method PdfDocumentPages.TryInsert
- Method PdfDocumentPages.TryInsert
- Method PdfDocumentPages.TryPrepend
- Method PdfDocumentPages.TryPrepend
- Method PdfDocumentProof.AssertRewritePreservationMatrix
- Method PdfDocumentProof.AssertRewritePreservationMatrix
- Method PdfDocumentProof.AssertRewritePreservationMatrix
- Method PdfDocumentProof.AssertRewritePreserved
- Method PdfDocumentProof.AssessRewritePreservation
- Method PdfDocumentProof.AssessRewritePreservationMatrix
- Method PdfDocumentProof.AssessRewritePreservationMatrix
- Method PdfDocumentProof.AssessRewritePreservationMatrix
- Method PdfDocumentProof.CompareVisual
- Method PdfImageExportExtensions.ExportImages
- Method PdfImageExportExtensions.ToImages
- Method PdfImageExportExtensions.ToImages
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 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 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 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 PdfRenderCompatibilityReport AssessRenderCompatibility(PdfLoadOptions options = null) #PdfRenderCompatibilityReportAssesses managed page-render fidelity without rasterizing or writing image artifacts.
Parameters
- options OfficeIMO.Pdf.PdfLoadOptions = null
public PdfDocument Compose(Action<PdfCompose> 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.PdfCompose}
public static PdfDocument Create(Action<PdfCompose> compose, PdfOptions options = null) #PdfDocumentCreates and composes a PDF document through the canonical authoring DSL.
Parameters
- compose System.Action{OfficeIMO.Pdf.PdfCompose}
- 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 PdfExternalValidationResult>) 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 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
- arg1 System.String
- arg2 OfficeIMO.ContentSafety.OfficeContentSafetyOptions = null
- arg3 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
- arg1 System.Byte[]
- arg2 OfficeIMO.ContentSafety.OfficeContentSafetyOptions = null
- arg3 OfficeIMO.Pdf.PdfLoadOptions = null
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 async Task<PdfDocument> LoadAsync(String path, PdfLoadOptions loadOptions = null, CancellationToken cancellationToken = null) #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 = null
public static async Task<PdfDocument> LoadAsync(Stream stream, PdfLoadOptions loadOptions = null, CancellationToken cancellationToken = null) #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 = null
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 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.
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 static PdfMergeResult MergeWithReport(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 MergeWithReport(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 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 PdfDocumentReadResult Read(PdfReadOptions options = null, CancellationToken cancellationToken = null) #PdfDocumentReadResultBuilds the canonical semantic document result using the structured profile by default.
Parameters
- options OfficeIMO.Pdf.PdfReadOptions = null
- cancellationToken System.Threading.CancellationToken = null
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 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(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 async Task<PdfSaveResult> SaveAsync(Stream stream, CancellationToken cancellationToken = null) #Task<PdfSaveResult>Asynchronously writes the complete document to stream. Seekable streams are overwritten and rewound.
Parameters
- stream System.IO.Stream
- cancellationToken System.Threading.CancellationToken = null
public Task<PdfSaveResult> SaveAsync(String path, CancellationToken cancellationToken = null) #Task<PdfSaveResult>Asynchronously saves the document to path.
Parameters
- path System.String
- cancellationToken System.Threading.CancellationToken = null
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 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 MemoryStream ToStream() #MemoryStreamRenders the document into a new writable memory stream positioned at the beginning.
public PdfOperationResult<PdfDocument> TryAppendMetadataRevision(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 PdfOperationResult<PdfDocument> TryFlattenVisualAnnotations(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 PdfOperationResult<PdfDocument> TryMergeWith(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> TryMergeWith(Byte[] pdf, PdfLoadOptions options = null) #PdfOperationResult<PdfDocument>Attempts to merge this PDF with another PDF byte payload, returning diagnostics when blocked or failed.
Parameters
- pdf System.Byte[]
- options OfficeIMO.Pdf.PdfLoadOptions = null
public PdfOperationResult<PdfDocument> TryMergeWith(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> TryMergeWith(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 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; 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 PdfOperationResult<PdfDocument> TryReplaceMetadata(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 PdfSaveResult TrySave(Stream stream) #PdfSaveResultAttempts to write the document to stream and returns output diagnostics instead of throwing.
Parameters
- stream System.IO.Stream
public PdfSaveResult TrySave(String path) #PdfSaveResultAttempts to save the document to path and returns output diagnostics instead of throwing.
Parameters
- path System.String
public async Task<PdfSaveResult> TrySaveAsync(Stream stream, CancellationToken cancellationToken = null) #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 = null
public async Task<PdfSaveResult> TrySaveAsync(String path, CancellationToken cancellationToken = null) #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 = null
public PdfOperationResult<PdfDocument> TrySynchronizeMetadata(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 TryToBytes() #PdfBytesResultAttempts to render the document into a PDF byte array and returns diagnostics instead of throwing.
public PdfOperationResult<PdfDocument> TryUpdateMetadata(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
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
Inherited Methods
public override Boolean Equals(Object obj) #BooleanParameters
- obj Object
Properties
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 = null) #IReadOnlyList<OfficeImageExportResult>Exports pages from an authored or opened PDF document using the shared five-format result contract.
Parameters
- arg1 OfficeIMO.Pdf.PdfDocument
- arg2 OfficeIMO.Drawing.OfficeImageExportFormat
- arg3 OfficeIMO.Pdf.PdfImageExportOptions = null
- arg4 OfficeIMO.Pdf.PdfPageSelection = null
- arg5 System.Threading.CancellationToken = null
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