PdfDocument
OfficeIMO.Pdf
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 107 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 83
- Method PdfAConversionResult.RequireValue
- Property PdfAConversionResult.Value
- 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.FlattenVisualAnnotations
- Method PdfDocument.Load
- Method PdfDocument.LoadAsync
- Method PdfDocument.Merge
- Method PdfDocument.MergeWith
- Method PdfDocument.Meta
- Method PdfDocument.ReplaceProperties
- Method PdfDocument.SynchronizeMetadata
- Method PdfDocument.UpdateProperties
- Method PdfDocumentConversionResult.RequireValue
- Property PdfDocumentConversionResult.Value
- Method PdfDocumentForms.AppendRevision
- Method PdfDocumentForms.Fill
- Method PdfDocumentForms.FillAndFlatten
- Method PdfDocumentForms.Flatten
- Method PdfDocumentForms.ImportData
- Method PdfDocumentForms.ImportXfdf
- Method PdfDocumentPages.Append
- Method PdfDocumentPages.ApplyAttributes
- Method PdfDocumentPages.CropAndTranslate
- Method PdfDocumentPages.Delete
- Method PdfDocumentPages.Duplicate
- Method PdfDocumentPages.Extract
- Method PdfDocumentPages.Insert
- Method PdfDocumentPages.Move
- Method PdfDocumentPages.NormalizeRotation
- Method PdfDocumentPages.Prepend
- Method PdfDocumentPages.Reorder
- Method PdfDocumentPages.Resize
- Method PdfDocumentPages.Rotate
- Method PdfDocumentPages.RotateBy
- Method PdfDocumentPages.SetArtBox
- Method PdfDocumentPages.SetBleedBox
- Method PdfDocumentPages.SetCropBox
- Method PdfDocumentPages.SetMediaBox
- Method PdfDocumentPages.SetPageBox
- Method PdfDocumentPages.SetTrimBox
- Method PdfDocumentPages.Split
- Method PdfDocumentPages.SplitByBookmarks
- Method PdfDocumentRedactions.AddAnnotation
- Method PdfDocumentRedactions.Apply
- Method PdfDocumentSecurity.CompleteExternalSignature
- Method PdfDocumentStamper.Content
- Method PdfDocumentStamper.Image
- Method PdfDocumentStamper.ImageWatermark
- Method PdfDocumentStamper.OverlayPage
- Method PdfDocumentStamper.Text
- Method PdfDocumentStamper.TextWatermark
- Method PdfDocumentStamper.UnderlayPage
- Method PdfDocumentStamper.Watermark
- Method PdfExternalSignatureCompletion.ToDocument
- Method PdfExternalSignaturePreparation.Complete
- Method PdfImageConverterExtensions.ToPdf
- Method PdfImageConverterExtensions.ToPdfAsync
- 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 24
- Extension method PdfDocument.SaveAsImages
- Extension method PdfDocument.SaveAsImagesAsync
- Extension method PdfDocument.ToImages
- Extension method PdfDocument.ToImagesAsync
- Method PdfDocument.Merge
- Method PdfDocument.MergeWith
- Constructor PdfDocumentConversionResult.PdfDocumentConversionResult
- Method PdfDocumentConversionResult.Process
- Method PdfDocumentConversionResult.WithValue
- Method PdfDocumentPages.Append
- Method PdfDocumentPages.Insert
- Method PdfDocumentPages.Prepend
- 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.SaveAsImages
- Method PdfImageExportExtensions.SaveAsImagesAsync
- Method PdfImageExportExtensions.ToImages
- Method PdfImageExportExtensions.ToImagesAsync
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 PdfTable AddDeferredTable(Func<IEnumerable<string[]>> rowFactory, int batchSize = 256, OfficeAlignment align = Left, PdfTableStyle? style = null) #Adds a replayable plain-text table whose rows are enumerated and laid out in bounded batches.
Parameters
- rowFactory System.Func<System.Collections.Generic.IEnumerable<string[]>>
- Factory that returns a fresh sequence of table rows for each render pass.
- batchSize int = 256
- Maximum number of body rows materialized for one layout batch.
- align OfficeIMO.OfficeAlignment = Left
- Table alignment in the document flow.
- style OfficeIMO.Pdf.PdfTableStyle? = null
- Optional table style.
Returns
PdfTablepublic PdfTable AddDeferredTable(Func<IEnumerable<PdfTableCell[]>> rowFactory, int batchSize = 256, OfficeAlignment align = Left, PdfTableStyle? style = null) #Adds a replayable rich-cell table whose rows are enumerated and laid out in bounded batches.
Parameters
- rowFactory System.Func<System.Collections.Generic.IEnumerable<OfficeIMO.Pdf.PdfTableCell[]>>
- Factory that returns a fresh sequence of rich table rows for each render pass.
- batchSize int = 256
- Maximum number of body rows materialized for one layout batch.
- align OfficeIMO.OfficeAlignment = Left
- Table alignment in the document flow.
- style OfficeIMO.Pdf.PdfTableStyle? = null
- Optional table style.
Returns
PdfTablepublic PdfHeading AddHeading(string text, int level = 1, OfficeAlignment align = Left, OfficeColor? color = null, string? linkUri = null, PdfHeadingStyle? style = null, string? linkContents = null, string? linkDestinationName = null) #Appends a heading at an authored level from 1 through 9 and adds it to the outline.
Parameters
- text string
- level int = 1
- align OfficeIMO.OfficeAlignment = Left
- color OfficeIMO.OfficeColor? = null
- linkUri string? = null
- style OfficeIMO.Pdf.PdfHeadingStyle? = null
- linkContents string? = null
- linkDestinationName string? = null
Returns
PdfHeadingpublic PdfImage AddImage(byte[] imageBytes, OfficeLength width, OfficeLength height, string? altText) #Appends a meaningful image from supported image bytes with alternative text.
Parameters
- imageBytes byte[]
- width OfficeIMO.OfficeLength
- height OfficeIMO.OfficeLength
- altText string?
Returns
PdfImagepublic PdfImage AddImage(byte[] imageBytes, OfficeLength width, OfficeLength height, OfficeAlignment? align = null, OfficeClipPath? clipPath = null, OfficeImageFit? fit = null, OfficeLength? spacingBefore = null, OfficeLength? spacingAfter = null, PdfImageStyle? style = null, string? linkUri = null, string? linkContents = null, string? altText = null) #Appends a raster image supported by OfficeIMO.Drawing at the current flow position.
Parameters
- imageBytes byte[]
- Supported image bytes.
- width OfficeIMO.OfficeLength
- Image frame width.
- height OfficeIMO.OfficeLength
- Image frame height.
- align OfficeIMO.OfficeAlignment? = null
- Image alignment inside the content width.
- clipPath OfficeIMO.Drawing.OfficeClipPath? = null
- Optional local clipping path applied before drawing the image.
- fit OfficeIMO.Drawing.OfficeImageFit? = null
- Image fitting mode inside the frame.
- spacingBefore OfficeIMO.OfficeLength? = null
- Top spacing, inherited from the current default image style when omitted.
- spacingAfter OfficeIMO.OfficeLength? = null
- Bottom spacing, inherited from the current default image style when omitted.
- style OfficeIMO.Pdf.PdfImageStyle? = null
- Optional reusable image placement style.
- linkUri string? = null
- Optional absolute URI or catalog-base-relative URI for an image link annotation.
- linkContents string? = null
- Optional link annotation contents metadata.
- altText string? = null
- Optional alternative text for a meaningful image.
Returns
PdfImagepublic PdfTable AddKeyValueTable(IEnumerable<KeyValuePair<string, string?>> rows, OfficeAlignment align = Left, PdfTableStyle? style = null, bool includeHeader = false, string keyHeader = "Key", string valueHeader = "Value") #Adds a two-column label/value table for document metadata, invoice facts, definition lists, and similar report sections.
Parameters
- rows System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string, string?>>
- Plain text label/value rows.
- align OfficeIMO.OfficeAlignment = Left
- Table alignment in the document flow.
- style OfficeIMO.Pdf.PdfTableStyle? = null
- Optional table style. The style is cloned before header-row settings are applied.
- includeHeader bool = false
- When true, emits a header row before the supplied values.
- keyHeader string = "Key"
- Header text for the label column.
- valueHeader string = "Value"
- Header text for the value column.
Returns
PdfTablepublic PdfTable AddKeyValueTable(IEnumerable<PdfKeyValueRow> rows, OfficeAlignment align = Left, PdfTableStyle? style = null, bool includeHeader = false, string keyHeader = "Key", string valueHeader = "Value") #Adds a two-column rich label/value table for document metadata, invoice facts, definition lists, and similar report sections.
Parameters
- rows System.Collections.Generic.IEnumerable<OfficeIMO.Pdf.PdfKeyValueRow>
- Rich text label/value rows.
- align OfficeIMO.OfficeAlignment = Left
- Table alignment in the document flow.
- style OfficeIMO.Pdf.PdfTableStyle? = null
- Optional table style. The style is cloned before header-row settings are applied.
- includeHeader bool = false
- When true, emits a header row before the supplied values.
- keyHeader string = "Key"
- Header text for the label column.
- valueHeader string = "Value"
- Header text for the value column.
Returns
PdfTablepublic PdfList AddList(IEnumerable<string> items, OfficeAlignment align = Left, OfficeColor? color = null, PdfListStyle? style = null) #Appends a bulleted list of plain items.
Parameters
- items System.Collections.Generic.IEnumerable<string>
- align OfficeIMO.OfficeAlignment = Left
- color OfficeIMO.OfficeColor? = null
- style OfficeIMO.Pdf.PdfListStyle? = null
Returns
PdfListpublic PdfList AddList(IEnumerable<PdfListItem> items, OfficeAlignment align = Left, OfficeColor? color = null, PdfListStyle? style = null) #Appends a bulleted list whose items can contain rich inline text runs.
Parameters
- items System.Collections.Generic.IEnumerable<OfficeIMO.Pdf.PdfListItem>
- align OfficeIMO.OfficeAlignment = Left
- color OfficeIMO.OfficeColor? = null
- style OfficeIMO.Pdf.PdfListStyle? = null
Returns
PdfListpublic PdfList AddNumberedList(IEnumerable<string> items, OfficeAlignment align = Left, OfficeColor? color = null, int startNumber = 1, PdfListStyle? style = null) #Appends a numbered list of plain items.
Parameters
- items System.Collections.Generic.IEnumerable<string>
- align OfficeIMO.OfficeAlignment = Left
- color OfficeIMO.OfficeColor? = null
- startNumber int = 1
- style OfficeIMO.Pdf.PdfListStyle? = null
Returns
PdfListpublic PdfList AddNumberedList(IEnumerable<PdfListItem> items, OfficeAlignment align = Left, OfficeColor? color = null, int startNumber = 1, PdfListStyle? style = null) #Appends a numbered list whose items can contain rich inline text runs.
Parameters
- items System.Collections.Generic.IEnumerable<OfficeIMO.Pdf.PdfListItem>
- align OfficeIMO.OfficeAlignment = Left
- color OfficeIMO.OfficeColor? = null
- startNumber int = 1
- style OfficeIMO.Pdf.PdfListStyle? = null
Returns
PdfListpublic PdfParagraph AddParagraph(string? text = null, OfficeAlignment align = Left, OfficeColor? color = null, PdfParagraphStyle? style = null) #Appends a paragraph to the current flow and returns it.
Parameters
- text string? = null
- Optional first text run, formatted from the paragraph run defaults.
- align OfficeIMO.OfficeAlignment = Left
- Paragraph alignment.
- color OfficeIMO.OfficeColor? = null
- Optional text colour; it becomes PdfTextRunDefaults.Color and the colour of runs that carry none.
- style OfficeIMO.Pdf.PdfParagraphStyle? = null
- Optional paragraph layout style.
Returns
PdfParagraph The paragraph. It stays editable until the document is laid out, so AddParagraph().AddText("x").SetBold() renders bold text.public PdfParagraph AddParagraph(Action<PdfParagraph> build, OfficeAlignment align = Left, OfficeColor? color = null, PdfParagraphStyle? style = null) #Appends a paragraph built by a callback and returns it.
Parameters
- build System.Action<OfficeIMO.Pdf.PdfParagraph>
- Adds and formats the paragraph runs.
- align OfficeIMO.OfficeAlignment = Left
- Paragraph alignment.
- color OfficeIMO.OfficeColor? = null
- Optional text colour; it becomes PdfTextRunDefaults.Color and the colour of runs that carry none.
- style OfficeIMO.Pdf.PdfParagraphStyle? = null
- Optional paragraph layout style.
Returns
PdfParagraphpublic PdfTable AddTable(IEnumerable<string[]> rows, OfficeAlignment align = Left, PdfTableStyle? style = null) #Appends a table of plain text rows.
Parameters
- rows System.Collections.Generic.IEnumerable<string[]>
- Rows of cell text, snapshotted during this call.
- align OfficeIMO.OfficeAlignment = Left
- Table alignment in the document flow.
- style OfficeIMO.Pdf.PdfTableStyle? = null
- Optional table style, including column layout, alignment, header rows and the visible caption.
Returns
PdfTablepublic PdfTable AddTable(IEnumerable<PdfTableCell[]> rows, OfficeAlignment align = Left, PdfTableStyle? style = null) #Appends a table of explicit cells, including spans, links, images, form fields and rich runs.
Parameters
- rows System.Collections.Generic.IEnumerable<OfficeIMO.Pdf.PdfTableCell[]>
- Rows of cells, snapshotted during this call.
- align OfficeIMO.OfficeAlignment = Left
- Table alignment in the document flow.
- style OfficeIMO.Pdf.PdfTableStyle? = null
- Optional table style, including column layout, alignment, header rows and the visible caption.
Returns
PdfTablepublic PdfTable AddTable(IEnumerable<string[]> rows) #Appends a table of plain text rows with the document table style.
Parameters
- rows System.Collections.Generic.IEnumerable<string[]>
Returns
PdfTablepublic PdfTable AddTable<T>(IEnumerable<T?> rows, OfficeTableOptions? options = null) #Appends a table from typed properties, tuples, or string-keyed dictionaries using the shared bounded projection engine.
Type Parameters
- T
Parameters
- rows System.Collections.Generic.IEnumerable<T?>
- Source rows, enumerated once while this call snapshots the table.
- options OfficeIMO.OfficeTableOptions? = null
- Common column selection, ordering, header, formatting and alignment options.
Returns
PdfTablepublic PdfAnalysisReport Analyze(PdfComplianceProfile complianceProfile = None) #Produces one consolidated health and capability report. Supply a compliance profile to include artifact readback readiness.
Parameters
- complianceProfile OfficeIMO.Pdf.PdfComplianceProfile = None
Returns
PdfAnalysisReportpublic PdfAnalysisReport Analyze(PdfComplianceProfile complianceProfile, CancellationToken cancellationToken) #Produces one consolidated health and capability report with cooperative cancellation.
Parameters
- complianceProfile OfficeIMO.Pdf.PdfComplianceProfile
- cancellationToken System.Threading.CancellationToken
Returns
PdfAnalysisReportpublic PdfAppendOnlyMutationReport AnalyzeAppendOnlyMutation(PdfLoadOptions? options = null) #Analyzes which append-only mutation actions OfficeIMO.Pdf can safely attempt for this PDF.
Parameters
- options OfficeIMO.Pdf.PdfLoadOptions? = null
Returns
PdfAppendOnlyMutationReportpublic IReadOnlyList<PdfTextEncodingDiagnostic> AnalyzeTextEncoding() #Analyzes generated document text against the configured PDF text encoding before rendering.
Returns
IReadOnlyList<PdfTextEncodingDiagnostic>public IReadOnlyList<PdfTextEncodingDiagnostic> AnalyzeTextEncoding(CancellationToken cancellationToken) #Analyzes generated PDF text while honoring cancellation during document traversal.
Parameters
- cancellationToken System.Threading.CancellationToken
- Token checked before preflight and while visiting generated content.
Exceptions
OperationCanceledException– The supplied token is canceled.
public PdfDocument AppendMetadataRevision(CancellationToken cancellationToken, string? title = null, string? author = null, string? subject = null, string? keywords = null, bool createXmpMetadata = false) #Appends a metadata revision with cancellation through planning, serialization and output adoption.
Parameters
- cancellationToken System.Threading.CancellationToken
- title string? = null
- author string? = null
- subject string? = null
- keywords string? = null
- createXmpMetadata bool = false
Returns
PdfDocumentpublic PdfDocument AppendMetadataRevision(string? title = null, string? author = null, string? subject = null, string? keywords = null, bool createXmpMetadata = false) #Appends a metadata-only incremental revision without rewriting the existing PDF bytes.
Parameters
- title string? = null
- author string? = null
- subject string? = null
- keywords string? = null
- createXmpMetadata bool = false
Returns
PdfDocumentpublic PdfComplianceReadinessReport AssessCompliance() #Analyzes this generated document against its configured compliance profile using the same layout path as PDF output.
Returns
PdfComplianceReadinessReportpublic PdfComplianceReadinessReport AssessCompliance(PdfComplianceProfile profile) #Analyzes 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.
Returns
PdfComplianceReadinessReportpublic PdfComplianceReadinessReport AssessCompliance(PdfComplianceProfile profile, CancellationToken cancellationToken) #Analyzes a compliance profile while observing cancellation during opened-PDF readback.
Parameters
- profile OfficeIMO.Pdf.PdfComplianceProfile
- cancellationToken System.Threading.CancellationToken
Returns
PdfComplianceReadinessReportpublic PdfComplianceProofReport AssessComplianceProof(IEnumerable<PdfExternalValidationResult>? externalValidations = null) #Combines generated-document compliance readiness for the configured profile with external validator evidence.
Parameters
- externalValidations System.Collections.Generic.IEnumerable<OfficeIMO.Pdf.PdfExternalValidationResult>? = null
Returns
PdfComplianceProofReportpublic PdfComplianceProofReport AssessComplianceProof(PdfComplianceProfile profile, IEnumerable<PdfExternalValidationResult>? externalValidations = null) #Combines 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.
Returns
PdfComplianceProofReportpublic PdfDeclaredComplianceClaimsReport AssessDeclaredComplianceClaims(IEnumerable<PdfExternalValidationResult>? externalValidations = null) #Assesses 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) #Assesses several mutation families against one shared preflight snapshot.
Parameters
- operations System.Collections.Generic.IEnumerable<OfficeIMO.Pdf.PdfMutationOperation>? = null
- fieldNames System.Collections.Generic.IEnumerable<string>? = null
- options OfficeIMO.Pdf.PdfLoadOptions? = null
- executionPreference OfficeIMO.Pdf.PdfMutationExecutionPreference = Automatic
Returns
PdfMutationPortfolioReportpublic PdfMutationPortfolioReport AssessMutations(CancellationToken cancellationToken, IEnumerable<PdfMutationOperation>? operations = null, IEnumerable<string>? fieldNames = null, PdfLoadOptions? options = null, PdfMutationExecutionPreference executionPreference = Automatic) #Assesses 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<string>? = null
- options OfficeIMO.Pdf.PdfLoadOptions? = null
- executionPreference OfficeIMO.Pdf.PdfMutationExecutionPreference = Automatic
Returns
PdfMutationPortfolioReportpublic PdfRenderCompatibilityReport AssessRenderCompatibility(PdfLoadOptions? options = null) #Assesses managed page-render fidelity without rasterizing or writing image artifacts.
Parameters
- options OfficeIMO.Pdf.PdfLoadOptions? = null
Returns
PdfRenderCompatibilityReportpublic PdfRenderCompatibilityReport AssessRenderCompatibility(PdfLoadOptions? options, PdfPageRenderOptions? renderOptions) #Assesses managed page-render fidelity with configurable per-page diagnostic limits.
Parameters
- options OfficeIMO.Pdf.PdfLoadOptions?
- renderOptions OfficeIMO.Pdf.PdfPageRenderOptions?
Returns
PdfRenderCompatibilityReportpublic PdfDocument Compose(Action<PdfDocumentBuilder> compose) #Higher-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>
Returns
PdfDocumentpublic PdfAConversionResult ConvertToPdfA(PdfAConversionOptions? options = null, CancellationToken cancellationToken = default) #Converts this PDF to PDF/A. Conversion fixes what it can without moving anything on the page and reports every change. When something cannot be made compliant without changing the content, nothing is produced and the result lists every violation by object.
Parameters
- options OfficeIMO.Pdf.PdfAConversionOptions? = null
- cancellationToken System.Threading.CancellationToken = default
Returns
PdfAConversionResultpublic static PdfDocument Create(string filePath, PdfCreateOptions? options = null) #Creates an empty PDF associated with a path. The file is written on Save.
Parameters
- filePath string
- options OfficeIMO.Pdf.PdfCreateOptions? = null
Returns
PdfDocumentpublic static PdfDocument Create(PdfCreateOptions? options = null) #Creates a new, empty PDF document with optional options.
Parameters
- options OfficeIMO.Pdf.PdfCreateOptions? = null
- Page size, margins and default font options. When null, sensible defaults are used.
public static PdfDocument Create(Action<PdfDocumentBuilder> compose, PdfCreateOptions? options = null) #Creates and composes a PDF document through the canonical authoring DSL.
Parameters
- compose System.Action<OfficeIMO.Pdf.PdfDocumentBuilder>
- Document composition callback.
- options OfficeIMO.Pdf.PdfCreateOptions? = null
- Optional document-wide rendering, catalog, security, and compliance options.
public PdfComplianceArtifact CreateComplianceArtifact() #Atomically renders or snapshots this document with readiness evidence for its configured compliance profile.
Returns
PdfComplianceArtifactpublic PdfComplianceArtifact CreateComplianceArtifact(PdfComplianceProfile profile) #Atomically 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
Returns
PdfComplianceArtifactpublic PdfDebuggerReport Debug(PdfDebuggerOptions? options = null, PdfLoadOptions? readOptions = null) #Creates a bounded debugger projection of objects, revisions, pages, resources, and content operators.
Parameters
- options OfficeIMO.Pdf.PdfDebuggerOptions? = null
- readOptions OfficeIMO.Pdf.PdfLoadOptions? = null
Returns
PdfDebuggerReportpublic PdfDiagnosticReport Diagnostics(PdfLoadOptions? options = null) #Builds a combined PDF diagnostic report for this document.
Parameters
- options OfficeIMO.Pdf.PdfLoadOptions? = null
Returns
PdfDiagnosticReportpublic void Dispose() #Completes this in-memory document's lifetime. Caller-owned streams remain open.
public IReadOnlyList<PdfExtractedAttachment> ExtractAttachments() #Extracts the document's embedded attachment payloads.
Returns
IReadOnlyList<PdfExtractedAttachment>public IReadOnlyList<PdfStructuredHeadingPage> ExtractHeadingsByPage(PdfTextLayoutOptions? options = null) #Extracts detected headings grouped by page.
Parameters
- options OfficeIMO.Pdf.PdfTextLayoutOptions? = null
Returns
IReadOnlyList<PdfStructuredHeadingPage>public IReadOnlyList<PdfExtractedImage> ExtractImages() #Extracts image XObjects from all pages in document order.
Returns
IReadOnlyList<PdfExtractedImage>public IReadOnlyList<PdfStructuredListItemPage> ExtractListItemsByPage(PdfTextLayoutOptions? options = null) #Extracts list items grouped by page.
Parameters
- options OfficeIMO.Pdf.PdfTextLayoutOptions? = null
Returns
IReadOnlyList<PdfStructuredListItemPage>public string ExtractMarkdown(PdfLogicalMarkdownOptions? options = null, CancellationToken cancellationToken = default) #Extracts Markdown text from the bounded logical reading model.
Parameters
- options OfficeIMO.Pdf.PdfLogicalMarkdownOptions? = null
- cancellationToken System.Threading.CancellationToken = default
Returns
stringpublic IReadOnlyList<PdfStructuredParagraphPage> ExtractParagraphsByPage(PdfTextLayoutOptions? options = null) #Extracts paragraphs grouped by page.
Parameters
- options OfficeIMO.Pdf.PdfTextLayoutOptions? = null
Returns
IReadOnlyList<PdfStructuredParagraphPage>public IReadOnlyList<PdfStructuredPage> ExtractStructuredPages(PdfTextLayoutOptions? options = null) #Extracts structured pages with paragraphs, lists, headings and tables.
Parameters
- options OfficeIMO.Pdf.PdfTextLayoutOptions? = null
Returns
IReadOnlyList<PdfStructuredPage>public IReadOnlyList<PdfStructuredTablePage> ExtractTablesByPage(PdfTextLayoutOptions? options = null) #Extracts detected tables grouped by page.
Parameters
- options OfficeIMO.Pdf.PdfTextLayoutOptions? = null
Returns
IReadOnlyList<PdfStructuredTablePage>public string ExtractText(CancellationToken cancellationToken = default) #Extracts page text through the document's bounded read pipeline.
Parameters
- cancellationToken System.Threading.CancellationToken = default
Returns
stringpublic string ExtractTextWithColumns(PdfTextLayoutOptions? options = null) #Extracts text with column-aware reading order.
Parameters
- options OfficeIMO.Pdf.PdfTextLayoutOptions? = null
Returns
stringpublic PdfInteractiveContentFlattenResult FlattenInteractiveContent(PdfInteractiveContentFlattenOptions? options = null) #Flattens readable AcroForm fields and supported visual annotations into one new PDF artifact.
Parameters
- options OfficeIMO.Pdf.PdfInteractiveContentFlattenOptions? = null
public PdfDocument FlattenVisualAnnotations() #Creates a new PDF with visual annotation appearance streams painted into page content where supported.
Returns
PdfDocumentpublic PdfDocument FlattenVisualAnnotations(CancellationToken cancellationToken) #Flattens supported annotation appearances with cooperative cancellation.
Parameters
- cancellationToken System.Threading.CancellationToken
Returns
PdfDocumentpublic PdfPageInteractionMap GetEditingInteractions(int pageNumber) #Reads visual hit regions for permitted annotation and form editing, without extracting page text or images.
Parameters
- pageNumber int
Returns
PdfPageInteractionMappublic IReadOnlyList<PdfPageLayoutInfo> GetPageLayouts(PdfLoadOptions? options = null) #Reads page geometry without extracting document content or requiring copy permission.
Parameters
- options OfficeIMO.Pdf.PdfLoadOptions? = null
Returns
IReadOnlyList<PdfPageLayoutInfo>public IReadOnlyList<PdfPageLayoutInfo> GetPageLayouts(PdfLoadOptions? options, CancellationToken cancellationToken) #Reads page geometry with cooperative cancellation, without extracting document content or requiring copy permission.
Parameters
- options OfficeIMO.Pdf.PdfLoadOptions?
- cancellationToken System.Threading.CancellationToken
Returns
IReadOnlyList<PdfPageLayoutInfo>public IReadOnlyList<PdfPageLayoutInfo> GetPrintablePageLayouts(PdfLoadOptions? options = null) #Reads page geometry for printing after enforcing the authenticated document permissions.
Parameters
- options OfficeIMO.Pdf.PdfLoadOptions? = null
Returns
IReadOnlyList<PdfPageLayoutInfo>public IReadOnlyList<PdfPageLayoutInfo> GetPrintablePageLayouts(PdfLoadOptions? options, CancellationToken cancellationToken) #Reads page geometry for printing with cooperative cancellation after enforcing the authenticated document permissions.
Parameters
- options OfficeIMO.Pdf.PdfLoadOptions?
- cancellationToken System.Threading.CancellationToken
Returns
IReadOnlyList<PdfPageLayoutInfo>public PdfDocumentInfo Inspect(PdfLoadOptions? options = null) #Inspects metadata, pages, annotations, fields, and catalog-level state.
Parameters
- options OfficeIMO.Pdf.PdfLoadOptions? = null
Returns
PdfDocumentInfopublic PdfDocumentInfo Inspect(PdfLoadOptions? options, CancellationToken cancellationToken) #Inspects metadata, pages, annotations, fields, and catalog-level state with cooperative cancellation.
Parameters
- options OfficeIMO.Pdf.PdfLoadOptions?
- cancellationToken System.Threading.CancellationToken
Returns
PdfDocumentInfopublic PdfDocumentViewInfo InspectForViewing(PdfLoadOptions? options = null, CancellationToken cancellationToken = default) #Inspects 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
Returns
PdfDocumentViewInfopublic PdfDocumentViewInfo InspectGeometryForViewing(PdfLoadOptions? options = null, CancellationToken cancellationToken = default) #Inspects 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
Returns
PdfDocumentViewInfopublic PdfSanitizationReport InspectSanitization(PdfSanitizationOptions? options = null, CancellationToken cancellationToken = default) #Inspects what the supplied sanitization policy would remove without modifying the PDF.
Parameters
- options OfficeIMO.Pdf.PdfSanitizationOptions? = null
- cancellationToken System.Threading.CancellationToken = default
Returns
PdfSanitizationReportpublic static PdfDocument Load(string path, PdfLoadOptions? loadOptions = null) #Loads an existing PDF from a bounded file snapshot.
Parameters
- path string
- loadOptions OfficeIMO.Pdf.PdfLoadOptions? = null
Returns
PdfDocumentpublic static PdfDocument Load(Stream stream, PdfLoadOptions? loadOptions = null) #Loads 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
Returns
PdfDocumentpublic static PdfDocument Load(string path, PdfLoadOptions? loadOptions, CancellationToken cancellationToken) #Loads a bounded file snapshot with cooperative cancellation.
Parameters
- path string
- loadOptions OfficeIMO.Pdf.PdfLoadOptions?
- cancellationToken System.Threading.CancellationToken
Returns
PdfDocumentpublic static PdfDocument Load(Stream stream, PdfLoadOptions? loadOptions, CancellationToken cancellationToken) #Loads 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
Returns
PdfDocumentpublic static async Task<PdfDocument> LoadAsync(string path, PdfLoadOptions? loadOptions = null, CancellationToken cancellationToken = default) #Asynchronously loads an existing PDF from a bounded file snapshot.
Parameters
- path string
- loadOptions OfficeIMO.Pdf.PdfLoadOptions? = null
- cancellationToken System.Threading.CancellationToken = default
Returns
Task<PdfDocument>public static async Task<PdfDocument> LoadAsync(Stream stream, PdfLoadOptions? loadOptions = null, CancellationToken cancellationToken = default) #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
Returns
Task<PdfDocument>public static PdfDocument Merge(IEnumerable<PdfDocument> documents, PdfMergeOptions? options = null, CancellationToken cancellationToken = default) #Merges documents in order using one structure policy.
Parameters
- documents System.Collections.Generic.IEnumerable<OfficeIMO.Pdf.PdfDocument>
- options OfficeIMO.Pdf.PdfMergeOptions? = null
- cancellationToken System.Threading.CancellationToken = default
Returns
PdfDocumentpublic static PdfDocument Merge(IEnumerable<PdfDocument> documents, PdfMergeOptions? options, out PdfMergeReport report, CancellationToken cancellationToken = default) #Merges documents and returns the completed policy and readback report.
Parameters
- documents System.Collections.Generic.IEnumerable<OfficeIMO.Pdf.PdfDocument>
- options OfficeIMO.Pdf.PdfMergeOptions?
- report OfficeIMO.Pdf.PdfMergeReport
- cancellationToken System.Threading.CancellationToken = default
Returns
PdfDocumentpublic PdfDocument MergeWith(PdfDocument document, PdfMergeOptions options) #Merges this PDF with another loaded or generated PDF using an explicit structure policy.
Parameters
- document OfficeIMO.Pdf.PdfDocument
- options OfficeIMO.Pdf.PdfMergeOptions
Returns
PdfDocumentpublic PdfDocument MergeWith(PdfDocument document, PdfMergeOptions options, CancellationToken cancellationToken) #Merges this PDF with another document using an explicit structure policy and cooperative cancellation.
Parameters
- document OfficeIMO.Pdf.PdfDocument
- options OfficeIMO.Pdf.PdfMergeOptions
- cancellationToken System.Threading.CancellationToken
Returns
PdfDocumentpublic PdfDocument MergeWith(PdfDocument document) #Creates a new PDF by merging this PDF with another loaded or generated PDF.
Parameters
- document OfficeIMO.Pdf.PdfDocument
Returns
PdfDocumentpublic PdfDocument MergeWith(byte[] pdf) #Creates 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 byte[]
Returns
PdfDocumentpublic PdfDocument MergeWith(string path) #Creates a new PDF by merging this PDF with another PDF file.
Parameters
- path string
Returns
PdfDocumentpublic PdfDocument MergeWith(Stream stream) #Creates a new PDF by merging this PDF with another readable PDF stream.
Parameters
- stream System.IO.Stream
Returns
PdfDocumentpublic PdfDocument Meta(string? title = null, string? author = null, string? subject = null, string? keywords = null) #Sets PDF metadata. Only values provided are updated; missing parameters keep previous values. Pass an empty string to clear a previously assigned value.
Parameters
- title string? = null
- Document title metadata.
- author string? = null
- Document author metadata.
- subject string? = null
- Document subject metadata.
- keywords string? = null
- Document keywords metadata.
public PdfMutationPlan PlanMutation(PdfMutationOperation operation, IEnumerable<string>? fieldNames = null, PdfLoadOptions? options = null, PdfMutationExecutionPreference executionPreference = Automatic) #Chooses a full-rewrite, append-only, or blocked path for an existing-document mutation.
Parameters
- operation OfficeIMO.Pdf.PdfMutationOperation
- fieldNames System.Collections.Generic.IEnumerable<string>? = null
- options OfficeIMO.Pdf.PdfLoadOptions? = null
- executionPreference OfficeIMO.Pdf.PdfMutationExecutionPreference = Automatic
Returns
PdfMutationPlanpublic PdfMutationPlan PlanMutation(PdfMutationOperation operation, IEnumerable<string>? fieldNames, PdfLoadOptions? options, PdfMutationExecutionPreference executionPreference, CancellationToken cancellationToken) #Chooses a mutation path while observing cancellation during parsing and preflight.
Parameters
- operation OfficeIMO.Pdf.PdfMutationOperation
- fieldNames System.Collections.Generic.IEnumerable<string>?
- options OfficeIMO.Pdf.PdfLoadOptions?
- executionPreference OfficeIMO.Pdf.PdfMutationExecutionPreference
- cancellationToken System.Threading.CancellationToken
Returns
PdfMutationPlanpublic PdfRawDocumentView RawStructure(PdfRawStructureOptions? options = null, PdfLoadOptions? readOptions = null) #Builds an immutable, bounded view of the document's active raw object graph.
Parameters
- options OfficeIMO.Pdf.PdfRawStructureOptions? = null
- readOptions OfficeIMO.Pdf.PdfLoadOptions? = null
Returns
PdfRawDocumentViewpublic PdfDocumentReadResult Read(PdfLoadOptions? options = null, CancellationToken cancellationToken = default) #Builds the canonical semantic document result using the structured profile by default.
Parameters
- options OfficeIMO.Pdf.PdfLoadOptions? = null
- cancellationToken System.Threading.CancellationToken = default
Returns
PdfDocumentReadResultpublic PdfInspectionReadResult ReadForInspection(PdfLoadOptions? options = null, CancellationToken cancellationToken = default) #Reads selected pages while retaining structural facts and explicit outcomes for unmappable text, unsupported content-stream filters, and opt-in recovery from damaged page streams. PdfDocument.Read remains fail-fast. Pass PdfLoadOptions.RecoverDecodableTextForInspection to retain readable text on a page with a font-mapping failure when using the built-in glyph decoder, or from leading page content streams before a supported page content filter reports damaged data. Cancellation, resource admission, authentication, permissions, structural parsing, and unexpected stage failures remain terminal and are never converted to partial success.
Parameters
- options OfficeIMO.Pdf.PdfLoadOptions? = null
- cancellationToken System.Threading.CancellationToken = default
Returns
PdfInspectionReadResultpublic static OfficeContentCleanupResult RemoveSelectedContent(byte[] pdf, OfficeContentCleanupSelection selection, OfficeContentCleanupOptions? options = null, PdfLoadOptions? readOptions = null) #Physically removes exact selected PDF text spans and verifies the rewritten artifact.
Parameters
- pdf byte[]
- selection OfficeIMO.ContentSafety.OfficeContentCleanupSelection
- options OfficeIMO.ContentSafety.OfficeContentCleanupOptions? = null
- readOptions OfficeIMO.Pdf.PdfLoadOptions? = null
Returns
OfficeContentCleanupResultpublic static OfficeContentCleanupResult RemoveSelectedContent(string inputPath, string outputPath, OfficeContentCleanupSelection selection, OfficeContentCleanupOptions? options = null, PdfLoadOptions? readOptions = null) #Atomically writes an explicitly cleaned PDF artifact.
Parameters
- inputPath string
- outputPath string
- selection OfficeIMO.ContentSafety.OfficeContentCleanupSelection
- options OfficeIMO.ContentSafety.OfficeContentCleanupOptions? = null
- readOptions OfficeIMO.Pdf.PdfLoadOptions? = null
Returns
OfficeContentCleanupResultpublic PdfDocument ReplaceProperties(PdfDocumentProperties metadata, CancellationToken cancellationToken) #Replaces metadata with cooperative cancellation through parsing, rewriting and output adoption.
Parameters
- metadata OfficeIMO.Pdf.PdfDocumentProperties
- cancellationToken System.Threading.CancellationToken
Returns
PdfDocumentpublic PdfDocument ReplaceProperties(PdfDocumentProperties metadata) #Creates a new PDF with exactly the supplied metadata.
Parameters
- metadata OfficeIMO.Pdf.PdfDocumentProperties
Returns
PdfDocumentpublic PdfSanitizationResult Sanitize(PdfSanitizationOptions? options = null, CancellationToken cancellationToken = default) #Removes or quarantines active content and embedded payloads through a proven full rewrite.
Parameters
- options OfficeIMO.Pdf.PdfSanitizationOptions? = null
- cancellationToken System.Threading.CancellationToken = default
Returns
PdfSanitizationResultpublic void Save() #Saves to the associated path, rejecting serialization loss by default.
public void Save(PdfSaveOptions options) #Saves to the associated path using explicit native-output options.
Parameters
- options OfficeIMO.Pdf.PdfSaveOptions
public void Save(string path, PdfSaveOptions? options = null, CancellationToken cancellationToken = default) #Atomically saves the native document to a file and associates that path.
Parameters
- path string
- options OfficeIMO.Pdf.PdfSaveOptions? = null
- cancellationToken System.Threading.CancellationToken = default
public void Save(Stream stream, PdfSaveOptions? options = null, CancellationToken cancellationToken = default) #Writes native PDF to a caller-owned stream after validating fidelity.
Parameters
- stream System.IO.Stream
- options OfficeIMO.Pdf.PdfSaveOptions? = null
- cancellationToken System.Threading.CancellationToken = default
public PdfAConversionReport SaveAsPdfA(string path, PdfAConversionOptions? options = null, CancellationToken cancellationToken = default) #Converts this PDF to PDF/A and writes it to path. Throws PdfAConversionException listing every violation, without creating the file, when the source cannot be converted without changing its content.
Parameters
- path string
- options OfficeIMO.Pdf.PdfAConversionOptions? = null
- cancellationToken System.Threading.CancellationToken = default
Returns
PdfAConversionReportpublic Task SaveAsync(CancellationToken cancellationToken = default) #Asynchronously saves the native document to its associated path.
Parameters
- cancellationToken System.Threading.CancellationToken = default
Returns
Taskpublic async Task SaveAsync(string path, PdfSaveOptions? options = null, CancellationToken cancellationToken = default) #Asynchronously saves the native document to a file and associates that path.
Parameters
- path string
- options OfficeIMO.Pdf.PdfSaveOptions? = null
- cancellationToken System.Threading.CancellationToken = default
Returns
Taskpublic async Task SaveAsync(Stream stream, PdfSaveOptions? options = null, CancellationToken cancellationToken = default) #Asynchronously writes native PDF to a caller-owned stream after validating fidelity.
Parameters
- stream System.IO.Stream
- options OfficeIMO.Pdf.PdfSaveOptions? = null
- cancellationToken System.Threading.CancellationToken = default
Returns
Taskpublic PdfDocument SynchronizeMetadata(CancellationToken cancellationToken, string? title = null, string? author = null, string? subject = null, string? keywords = null, bool createXmpMetadata = true) #Synchronizes Info and XMP with cooperative cancellation, retaining the source document unchanged.
Parameters
- cancellationToken System.Threading.CancellationToken
- title string? = null
- author string? = null
- subject string? = null
- keywords string? = null
- createXmpMetadata bool = true
Returns
PdfDocumentpublic PdfDocument SynchronizeMetadata(string? title = null, string? author = null, string? subject = null, string? keywords = null, bool createXmpMetadata = true) #Creates 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 string? = null
- author string? = null
- subject string? = null
- keywords string? = null
- createXmpMetadata bool = true
Returns
PdfDocumentpublic byte[] ToBytes(PdfSaveOptions? options = null, CancellationToken cancellationToken = default) #Serializes PDF bytes and checks any new native-output fidelity findings.
Parameters
- options OfficeIMO.Pdf.PdfSaveOptions? = null
- cancellationToken System.Threading.CancellationToken = default
Returns
byte[]public static bool TryPrepareImageBytes(byte[] data, out byte[] preparedBytes, out OfficeImageInfo? imageInfo, out bool wasTranscoded, out string? unsupportedReason) #Prepares 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 byte[]
- preparedBytes byte[]
- imageInfo OfficeIMO.Drawing.OfficeImageInfo?
- wasTranscoded bool
- unsupportedReason string?
Returns
boolpublic static bool TryValidateImageBytes(byte[] data, out OfficeImageInfo? imageInfo, out string? unsupportedReason) #Checks whether image bytes can be embedded by the first-party PDF writer.
Parameters
- data byte[]
- imageInfo OfficeIMO.Drawing.OfficeImageInfo?
- unsupportedReason string?
Returns
boolpublic PdfDocument UpdateProperties(CancellationToken cancellationToken, string? title = null, string? author = null, string? subject = null, string? keywords = null) #Updates metadata with cooperative cancellation, preserving the source document and its captured read limits.
Parameters
- cancellationToken System.Threading.CancellationToken
- title string? = null
- author string? = null
- subject string? = null
- keywords string? = null
Returns
PdfDocumentpublic PdfDocument UpdateProperties(string? title = null, string? author = null, string? subject = null, string? keywords = null) #Creates a new PDF with updated metadata. Null values preserve existing fields; empty strings clear fields.
Parameters
- title string? = null
- author string? = null
- subject string? = null
- keywords string? = null
Returns
PdfDocumentInherited Methods
Properties
public string? FilePath { get; } #Gets the associated path, or null for a document created or loaded in memory.
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.
public PdfDocumentProperties Properties { get; } #Gets the standard document properties from the Info dictionary through the bounded read pipeline.
public IReadOnlyList<PdfOutlineItem> Outlines { get; } #Gets document outlines without exposing the parser.
public IReadOnlyList<PdfNamedDestination> NamedDestinations { get; } #Gets named destinations from the document.
public IReadOnlyList<PdfFormField> FormFields { get; } #Gets the document's form fields.
public PdfRepairReport RepairReport { get; } #Gets structural recovery observations from the bounded parser.
public PdfTaggedContentInfo? TaggedContent { get; } #Gets the parsed document's tagged content.
public bool HasTaggedContent { get; } #Gets the parsed document's has tagged content.
public IReadOnlyList<PdfCatalogAction> CatalogActions { get; } #Gets the parsed document's catalog actions.
public IReadOnlyList<PdfJavaScript> JavaScripts { get; } #Gets the parsed document's java scripts.
public PdfPortfolioInfo? Portfolio { get; } #Gets the parsed document's portfolio.
public string? AcroFormDefaultAppearance { get; } #Gets the parsed document's acro form default appearance.
public int? AcroFormQuadding { get; } #Gets the parsed document's acro form quadding.
public bool? AcroFormNeedAppearances { get; } #Gets the parsed document's acro form need appearances.
public int? AcroFormSignatureFlags { get; } #Gets the parsed document's acro form signature flags.
public PdfAcroFormXfaInfo? AcroFormXfa { get; } #Gets the parsed document's acro form xfa.
public string? CatalogVersion { get; } #Gets the parsed document's catalog version.
public string? CatalogLanguage { get; } #Gets the parsed document's catalog language.
public IReadOnlyList<PdfOutputIntentInfo> OutputIntents { get; } #Gets the parsed document's output intents.
public bool OutputIntentsAreComplete { get; } #Gets the parsed document's output intents are complete.
public PdfOptionalContentProperties? OptionalContent { get; } #Gets the parsed document's optional content.
public PdfXmpMetadataInfo? XmpMetadata { get; } #Gets the parsed document's xmp metadata.
Extension Methods
public static OfficeConversionReport SaveAsImages(PdfDocument document, string folderPath, PdfImageExportOptions? options = null, CancellationToken cancellationToken = default) #Saves selected pages without retaining their encoded payloads and returns the fidelity report.
Parameters
- document OfficeIMO.Pdf.PdfDocument
- folderPath string
- options OfficeIMO.Pdf.PdfImageExportOptions? = null
- cancellationToken System.Threading.CancellationToken = default
Returns
OfficeConversionReportpublic static async Task<OfficeConversionReport> SaveAsImagesAsync(PdfDocument document, string folderPath, PdfImageExportOptions? options = null, CancellationToken cancellationToken = default) #Asynchronously saves selected pages without retaining their encoded payloads.
Parameters
- document OfficeIMO.Pdf.PdfDocument
- folderPath string
- options OfficeIMO.Pdf.PdfImageExportOptions? = null
- cancellationToken System.Threading.CancellationToken = default
Returns
Task<OfficeConversionReport>public static IReadOnlyList<OfficeImageExportResult> ToImages(PdfDocument document, PdfImageExportOptions? options = null, CancellationToken cancellationToken = default) #Renders the selected PDF pages using the encoding and resource limits in the options.
Parameters
- document OfficeIMO.Pdf.PdfDocument
- options OfficeIMO.Pdf.PdfImageExportOptions? = null
- cancellationToken System.Threading.CancellationToken = default
Returns
IReadOnlyList<OfficeImageExportResult>public static IReadOnlyList<OfficeImageExportResult> ToImages(PdfDocument document, PdfImageExportOptions? options, out OfficeConversionReport report, CancellationToken cancellationToken = default) #Renders the selected pages and returns an immutable aggregate fidelity report.
Parameters
- document OfficeIMO.Pdf.PdfDocument
- options OfficeIMO.Pdf.PdfImageExportOptions?
- report OfficeIMO.OfficeConversionReport
- cancellationToken System.Threading.CancellationToken = default
Returns
IReadOnlyList<OfficeImageExportResult>public static async Task<OfficeConversionResult<IReadOnlyList<OfficeImageExportResult>>> ToImagesAsync(PdfDocument document, PdfImageExportOptions? options = null, CancellationToken cancellationToken = default) #Asynchronously renders selected pages with a cloned options snapshot and fidelity report.
Parameters
- document OfficeIMO.Pdf.PdfDocument
- options OfficeIMO.Pdf.PdfImageExportOptions? = null
- cancellationToken System.Threading.CancellationToken = default
Returns
Task<OfficeConversionResult<IReadOnlyList<OfficeImageExportResult>>>