API Reference

Class

PdfDocument

Namespace OfficeIMO.Pdf
Assembly OfficeIMO.Pdf
Modifiers sealed

Root PDF document container and fluent API for composing basic PDF files. Mirrors the OfficeIMO.Markdown style (H1/H2/H3, paragraph) but targets PDF output.

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

Accepted by parameters

Methods

public PdfDocument AcroFormDefaultTextAlignment(Nullable<PdfFormFieldTextAlignment> alignment) #
Returns: PdfDocument

Sets or clears the generated AcroForm default text alignment emitted through /Q.

Parameters

alignment System.Nullable{OfficeIMO.Pdf.PdfFormFieldTextAlignment} requiredposition: 0
public PdfAnalysisReport Analyze(PdfComplianceProfile complianceProfile = None) #
Returns: PdfAnalysisReport

Produces one consolidated health and capability report. Supply a compliance profile to include artifact readback readiness.

Parameters

complianceProfile OfficeIMO.Pdf.PdfComplianceProfile = None optionalposition: 0
public PdfAppendOnlyMutationReport AnalyzeAppendOnlyMutation(PdfReadOptions options = null) #
Returns: PdfAppendOnlyMutationReport

Analyzes which append-only mutation actions OfficeIMO.Pdf can safely attempt for this PDF.

Parameters

options OfficeIMO.Pdf.PdfReadOptions = null optionalposition: 0
public PdfOptimizationReport AnalyzeOptimization(PdfReadOptions options = null) #
Returns: PdfOptimizationReport

Builds an optimization opportunity report for this document without modifying it.

Parameters

options OfficeIMO.Pdf.PdfReadOptions = null optionalposition: 0
public IReadOnlyList<PdfTextEncodingDiagnostic> AnalyzeTextEncoding() #
Returns: 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) #
Returns: PdfDocument

Appends a metadata-only incremental revision without rewriting the existing PDF bytes.

Parameters

title System.String = null optionalposition: 0
author System.String = null optionalposition: 1
subject System.String = null optionalposition: 2
keywords System.String = null optionalposition: 3
createXmpMetadata System.Boolean = false optionalposition: 4
ApplyRedactions 2 overloads
public PdfDocument ApplyRedactions(IEnumerable<PdfRedactionArea> areas, PdfRedactionApplyOptions applyOptions = null, PdfTextLayoutOptions layoutOptions = null, PdfReadOptions options = null) #
Returns: PdfDocument

Creates a new PDF with matching text objects and annotations removed from the supplied redaction areas.

Parameters

areas System.Collections.Generic.IEnumerable{OfficeIMO.Pdf.PdfRedactionArea} requiredposition: 0
applyOptions OfficeIMO.Pdf.PdfRedactionApplyOptions = null optionalposition: 1
layoutOptions OfficeIMO.Pdf.PdfTextLayoutOptions = null optionalposition: 2
options OfficeIMO.Pdf.PdfReadOptions = null optionalposition: 3
public PdfDocument ApplyRedactions(PdfRedactionPlan plan, PdfRedactionApplyOptions applyOptions = null, PdfTextLayoutOptions layoutOptions = null, PdfReadOptions options = null) #
Returns: PdfDocument

Applies a reviewed redaction plan, including exact field removal for field-derived areas.

Parameters

plan OfficeIMO.Pdf.PdfRedactionPlan requiredposition: 0
applyOptions OfficeIMO.Pdf.PdfRedactionApplyOptions = null optionalposition: 1
layoutOptions OfficeIMO.Pdf.PdfTextLayoutOptions = null optionalposition: 2
options OfficeIMO.Pdf.PdfReadOptions = null optionalposition: 3
public PdfRedactionVerificationReport AssertRedactionsVerified(PdfRedactionVerificationOptions options) #
Returns: PdfRedactionVerificationReport

Verifies configured redaction markers and throws when removed content remains or retained content disappeared.

Parameters

options OfficeIMO.Pdf.PdfRedactionVerificationOptions requiredposition: 0
AssertRewritePreservationMatrix 3 overloads
public PdfRewritePreservationMatrixReport AssertRewritePreservationMatrix(String id, String operation, Func<PdfDocument, PdfDocument> rewrite, PdfRewritePreservationOptions options = null) #
Returns: PdfRewritePreservationMatrixReport

Runs a one-row rewrite-preservation matrix scenario and throws when the observed outcome differs from the expected outcome.

Parameters

id System.String requiredposition: 0
operation System.String requiredposition: 1
rewrite System.Func{OfficeIMO.Pdf.PdfDocument,OfficeIMO.Pdf.PdfDocument} requiredposition: 2
options OfficeIMO.Pdf.PdfRewritePreservationOptions = null optionalposition: 3
public PdfRewritePreservationMatrixReport AssertRewritePreservationMatrix(String id, String operation, Func<PdfDocument, PdfDocument> rewrite, PdfRewritePreservationOptions options, IEnumerable<String> sourceFeatures) #
Returns: PdfRewritePreservationMatrixReport

Runs a one-row rewrite-preservation matrix scenario with source feature labels and throws when preservation failed.

Parameters

id System.String requiredposition: 0
operation System.String requiredposition: 1
rewrite System.Func{OfficeIMO.Pdf.PdfDocument,OfficeIMO.Pdf.PdfDocument} requiredposition: 2
options OfficeIMO.Pdf.PdfRewritePreservationOptions requiredposition: 3
sourceFeatures System.Collections.Generic.IEnumerable{System.String} requiredposition: 4
public PdfRewritePreservationMatrixReport AssertRewritePreservationMatrix(String id, String operation, Func<PdfDocument, PdfDocument> rewrite, PdfRewritePreservationMatrixClassification expectedClassification, PdfRewritePreservationOptions options = null, IEnumerable<String> sourceFeatures = null) #
Returns: PdfRewritePreservationMatrixReport

Runs a one-row rewrite-preservation matrix scenario and throws when the observed outcome differs from the expected outcome.

Parameters

id System.String requiredposition: 0
operation System.String requiredposition: 1
rewrite System.Func{OfficeIMO.Pdf.PdfDocument,OfficeIMO.Pdf.PdfDocument} requiredposition: 2
expectedClassification OfficeIMO.Pdf.PdfRewritePreservationMatrixClassification requiredposition: 3
options OfficeIMO.Pdf.PdfRewritePreservationOptions = null optionalposition: 4
sourceFeatures System.Collections.Generic.IEnumerable{System.String} = null optionalposition: 5
AssertRewritePreserved 4 overloads
public PdfRewritePreservationReport AssertRewritePreserved(PdfDocument rewrittenDocument, PdfRewritePreservationOptions options = null) #
Returns: PdfRewritePreservationReport

Compares this PDF with a rewritten PDF and throws when important document signals were not preserved.

Parameters

rewrittenDocument OfficeIMO.Pdf.PdfDocument requiredposition: 0
options OfficeIMO.Pdf.PdfRewritePreservationOptions = null optionalposition: 1
public PdfRewritePreservationReport AssertRewritePreserved(Byte[] rewrittenPdf, PdfRewritePreservationOptions options = null) #
Returns: PdfRewritePreservationReport

Compares this PDF with rewritten PDF bytes and throws when important document signals were not preserved.

Parameters

rewrittenPdf System.Byte[] requiredposition: 0
options OfficeIMO.Pdf.PdfRewritePreservationOptions = null optionalposition: 1
public PdfRewritePreservationReport AssertRewritePreserved(Stream rewrittenStream, PdfRewritePreservationOptions options = null) #
Returns: PdfRewritePreservationReport

Compares this PDF with a rewritten PDF stream and throws when important document signals were not preserved.

Parameters

rewrittenStream System.IO.Stream requiredposition: 0
options OfficeIMO.Pdf.PdfRewritePreservationOptions = null optionalposition: 1
public PdfRewritePreservationReport AssertRewritePreserved(String rewrittenPath, PdfRewritePreservationOptions options = null) #
Returns: PdfRewritePreservationReport

Compares this PDF with a rewritten PDF file and throws when important document signals were not preserved.

Parameters

rewrittenPath System.String requiredposition: 0
options OfficeIMO.Pdf.PdfRewritePreservationOptions = null optionalposition: 1
AssessCompliance 2 overloads
public PdfComplianceReadinessReport AssessCompliance() #
Returns: PdfComplianceReadinessReport

Analyzes this generated document against its configured compliance profile using the same layout path as PDF output.

public PdfComplianceReadinessReport AssessCompliance(PdfComplianceProfile profile) #
Returns: PdfComplianceReadinessReport

Analyzes this document against a formal compliance profile. Generated documents use layout evidence; opened documents use artifact readback evidence.

Parameters

profile OfficeIMO.Pdf.PdfComplianceProfile requiredposition: 0
Compliance profile to assess without enabling formal profile generation.
AssessComplianceProof 2 overloads
public PdfComplianceProofReport AssessComplianceProof(IEnumerable<PdfExternalValidationResult> externalValidations = null) #
Returns: PdfComplianceProofReport

Combines generated-document compliance readiness for the configured profile with external validator evidence.

Parameters

externalValidations System.Collections.Generic.IEnumerable{OfficeIMO.Pdf.PdfExternalValidationResult} = null optionalposition: 0
public PdfComplianceProofReport AssessComplianceProof(PdfComplianceProfile profile, IEnumerable<PdfExternalValidationResult> externalValidations = null) #
Returns: PdfComplianceProofReport

Combines generated-document compliance readiness for a formal profile with external validator evidence.

Parameters

profile OfficeIMO.Pdf.PdfComplianceProfile requiredposition: 0
Compliance profile to assess without enabling formal profile generation.
externalValidations System.Collections.Generic.IEnumerable{OfficeIMO.Pdf.PdfExternalValidationResult} = null optionalposition: 1
Optional external validator results to combine with OfficeIMO.Pdf readiness evidence.
public PdfMutationPortfolioReport AssessMutations(IEnumerable<PdfMutationOperation> operations = null, IEnumerable<String> fieldNames = null, PdfReadOptions options = null, PdfMutationExecutionPreference executionPreference = Automatic) #
Returns: PdfMutationPortfolioReport

Assesses several mutation families against one shared preflight snapshot.

Parameters

operations System.Collections.Generic.IEnumerable{OfficeIMO.Pdf.PdfMutationOperation} = null optionalposition: 0
fieldNames System.Collections.Generic.IEnumerable{System.String} = null optionalposition: 1
options OfficeIMO.Pdf.PdfReadOptions = null optionalposition: 2
executionPreference OfficeIMO.Pdf.PdfMutationExecutionPreference = Automatic optionalposition: 3
public PdfRenderCompatibilityReport AssessRenderCompatibility(PdfReadOptions options = null) #
Returns: PdfRenderCompatibilityReport

Assesses managed page-render fidelity without rasterizing or writing image artifacts.

Parameters

options OfficeIMO.Pdf.PdfReadOptions = null optionalposition: 0
AssessRewritePreservation 4 overloads
public PdfRewritePreservationReport AssessRewritePreservation(PdfDocument rewrittenDocument, PdfRewritePreservationOptions options = null) #
Returns: PdfRewritePreservationReport

Compares this PDF with a rewritten PDF and reports whether important document signals were preserved.

Parameters

rewrittenDocument OfficeIMO.Pdf.PdfDocument requiredposition: 0
options OfficeIMO.Pdf.PdfRewritePreservationOptions = null optionalposition: 1
public PdfRewritePreservationReport AssessRewritePreservation(Byte[] rewrittenPdf, PdfRewritePreservationOptions options = null) #
Returns: PdfRewritePreservationReport

Compares this PDF with rewritten PDF bytes and reports whether important document signals were preserved.

Parameters

rewrittenPdf System.Byte[] requiredposition: 0
options OfficeIMO.Pdf.PdfRewritePreservationOptions = null optionalposition: 1
public PdfRewritePreservationReport AssessRewritePreservation(Stream rewrittenStream, PdfRewritePreservationOptions options = null) #
Returns: PdfRewritePreservationReport

Compares this PDF with a rewritten PDF stream and reports whether important document signals were preserved.

Parameters

rewrittenStream System.IO.Stream requiredposition: 0
options OfficeIMO.Pdf.PdfRewritePreservationOptions = null optionalposition: 1
public PdfRewritePreservationReport AssessRewritePreservation(String rewrittenPath, PdfRewritePreservationOptions options = null) #
Returns: PdfRewritePreservationReport

Compares this PDF with a rewritten PDF file and reports whether important document signals were preserved.

Parameters

rewrittenPath System.String requiredposition: 0
options OfficeIMO.Pdf.PdfRewritePreservationOptions = null optionalposition: 1
AssessRewritePreservationMatrix 3 overloads
public PdfRewritePreservationMatrixReport AssessRewritePreservationMatrix(String id, String operation, Func<PdfDocument, PdfDocument> rewrite, PdfRewritePreservationOptions options = null) #
Returns: PdfRewritePreservationMatrixReport

Runs a one-row rewrite-preservation matrix scenario from this PDF using a normal PdfDocument rewrite operation.

Parameters

id System.String requiredposition: 0
operation System.String requiredposition: 1
rewrite System.Func{OfficeIMO.Pdf.PdfDocument,OfficeIMO.Pdf.PdfDocument} requiredposition: 2
options OfficeIMO.Pdf.PdfRewritePreservationOptions = null optionalposition: 3
public PdfRewritePreservationMatrixReport AssessRewritePreservationMatrix(String id, String operation, Func<PdfDocument, PdfDocument> rewrite, PdfRewritePreservationOptions options, IEnumerable<String> sourceFeatures) #
Returns: PdfRewritePreservationMatrixReport

Runs a one-row rewrite-preservation matrix scenario from this PDF with source feature labels.

Parameters

id System.String requiredposition: 0
operation System.String requiredposition: 1
rewrite System.Func{OfficeIMO.Pdf.PdfDocument,OfficeIMO.Pdf.PdfDocument} requiredposition: 2
options OfficeIMO.Pdf.PdfRewritePreservationOptions requiredposition: 3
sourceFeatures System.Collections.Generic.IEnumerable{System.String} requiredposition: 4
public PdfRewritePreservationMatrixReport AssessRewritePreservationMatrix(String id, String operation, Func<PdfDocument, PdfDocument> rewrite, PdfRewritePreservationMatrixClassification expectedClassification, PdfRewritePreservationOptions options = null, IEnumerable<String> sourceFeatures = null) #
Returns: PdfRewritePreservationMatrixReport

Runs a one-row rewrite-preservation matrix scenario from this PDF using a normal PdfDocument rewrite operation and expected outcome.

Parameters

id System.String requiredposition: 0
operation System.String requiredposition: 1
rewrite System.Func{OfficeIMO.Pdf.PdfDocument,OfficeIMO.Pdf.PdfDocument} requiredposition: 2
expectedClassification OfficeIMO.Pdf.PdfRewritePreservationMatrixClassification requiredposition: 3
options OfficeIMO.Pdf.PdfRewritePreservationOptions = null optionalposition: 4
sourceFeatures System.Collections.Generic.IEnumerable{System.String} = null optionalposition: 5
public PdfDocument AttachFacturXInvoiceXml(Byte[] ciiXml, String conformanceLevel = "EN 16931", String version = "1.0", PdfAssociatedFileRelationship relationship = Data, String description = "Factur-X/ZUGFeRD invoice XML") #
Returns: PdfDocument

Adds the canonical Factur-X/ZUGFeRD CrossIndustryInvoice XML payload and matching XMP extension metadata.

Parameters

ciiXml System.Byte[] requiredposition: 0
conformanceLevel System.String = "EN 16931" optionalposition: 1
version System.String = "1.0" optionalposition: 2
relationship OfficeIMO.Pdf.PdfAssociatedFileRelationship = Data optionalposition: 3
description System.String = "Factur-X/ZUGFeRD invoice XML" optionalposition: 4
public PdfDocument AttachFacturXInvoiceXmlFile(String ciiXmlPath, String conformanceLevel = "EN 16931", String version = "1.0", PdfAssociatedFileRelationship relationship = Data, String description = "Factur-X/ZUGFeRD invoice XML") #
Returns: PdfDocument

Adds the canonical Factur-X/ZUGFeRD CrossIndustryInvoice XML file and matching XMP extension metadata.

Parameters

ciiXmlPath System.String requiredposition: 0
conformanceLevel System.String = "EN 16931" optionalposition: 1
version System.String = "1.0" optionalposition: 2
relationship OfficeIMO.Pdf.PdfAssociatedFileRelationship = Data optionalposition: 3
description System.String = "Factur-X/ZUGFeRD invoice XML" optionalposition: 4
AttachFile 2 overloads
public PdfDocument AttachFile(PdfEmbeddedFile file) #
Returns: PdfDocument

Adds an embedded file associated with the generated PDF catalog.

Parameters

file OfficeIMO.Pdf.PdfEmbeddedFile requiredposition: 0
public PdfDocument AttachFile(String fileName, Byte[] data, String mimeType = null, PdfAssociatedFileRelationship relationship = Unspecified, String description = null) #
Returns: PdfDocument

Adds an embedded file associated with the generated PDF catalog.

Parameters

fileName System.String requiredposition: 0
data System.Byte[] requiredposition: 1
mimeType System.String = null optionalposition: 2
relationship OfficeIMO.Pdf.PdfAssociatedFileRelationship = Unspecified optionalposition: 3
description System.String = null optionalposition: 4
public PdfDocument Background(Nullable<PdfColor> color) #
Returns: PdfDocument

Sets or clears the document-wide default page background color.

Parameters

color System.Nullable{OfficeIMO.Pdf.PdfColor} requiredposition: 0
public PdfDocument BackgroundBottomBand(Double height, Nullable<PdfColor> fill = null, Double insetX = 0, Double offsetY = 0, Double cornerRadius = 0, Nullable<PdfColor> stroke = null, Double strokeWidth = 0, Nullable<Double> fillOpacity = null, Nullable<Double> strokeOpacity = null, OfficeLinearGradient fillGradient = null) #
Returns: PdfDocument

Adds a document-wide default bottom page background band using the current page size.

Parameters

height System.Double requiredposition: 0
fill System.Nullable{OfficeIMO.Pdf.PdfColor} = null optionalposition: 1
insetX System.Double = 0 optionalposition: 2
offsetY System.Double = 0 optionalposition: 3
cornerRadius System.Double = 0 optionalposition: 4
stroke System.Nullable{OfficeIMO.Pdf.PdfColor} = null optionalposition: 5
strokeWidth System.Double = 0 optionalposition: 6
fillOpacity System.Nullable{System.Double} = null optionalposition: 7
strokeOpacity System.Nullable{System.Double} = null optionalposition: 8
fillGradient OfficeIMO.Drawing.OfficeLinearGradient = null optionalposition: 9
public PdfDocument BackgroundEllipse(Double x, Double y, Double width, Double height, Nullable<PdfColor> fill = null, Nullable<PdfColor> stroke = null, Double strokeWidth = 0, Nullable<Double> fillOpacity = null, Nullable<Double> strokeOpacity = null, OfficeLinearGradient fillGradient = null) #
Returns: PdfDocument

Adds a document-wide default ellipse page background shape.

Parameters

x System.Double requiredposition: 0
y System.Double requiredposition: 1
width System.Double requiredposition: 2
height System.Double requiredposition: 3
fill System.Nullable{OfficeIMO.Pdf.PdfColor} = null optionalposition: 4
stroke System.Nullable{OfficeIMO.Pdf.PdfColor} = null optionalposition: 5
strokeWidth System.Double = 0 optionalposition: 6
fillOpacity System.Nullable{System.Double} = null optionalposition: 7
strokeOpacity System.Nullable{System.Double} = null optionalposition: 8
fillGradient OfficeIMO.Drawing.OfficeLinearGradient = null optionalposition: 9
BackgroundImage 2 overloads
public PdfDocument BackgroundImage(PdfPageBackgroundImage image) #
Returns: PdfDocument

Sets or clears the document-wide default page background image.

Parameters

image OfficeIMO.Pdf.PdfPageBackgroundImage requiredposition: 0
public PdfDocument BackgroundImage(Byte[] imageBytes, OfficeImageFit fit = Cover, Nullable<Double> opacity = null) #
Returns: PdfDocument

Sets a document-wide default page background image.

Parameters

imageBytes System.Byte[] requiredposition: 0
fit OfficeIMO.Drawing.OfficeImageFit = Cover optionalposition: 1
opacity System.Nullable{System.Double} = null optionalposition: 2
public PdfDocument BackgroundLeftBand(Double width, Nullable<PdfColor> fill = null, Double insetY = 0, Double offsetX = 0, Double cornerRadius = 0, Nullable<PdfColor> stroke = null, Double strokeWidth = 0, Nullable<Double> fillOpacity = null, Nullable<Double> strokeOpacity = null, OfficeLinearGradient fillGradient = null) #
Returns: PdfDocument

Adds a document-wide default left page background band using the current page size.

Parameters

width System.Double requiredposition: 0
fill System.Nullable{OfficeIMO.Pdf.PdfColor} = null optionalposition: 1
insetY System.Double = 0 optionalposition: 2
offsetX System.Double = 0 optionalposition: 3
cornerRadius System.Double = 0 optionalposition: 4
stroke System.Nullable{OfficeIMO.Pdf.PdfColor} = null optionalposition: 5
strokeWidth System.Double = 0 optionalposition: 6
fillOpacity System.Nullable{System.Double} = null optionalposition: 7
strokeOpacity System.Nullable{System.Double} = null optionalposition: 8
fillGradient OfficeIMO.Drawing.OfficeLinearGradient = null optionalposition: 9
public PdfDocument BackgroundRectangle(Double x, Double y, Double width, Double height, Nullable<PdfColor> fill = null, Nullable<PdfColor> stroke = null, Double strokeWidth = 0, Nullable<Double> fillOpacity = null, Nullable<Double> strokeOpacity = null, OfficeLinearGradient fillGradient = null) #
Returns: PdfDocument

Adds a document-wide default rectangle page background shape.

Parameters

x System.Double requiredposition: 0
y System.Double requiredposition: 1
width System.Double requiredposition: 2
height System.Double requiredposition: 3
fill System.Nullable{OfficeIMO.Pdf.PdfColor} = null optionalposition: 4
stroke System.Nullable{OfficeIMO.Pdf.PdfColor} = null optionalposition: 5
strokeWidth System.Double = 0 optionalposition: 6
fillOpacity System.Nullable{System.Double} = null optionalposition: 7
strokeOpacity System.Nullable{System.Double} = null optionalposition: 8
fillGradient OfficeIMO.Drawing.OfficeLinearGradient = null optionalposition: 9
public PdfDocument BackgroundRightBand(Double width, Nullable<PdfColor> fill = null, Double insetY = 0, Double offsetX = 0, Double cornerRadius = 0, Nullable<PdfColor> stroke = null, Double strokeWidth = 0, Nullable<Double> fillOpacity = null, Nullable<Double> strokeOpacity = null, OfficeLinearGradient fillGradient = null) #
Returns: PdfDocument

Adds a document-wide default right page background band using the current page size.

Parameters

width System.Double requiredposition: 0
fill System.Nullable{OfficeIMO.Pdf.PdfColor} = null optionalposition: 1
insetY System.Double = 0 optionalposition: 2
offsetX System.Double = 0 optionalposition: 3
cornerRadius System.Double = 0 optionalposition: 4
stroke System.Nullable{OfficeIMO.Pdf.PdfColor} = null optionalposition: 5
strokeWidth System.Double = 0 optionalposition: 6
fillOpacity System.Nullable{System.Double} = null optionalposition: 7
strokeOpacity System.Nullable{System.Double} = null optionalposition: 8
fillGradient OfficeIMO.Drawing.OfficeLinearGradient = null optionalposition: 9
public PdfDocument BackgroundRoundedRectangle(Double x, Double y, Double width, Double height, Double cornerRadius, Nullable<PdfColor> fill = null, Nullable<PdfColor> stroke = null, Double strokeWidth = 0, Nullable<Double> fillOpacity = null, Nullable<Double> strokeOpacity = null, OfficeLinearGradient fillGradient = null) #
Returns: PdfDocument

Adds a document-wide default rounded rectangle page background shape.

Parameters

x System.Double requiredposition: 0
y System.Double requiredposition: 1
width System.Double requiredposition: 2
height System.Double requiredposition: 3
cornerRadius System.Double requiredposition: 4
fill System.Nullable{OfficeIMO.Pdf.PdfColor} = null optionalposition: 5
stroke System.Nullable{OfficeIMO.Pdf.PdfColor} = null optionalposition: 6
strokeWidth System.Double = 0 optionalposition: 7
fillOpacity System.Nullable{System.Double} = null optionalposition: 8
strokeOpacity System.Nullable{System.Double} = null optionalposition: 9
fillGradient OfficeIMO.Drawing.OfficeLinearGradient = null optionalposition: 10
public PdfDocument BackgroundShape(PdfPageBackgroundShape shape) #
Returns: PdfDocument

Adds a document-wide default page background shape rendered behind page content.

Parameters

shape OfficeIMO.Pdf.PdfPageBackgroundShape requiredposition: 0
public PdfDocument BackgroundShapes(IEnumerable<PdfPageBackgroundShape> shapes) #
Returns: PdfDocument

Replaces or clears document-wide default page background shapes.

Parameters

shapes System.Collections.Generic.IEnumerable{OfficeIMO.Pdf.PdfPageBackgroundShape} requiredposition: 0
public PdfDocument BackgroundTopBand(Double height, Nullable<PdfColor> fill = null, Double insetX = 0, Double offsetY = 0, Double cornerRadius = 0, Nullable<PdfColor> stroke = null, Double strokeWidth = 0, Nullable<Double> fillOpacity = null, Nullable<Double> strokeOpacity = null, OfficeLinearGradient fillGradient = null) #
Returns: PdfDocument

Adds a document-wide default top page background band using the current page size.

Parameters

height System.Double requiredposition: 0
fill System.Nullable{OfficeIMO.Pdf.PdfColor} = null optionalposition: 1
insetX System.Double = 0 optionalposition: 2
offsetY System.Double = 0 optionalposition: 3
cornerRadius System.Double = 0 optionalposition: 4
stroke System.Nullable{OfficeIMO.Pdf.PdfColor} = null optionalposition: 5
strokeWidth System.Double = 0 optionalposition: 6
fillOpacity System.Nullable{System.Double} = null optionalposition: 7
strokeOpacity System.Nullable{System.Double} = null optionalposition: 8
fillGradient OfficeIMO.Drawing.OfficeLinearGradient = null optionalposition: 9
public PdfDocument Bookmark(String name) #
Returns: PdfDocument

Adds a named bookmark at the current flow position.

Parameters

name System.String requiredposition: 0
public PdfDocument Bullets(IEnumerable<String> items, PdfAlign align = Left, Nullable<PdfColor> color = null, PdfListStyle style = null) #
Returns: PdfDocument

Adds a simple bullet list.

Parameters

items System.Collections.Generic.IEnumerable{System.String} requiredposition: 0
align OfficeIMO.Pdf.PdfAlign = Left optionalposition: 1
color System.Nullable{OfficeIMO.Pdf.PdfColor} = null optionalposition: 2
style OfficeIMO.Pdf.PdfListStyle = null optionalposition: 3
public PdfDocument Canvas(Action<PdfPageCanvas> build) #
Returns: PdfDocument

Adds foreground page content at absolute top-left page coordinates.

Parameters

build System.Action{OfficeIMO.Pdf.PdfPageCanvas} requiredposition: 0
public PdfDocument CatalogPageLayout(Nullable<PdfCatalogPageLayout> pageLayout) #
Returns: PdfDocument

Sets or clears the generated catalog page layout.

Parameters

pageLayout System.Nullable{OfficeIMO.Pdf.PdfCatalogPageLayout} requiredposition: 0
public PdfDocument CatalogPageMode(Nullable<PdfCatalogPageMode> pageMode) #
Returns: PdfDocument

Sets or clears the generated catalog page mode.

Parameters

pageMode System.Nullable{OfficeIMO.Pdf.PdfCatalogPageMode} requiredposition: 0
public PdfDocument CatalogUriBase(String uriBase) #
Returns: PdfDocument

Sets or clears the generated catalog URI base used by viewers to resolve relative URI actions.

Parameters

uriBase System.String requiredposition: 0
public PdfDocument CatalogView(Nullable<PdfCatalogPageMode> pageMode = null, Nullable<PdfCatalogPageLayout> pageLayout = null) #
Returns: PdfDocument

Sets generated catalog page mode and page layout viewer hints.

Parameters

pageMode System.Nullable{OfficeIMO.Pdf.PdfCatalogPageMode} = null optionalposition: 0
pageLayout System.Nullable{OfficeIMO.Pdf.PdfCatalogPageLayout} = null optionalposition: 1
public PdfDocument CheckBox(String name, Boolean isChecked = false, Double size = 14, PdfAlign align = Left, Double spacingBefore = 0, Double spacingAfter = 6, String checkedValueName = "Yes", PdfFormFieldStyle style = null) #
Returns: PdfDocument

Adds a simple AcroForm check box at the current flow position.

Parameters

name System.String requiredposition: 0
isChecked System.Boolean = false optionalposition: 1
size System.Double = 14 optionalposition: 2
align OfficeIMO.Pdf.PdfAlign = Left optionalposition: 3
spacingBefore System.Double = 0 optionalposition: 4
spacingAfter System.Double = 6 optionalposition: 5
checkedValueName System.String = "Yes" optionalposition: 6
style OfficeIMO.Pdf.PdfFormFieldStyle = null optionalposition: 7
public PdfDocument ChoiceField(String name, IEnumerable<String> options, String value = null, Double width = 180, Double height = 22, PdfAlign align = Left, Double fontSize = 10, Double spacingBefore = 0, Double spacingAfter = 6, Boolean isComboBox = true, PdfFormFieldStyle style = null) #
Returns: PdfDocument

Adds a simple AcroForm choice field at the current flow position.

Parameters

name System.String requiredposition: 0
options System.Collections.Generic.IEnumerable{System.String} requiredposition: 1
value System.String = null optionalposition: 2
width System.Double = 180 optionalposition: 3
height System.Double = 22 optionalposition: 4
align OfficeIMO.Pdf.PdfAlign = Left optionalposition: 5
fontSize System.Double = 10 optionalposition: 6
spacingBefore System.Double = 0 optionalposition: 7
spacingAfter System.Double = 6 optionalposition: 8
isComboBox System.Boolean = true optionalposition: 9
style OfficeIMO.Pdf.PdfFormFieldStyle = null optionalposition: 10
public PdfDocument ClearBackgroundShapes() #
Returns: PdfDocument

Clears document-wide default page background shapes.

public PdfDocument Columns(Action<PdfItemCompose> compose, PdfMultiColumnOptions options = null) #
Returns: PdfDocument

Flows common block content across equal-width columns in reading order.

Parameters

compose System.Action{OfficeIMO.Pdf.PdfItemCompose} requiredposition: 0
options OfficeIMO.Pdf.PdfMultiColumnOptions = null optionalposition: 1
CompareVisual 2 overloads
public PdfVisualComparisonReport CompareVisual(Byte[] actualPdf, PdfPageSelection selection = null, PdfVisualComparisonOptions options = null, PdfReadOptions actualReadOptions = null) #
Returns: PdfVisualComparisonReport

Compares this document with another PDF through the managed renderer and returns review artifacts.

Parameters

actualPdf System.Byte[] requiredposition: 0
selection OfficeIMO.Pdf.PdfPageSelection = null optionalposition: 1
options OfficeIMO.Pdf.PdfVisualComparisonOptions = null optionalposition: 2
actualReadOptions OfficeIMO.Pdf.PdfReadOptions = null optionalposition: 3
public PdfVisualComparisonReport CompareVisual(PdfDocument actualDocument, PdfPageSelection selection = null, PdfVisualComparisonOptions options = null) #
Returns: PdfVisualComparisonReport

Compares this document with another fluent PDF through the managed renderer.

Parameters

actualDocument OfficeIMO.Pdf.PdfDocument requiredposition: 0
selection OfficeIMO.Pdf.PdfPageSelection = null optionalposition: 1
options OfficeIMO.Pdf.PdfVisualComparisonOptions = null optionalposition: 2
public PdfDocument CompleteExternalSignature(Byte[] signatureContents) #
Returns: PdfDocument

Completes a persisted external-signature placeholder with detached CMS or timestamp bytes.

Parameters

signatureContents System.Byte[] requiredposition: 0
public PdfDocument Compliance(PdfComplianceProfile profile) #
Returns: PdfDocument

Requests a generated-PDF compliance profile for this document.

Parameters

profile OfficeIMO.Pdf.PdfComplianceProfile requiredposition: 0
Component 2 overloads
public PdfDocument Component(IPdfComponent component, PdfFlowOptions options = null, PdfLayoutPositionCapture capture = null) #
Returns: PdfDocument

Adds a reusable typed component through the canonical flow engine, with optional layout constraints and position capture.

Parameters

component OfficeIMO.Pdf.IPdfComponent requiredposition: 0
options OfficeIMO.Pdf.PdfFlowOptions = null optionalposition: 1
capture OfficeIMO.Pdf.PdfLayoutPositionCapture = null optionalposition: 2
public PdfDocument Component(IPdfContextComponent component, PdfFlowOptions options = null, PdfLayoutPositionCapture capture = null) #
Returns: PdfDocument

Adds a reusable page-aware component through the existing deferred-flow replay path.

Parameters

component OfficeIMO.Pdf.IPdfContextComponent requiredposition: 0
options OfficeIMO.Pdf.PdfFlowOptions = null optionalposition: 1
capture OfficeIMO.Pdf.PdfLayoutPositionCapture = null optionalposition: 2
public PdfDocument Compose(Action<PdfCompose> compose) #
Returns: PdfDocument

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.PdfCompose} requiredposition: 0
public PdfDocument ConfigureElectronicInvoiceGroundwork(PdfComplianceProfile profile, Byte[] ciiXml, String conformanceLevel = "EN 16931", String version = "1.0", PdfAssociatedFileRelationship relationship = Data, String description = "Factur-X/ZUGFeRD invoice XML") #
Returns: PdfDocument

Configures common PDF/A-3 e-invoice groundwork for Factur-X or ZUGFeRD without enabling formal compliance profile generation.

Parameters

profile OfficeIMO.Pdf.PdfComplianceProfile requiredposition: 0
ciiXml System.Byte[] requiredposition: 1
conformanceLevel System.String = "EN 16931" optionalposition: 2
version System.String = "1.0" optionalposition: 3
relationship OfficeIMO.Pdf.PdfAssociatedFileRelationship = Data optionalposition: 4
description System.String = "Factur-X/ZUGFeRD invoice XML" optionalposition: 5
public PdfDocument ConfigureElectronicInvoiceGroundworkFile(PdfComplianceProfile profile, String ciiXmlPath, String conformanceLevel = "EN 16931", String version = "1.0", PdfAssociatedFileRelationship relationship = Data, String description = "Factur-X/ZUGFeRD invoice XML") #
Returns: PdfDocument

Configures common PDF/A-3 e-invoice groundwork for Factur-X or ZUGFeRD from a CrossIndustryInvoice XML file.

Parameters

profile OfficeIMO.Pdf.PdfComplianceProfile requiredposition: 0
ciiXmlPath System.String requiredposition: 1
conformanceLevel System.String = "EN 16931" optionalposition: 2
version System.String = "1.0" optionalposition: 3
relationship OfficeIMO.Pdf.PdfAssociatedFileRelationship = Data optionalposition: 4
description System.String = "Factur-X/ZUGFeRD invoice XML" optionalposition: 5
public PdfDocument ConfigureFacturXGroundwork(Byte[] ciiXml, String conformanceLevel = "EN 16931", String version = "1.0", PdfAssociatedFileRelationship relationship = Data, String description = "Factur-X/ZUGFeRD invoice XML") #
Returns: PdfDocument

Configures common PDF/A-3 Factur-X/ZUGFeRD groundwork without enabling formal compliance profile generation.

Parameters

ciiXml System.Byte[] requiredposition: 0
conformanceLevel System.String = "EN 16931" optionalposition: 1
version System.String = "1.0" optionalposition: 2
relationship OfficeIMO.Pdf.PdfAssociatedFileRelationship = Data optionalposition: 3
description System.String = "Factur-X/ZUGFeRD invoice XML" optionalposition: 4
public PdfDocument ConfigureFacturXGroundworkFile(String ciiXmlPath, String conformanceLevel = "EN 16931", String version = "1.0", PdfAssociatedFileRelationship relationship = Data, String description = "Factur-X/ZUGFeRD invoice XML") #
Returns: PdfDocument

Configures common PDF/A-3 Factur-X/ZUGFeRD groundwork from a CrossIndustryInvoice XML file.

Parameters

ciiXmlPath System.String requiredposition: 0
conformanceLevel System.String = "EN 16931" optionalposition: 1
version System.String = "1.0" optionalposition: 2
relationship OfficeIMO.Pdf.PdfAssociatedFileRelationship = Data optionalposition: 3
description System.String = "Factur-X/ZUGFeRD invoice XML" optionalposition: 4
public PdfDocument ConfigurePdfAGroundwork(PdfComplianceProfile profile, String language = "en-US") #
Returns: PdfDocument

Configures common PDF/A-2, PDF/A-3, or PDF/A-4 groundwork without enabling formal compliance profile generation.

Parameters

profile OfficeIMO.Pdf.PdfComplianceProfile requiredposition: 0
language System.String = "en-US" optionalposition: 1
ConfigurePdfUaGroundwork 2 overloads
public PdfDocument ConfigurePdfUaGroundwork(String language = "en-US") #
Returns: PdfDocument

Configures common PDF/UA-1 groundwork without enabling formal compliance profile generation.

Parameters

language System.String = "en-US" optionalposition: 0
public PdfDocument ConfigurePdfUaGroundwork(PdfComplianceProfile profile, String language = "en-US") #
Returns: PdfDocument

Configures common PDF/UA-1 or PDF/UA-2 groundwork without enabling formal compliance profile generation.

Parameters

profile OfficeIMO.Pdf.PdfComplianceProfile requiredposition: 0
language System.String = "en-US" optionalposition: 1
public PdfDocument Container(Action<PdfItemCompose> compose, PanelStyle style = null) #
Returns: PdfDocument

Groups common flow blocks inside a padded, styled, one-page container.

Parameters

compose System.Action{OfficeIMO.Pdf.PdfItemCompose} requiredposition: 0
style OfficeIMO.Pdf.PanelStyle = null optionalposition: 1
public static PdfDocument Create(PdfOptions options = null) #
Returns: PdfDocument

Creates a new, empty PDF document with optional options.

Parameters

options OfficeIMO.Pdf.PdfOptions = null optionalposition: 0
Page size, margins and default font options. When null, sensible defaults are used.

Returns

New PdfDocument instance.

CreateComplianceArtifact 2 overloads
public PdfComplianceArtifact CreateComplianceArtifact() #
Returns: PdfComplianceArtifact

Atomically renders or snapshots this document with readiness evidence for its configured compliance profile.

public PdfComplianceArtifact CreateComplianceArtifact(PdfComplianceProfile profile) #
Returns: PdfComplianceArtifact

Atomically 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 requiredposition: 0
public PdfDebuggerReport Debug(PdfDebuggerOptions options = null, PdfReadOptions readOptions = null) #
Returns: PdfDebuggerReport

Creates a bounded debugger projection of objects, revisions, pages, resources, and content operators.

Parameters

options OfficeIMO.Pdf.PdfDebuggerOptions = null optionalposition: 0
readOptions OfficeIMO.Pdf.PdfReadOptions = null optionalposition: 1
public PdfSecurityMutationResult Decrypt(String ownerPassword) #
Returns: PdfSecurityMutationResult

Removes Standard password security using the current owner password and returns preservation proof.

Parameters

ownerPassword System.String requiredposition: 0
public PdfDocument DefaultDrawingStyle(PdfDrawingStyle style) #
Returns: PdfDocument

Sets the document-wide default placement style for OfficeIMO.Drawing-backed flow objects.

Parameters

style OfficeIMO.Pdf.PdfDrawingStyle requiredposition: 0
public PdfDocument DefaultHeadingStyle(Int32 level, PdfHeadingStyle style) #
Returns: PdfDocument

Sets the document-wide default style for a built-in heading level.

Parameters

level System.Int32 requiredposition: 0
style OfficeIMO.Pdf.PdfHeadingStyle requiredposition: 1
public PdfDocument DefaultHorizontalRuleStyle(PdfHorizontalRuleStyle style) #
Returns: PdfDocument

Sets the document-wide default style for horizontal rules.

Parameters

style OfficeIMO.Pdf.PdfHorizontalRuleStyle requiredposition: 0
public PdfDocument DefaultImageStyle(PdfImageStyle style) #
Returns: PdfDocument

Sets the document-wide default image placement style.

Parameters

style OfficeIMO.Pdf.PdfImageStyle requiredposition: 0
public PdfDocument DefaultListStyle(PdfListStyle style) #
Returns: PdfDocument

Sets the document-wide default style for bullet and numbered lists.

Parameters

style OfficeIMO.Pdf.PdfListStyle requiredposition: 0
public PdfDocument DefaultPanelStyle(PanelStyle style) #
Returns: PdfDocument

Sets the document-wide default style for panel paragraphs.

Parameters

style OfficeIMO.Pdf.PanelStyle requiredposition: 0
public PdfDocument DefaultParagraphStyle(PdfParagraphStyle style) #
Returns: PdfDocument

Sets the document-wide default paragraph style used by paragraphs that do not provide an explicit style.

Parameters

style OfficeIMO.Pdf.PdfParagraphStyle requiredposition: 0
public PdfDocument DefaultRowStyle(PdfRowStyle style) #
Returns: PdfDocument

Sets the document-wide default row/column layout style.

Parameters

style OfficeIMO.Pdf.PdfRowStyle requiredposition: 0
DefaultTableStyle 2 overloads
public PdfDocument DefaultTableStyle(PdfTableStyle style) #
Returns: PdfDocument

Sets the document-wide default table style used by tables that do not provide an explicit style.

Parameters

style OfficeIMO.Pdf.PdfTableStyle requiredposition: 0
public PdfDocument DefaultTableStyle(String wordTableStyleName) #
Returns: PdfDocument

Sets the document-wide default table style from a supported Word table style name.

Parameters

wordTableStyleName System.String requiredposition: 0
DefaultTextStyle 2 overloads
public PdfDocument DefaultTextStyle(Action<PdfTextStyleCompose> style) #
Returns: PdfDocument

Sets document-wide default text styling used by following page-flow content.

Parameters

style System.Action{OfficeIMO.Pdf.PdfTextStyleCompose} requiredposition: 0
public PdfDocument DefaultTextStyle(PdfTextStyle style) #
Returns: PdfDocument

Sets document-wide default text styling from a reusable text style object.

Parameters

style OfficeIMO.Pdf.PdfTextStyle requiredposition: 0
public PdfDocument Deferred(Func<PdfFlowContext, Action<PdfItemCompose>> composeFactory, PdfFlowOptions options = null, PdfLayoutPositionCapture capture = null) #
Returns: PdfDocument

Adds replayable content materialized from the live page context. Identical contexts are reused across layout stabilization passes.

Parameters

composeFactory System.Func{OfficeIMO.Pdf.PdfFlowContext,System.Action{OfficeIMO.Pdf.PdfItemCompose}} requiredposition: 0
options OfficeIMO.Pdf.PdfFlowOptions = null optionalposition: 1
capture OfficeIMO.Pdf.PdfLayoutPositionCapture = null optionalposition: 2
public PdfDiagnosticReport Diagnostics(PdfReadOptions options = null) #
Returns: PdfDiagnosticReport

Builds a combined PDF diagnostic report for this document.

Parameters

options OfficeIMO.Pdf.PdfReadOptions = null optionalposition: 0
public PdfDocument Drawing(OfficeDrawing drawing, Nullable<PdfAlign> align = null, Nullable<Double> spacingBefore = null, Nullable<Double> spacingAfter = null, PdfDrawingStyle style = null, String linkUri = null, String linkContents = null) #
Returns: PdfDocument

Adds a shared OfficeIMO.Drawing scene at the current flow position.

Parameters

drawing OfficeIMO.Drawing.OfficeDrawing requiredposition: 0
align System.Nullable{OfficeIMO.Pdf.PdfAlign} = null optionalposition: 1
spacingBefore System.Nullable{System.Double} = null optionalposition: 2
spacingAfter System.Nullable{System.Double} = null optionalposition: 3
style OfficeIMO.Pdf.PdfDrawingStyle = null optionalposition: 4
linkUri System.String = null optionalposition: 5
linkContents System.String = null optionalposition: 6
ElectronicInvoiceMetadata 2 overloads
public PdfDocument ElectronicInvoiceMetadata(PdfElectronicInvoiceMetadata metadata) #
Returns: PdfDocument

Sets Factur-X/ZUGFeRD XMP extension metadata. This does not by itself certify e-invoice conformance.

Parameters

metadata OfficeIMO.Pdf.PdfElectronicInvoiceMetadata requiredposition: 0
public PdfDocument ElectronicInvoiceMetadata(String conformanceLevel, String version = "1.0") #
Returns: PdfDocument

Sets Factur-X/ZUGFeRD XMP extension metadata. This does not by itself certify e-invoice conformance.

Parameters

conformanceLevel System.String requiredposition: 0
version System.String = "1.0" optionalposition: 1
public PdfDocument Ellipse(Double width, Double height, Nullable<PdfColor> strokeColor = null, Double strokeWidth = 1, Nullable<PdfColor> fillColor = null, Nullable<PdfAlign> align = null, Nullable<Double> spacingBefore = null, Nullable<Double> spacingAfter = null, OfficeStrokeDashStyle strokeDashStyle = Solid, Nullable<OfficeStrokeLineCap> strokeLineCap = null, Nullable<OfficeStrokeLineJoin> strokeLineJoin = null, PdfDrawingStyle style = null, String linkUri = null, String linkContents = null) #
Returns: PdfDocument

Adds a flow ellipse using the shared OfficeIMO.Drawing shape descriptor.

Parameters

width System.Double requiredposition: 0
height System.Double requiredposition: 1
strokeColor System.Nullable{OfficeIMO.Pdf.PdfColor} = null optionalposition: 2
strokeWidth System.Double = 1 optionalposition: 3
fillColor System.Nullable{OfficeIMO.Pdf.PdfColor} = null optionalposition: 4
align System.Nullable{OfficeIMO.Pdf.PdfAlign} = null optionalposition: 5
spacingBefore System.Nullable{System.Double} = null optionalposition: 6
spacingAfter System.Nullable{System.Double} = null optionalposition: 7
strokeDashStyle OfficeIMO.Drawing.OfficeStrokeDashStyle = Solid optionalposition: 8
strokeLineCap System.Nullable{OfficeIMO.Drawing.OfficeStrokeLineCap} = null optionalposition: 9
strokeLineJoin System.Nullable{OfficeIMO.Drawing.OfficeStrokeLineJoin} = null optionalposition: 10
style OfficeIMO.Pdf.PdfDrawingStyle = null optionalposition: 11
linkUri System.String = null optionalposition: 12
linkContents System.String = null optionalposition: 13
EmbedStandardFont 2 overloads
public PdfDocument EmbedStandardFont(PdfStandardFont font, Byte[] data, String fontName = null) #
Returns: PdfDocument

Embeds a TrueType font file for a generated standard-font slot in this document.

Parameters

font OfficeIMO.Pdf.PdfStandardFont requiredposition: 0
data System.Byte[] requiredposition: 1
fontName System.String = null optionalposition: 2
public PdfDocument EmbedStandardFont(PdfStandardFont font, String path, String fontName = null) #
Returns: PdfDocument

Embeds a TrueType font file from disk for a generated standard-font slot in this document.

Parameters

font OfficeIMO.Pdf.PdfStandardFont requiredposition: 0
path System.String requiredposition: 1
fontName System.String = null optionalposition: 2
public PdfSecurityMutationResult Encrypt(PdfStandardEncryptionOptions encryption) #
Returns: PdfSecurityMutationResult

Encrypts this unencrypted PDF and returns the rewritten document with preservation proof.

Parameters

encryption OfficeIMO.Pdf.PdfStandardEncryptionOptions requiredposition: 0
Encryption 2 overloads
public PdfDocument Encryption(PdfStandardEncryptionOptions encryption) #
Returns: PdfDocument

Sets or clears Standard password security for generated PDF output.

Parameters

encryption OfficeIMO.Pdf.PdfStandardEncryptionOptions requiredposition: 0
public PdfDocument Encryption(String userPassword, String ownerPassword = null, Int32 permissions = -4) #
Returns: PdfDocument

Sets Standard password security for generated PDF output.

Parameters

userPassword System.String requiredposition: 0
ownerPassword System.String = null optionalposition: 1
permissions System.Int32 = -4 optionalposition: 2
public PdfDocument FileVersion(PdfFileVersion version) #
Returns: PdfDocument

Sets the generated PDF file header version.

Parameters

version OfficeIMO.Pdf.PdfFileVersion requiredposition: 0
public PdfDocument FlattenVisualAnnotations() #
Returns: PdfDocument

Creates a new PDF with visual annotation appearance streams painted into page content where supported.

public PdfDocument Flow(Action<PdfItemCompose> compose, PdfFlowOptions options = null, PdfLayoutPositionCapture capture = null) #
Returns: PdfDocument

Adds a nested flow group with optional constraints and position capture.

Parameters

compose System.Action{OfficeIMO.Pdf.PdfItemCompose} requiredposition: 0
options OfficeIMO.Pdf.PdfFlowOptions = null optionalposition: 1
capture OfficeIMO.Pdf.PdfLayoutPositionCapture = null optionalposition: 2
public PdfDocument FreeTextAnnotation(String contents, Double width, Double height, Nullable<PdfAlign> align = null, Nullable<Double> spacingBefore = null, Nullable<Double> spacingAfter = null, Double fontSize = 10, Nullable<PdfColor> textColor = null, Nullable<PdfColor> borderColor = null, Double borderWidth = 1, Nullable<PdfColor> fillColor = null, PdfAlign textAlign = Left, Double padding = 3, Nullable<Double> lineHeight = null) #
Returns: PdfDocument

Adds a PDF free-text annotation at the current flow position.

Parameters

contents System.String requiredposition: 0
width System.Double requiredposition: 1
height System.Double requiredposition: 2
align System.Nullable{OfficeIMO.Pdf.PdfAlign} = null optionalposition: 3
spacingBefore System.Nullable{System.Double} = null optionalposition: 4
spacingAfter System.Nullable{System.Double} = null optionalposition: 5
fontSize System.Double = 10 optionalposition: 6
textColor System.Nullable{OfficeIMO.Pdf.PdfColor} = null optionalposition: 7
borderColor System.Nullable{OfficeIMO.Pdf.PdfColor} = null optionalposition: 8
borderWidth System.Double = 1 optionalposition: 9
fillColor System.Nullable{OfficeIMO.Pdf.PdfColor} = null optionalposition: 10
textAlign OfficeIMO.Pdf.PdfAlign = Left optionalposition: 11
padding System.Double = 3 optionalposition: 12
lineHeight System.Nullable{System.Double} = null optionalposition: 13
public PdfDocument H1(String text, PdfAlign align = Left, Nullable<PdfColor> color = null, String linkUri = null, PdfHeadingStyle style = null, String linkContents = null, String linkDestinationName = null) #
Returns: PdfDocument

Adds a level-1 heading.

Parameters

text System.String requiredposition: 0
align OfficeIMO.Pdf.PdfAlign = Left optionalposition: 1
color System.Nullable{OfficeIMO.Pdf.PdfColor} = null optionalposition: 2
linkUri System.String = null optionalposition: 3
style OfficeIMO.Pdf.PdfHeadingStyle = null optionalposition: 4
linkContents System.String = null optionalposition: 5
linkDestinationName System.String = null optionalposition: 6
public PdfDocument H2(String text, PdfAlign align = Left, Nullable<PdfColor> color = null, String linkUri = null, PdfHeadingStyle style = null, String linkContents = null, String linkDestinationName = null) #
Returns: PdfDocument

Adds a level-2 heading.

Parameters

text System.String requiredposition: 0
align OfficeIMO.Pdf.PdfAlign = Left optionalposition: 1
color System.Nullable{OfficeIMO.Pdf.PdfColor} = null optionalposition: 2
linkUri System.String = null optionalposition: 3
style OfficeIMO.Pdf.PdfHeadingStyle = null optionalposition: 4
linkContents System.String = null optionalposition: 5
linkDestinationName System.String = null optionalposition: 6
public PdfDocument H3(String text, PdfAlign align = Left, Nullable<PdfColor> color = null, String linkUri = null, PdfHeadingStyle style = null, String linkContents = null, String linkDestinationName = null) #
Returns: PdfDocument

Adds a level-3 heading.

Parameters

text System.String requiredposition: 0
align OfficeIMO.Pdf.PdfAlign = Left optionalposition: 1
color System.Nullable{OfficeIMO.Pdf.PdfColor} = null optionalposition: 2
linkUri System.String = null optionalposition: 3
style OfficeIMO.Pdf.PdfHeadingStyle = null optionalposition: 4
linkContents System.String = null optionalposition: 5
linkDestinationName System.String = null optionalposition: 6
public PdfDocument Header(Action<PdfHeaderCompose> build) #
Returns: PdfDocument

Defines the document-wide default header layout and content.

Parameters

build System.Action{OfficeIMO.Pdf.PdfHeaderCompose} requiredposition: 0
public PdfDocument HighlightAnnotation(String contents, Double width, Double height, Nullable<PdfAlign> align = null, Nullable<Double> spacingBefore = null, Nullable<Double> spacingAfter = null, Nullable<PdfColor> color = null) #
Returns: PdfDocument

Adds a PDF highlight annotation rectangle at the current flow position.

Parameters

contents System.String requiredposition: 0
width System.Double requiredposition: 1
height System.Double requiredposition: 2
align System.Nullable{OfficeIMO.Pdf.PdfAlign} = null optionalposition: 3
spacingBefore System.Nullable{System.Double} = null optionalposition: 4
spacingAfter System.Nullable{System.Double} = null optionalposition: 5
color System.Nullable{OfficeIMO.Pdf.PdfColor} = null optionalposition: 6
public PdfDocument HR(Nullable<Double> thickness = null, Nullable<PdfColor> color = null, Nullable<Double> spacingBefore = null, Nullable<Double> spacingAfter = null, PdfHorizontalRuleStyle style = null) #
Returns: PdfDocument

Adds a horizontal rule (line) spanning the content width.

Parameters

thickness System.Nullable{System.Double} = null optionalposition: 0
color System.Nullable{OfficeIMO.Pdf.PdfColor} = null optionalposition: 1
spacingBefore System.Nullable{System.Double} = null optionalposition: 2
spacingAfter System.Nullable{System.Double} = null optionalposition: 3
style OfficeIMO.Pdf.PdfHorizontalRuleStyle = null optionalposition: 4
Image 3 overloads
public PdfDocument Image(Byte[] jpegBytes, Double width, Double height, Nullable<PdfAlign> align = null, OfficeClipPath clipPath = null, Nullable<OfficeImageFit> fit = null, Nullable<Double> spacingBefore = null, Nullable<Double> spacingAfter = null, PdfImageStyle style = null, String linkUri = null, String linkContents = null) #
Returns: PdfDocument

Adds a raster image supported by OfficeIMO.Drawing at the current flow position.

Parameters

jpegBytes System.Byte[] requiredposition: 0
width System.Double requiredposition: 1
height System.Double requiredposition: 2
align System.Nullable{OfficeIMO.Pdf.PdfAlign} = null optionalposition: 3
clipPath OfficeIMO.Drawing.OfficeClipPath = null optionalposition: 4
fit System.Nullable{OfficeIMO.Drawing.OfficeImageFit} = null optionalposition: 5
spacingBefore System.Nullable{System.Double} = null optionalposition: 6
spacingAfter System.Nullable{System.Double} = null optionalposition: 7
style OfficeIMO.Pdf.PdfImageStyle = null optionalposition: 8
linkUri System.String = null optionalposition: 9
linkContents System.String = null optionalposition: 10
public PdfDocument Image(Byte[] jpegBytes, Double width, Double height, String alternativeText) #
Returns: PdfDocument

Adds a supported meaningful image at the current flow position with alternate text.

Parameters

jpegBytes System.Byte[] requiredposition: 0
width System.Double requiredposition: 1
height System.Double requiredposition: 2
alternativeText System.String requiredposition: 3
public PdfDocument Image(Byte[] jpegBytes, Double width, Double height, Nullable<PdfAlign> align, OfficeClipPath clipPath, Nullable<OfficeImageFit> fit, Nullable<Double> spacingBefore, Nullable<Double> spacingAfter, PdfImageStyle style, String linkUri, String linkContents, String alternativeText) #
Returns: PdfDocument

Adds a raster image supported by OfficeIMO.Drawing at the current flow position.

Parameters

jpegBytes System.Byte[] requiredposition: 0
width System.Double requiredposition: 1
height System.Double requiredposition: 2
align System.Nullable{OfficeIMO.Pdf.PdfAlign} requiredposition: 3
clipPath OfficeIMO.Drawing.OfficeClipPath requiredposition: 4
fit System.Nullable{OfficeIMO.Drawing.OfficeImageFit} requiredposition: 5
spacingBefore System.Nullable{System.Double} requiredposition: 6
spacingAfter System.Nullable{System.Double} requiredposition: 7
style OfficeIMO.Pdf.PdfImageStyle requiredposition: 8
linkUri System.String requiredposition: 9
linkContents System.String requiredposition: 10
alternativeText System.String requiredposition: 11
ImageWatermark 2 overloads
public PdfDocument ImageWatermark(PdfImageWatermark watermark) #
Returns: PdfDocument

Sets or clears the document-wide default image watermark rendered behind page content.

Parameters

watermark OfficeIMO.Pdf.PdfImageWatermark requiredposition: 0
public PdfDocument ImageWatermark(Byte[] imageBytes, Double width, Double height, Nullable<Double> opacity = null, Nullable<Double> rotationAngle = null) #
Returns: PdfDocument

Sets a document-wide default image watermark rendered behind page content.

Parameters

imageBytes System.Byte[] requiredposition: 0
width System.Double requiredposition: 1
height System.Double requiredposition: 2
opacity System.Nullable{System.Double} = null optionalposition: 3
rotationAngle System.Nullable{System.Double} = null optionalposition: 4
public PdfDocumentInfo Inspect(PdfReadOptions options = null) #
Returns: PdfDocumentInfo

Inspects metadata, pages, annotations, fields, and catalog-level state.

Parameters

options OfficeIMO.Pdf.PdfReadOptions = null optionalposition: 0
KeyValueTable 2 overloads
public PdfDocument KeyValueTable(IEnumerable<KeyValuePair<String, String>> rows, PdfAlign align = Left, PdfTableStyle style = null, Boolean includeHeader = false, String keyHeader = "Key", String valueHeader = "Value") #
Returns: PdfDocument

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{System.String,System.String}} requiredposition: 0
Plain text label/value rows.
align OfficeIMO.Pdf.PdfAlign = Left optionalposition: 1
Table alignment in the document flow.
style OfficeIMO.Pdf.PdfTableStyle = null optionalposition: 2
Optional table style. The style is cloned before header-row settings are applied.
includeHeader System.Boolean = false optionalposition: 3
When true, emits a header row before the supplied values.
keyHeader System.String = "Key" optionalposition: 4
Header text for the label column.
valueHeader System.String = "Value" optionalposition: 5
Header text for the value column.
public PdfDocument KeyValueTable(IEnumerable<PdfKeyValueRow> rows, PdfAlign align = Left, PdfTableStyle style = null, Boolean includeHeader = false, String keyHeader = "Key", String valueHeader = "Value") #
Returns: PdfDocument

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} requiredposition: 0
Rich text label/value rows.
align OfficeIMO.Pdf.PdfAlign = Left optionalposition: 1
Table alignment in the document flow.
style OfficeIMO.Pdf.PdfTableStyle = null optionalposition: 2
Optional table style. The style is cloned before header-row settings are applied.
includeHeader System.Boolean = false optionalposition: 3
When true, emits a header row before the supplied values.
keyHeader System.String = "Key" optionalposition: 4
Header text for the label column.
valueHeader System.String = "Value" optionalposition: 5
Header text for the value column.
public PdfDocument Landscape() #
Returns: PdfDocument

Sets the document-wide default page orientation to landscape.

public PdfDocument Language(String language) #
Returns: PdfDocument

Sets or clears the generated catalog document language, for example "en-US".

Parameters

language System.String requiredposition: 0
public PdfDocument Layer(String name, Action<PdfItemCompose> compose, PdfLayerOptions options = null) #
Returns: PdfDocument

Adds flow content controlled by a generated PDF optional-content layer.

Parameters

name System.String requiredposition: 0
compose System.Action{OfficeIMO.Pdf.PdfItemCompose} requiredposition: 1
options OfficeIMO.Pdf.PdfLayerOptions = null optionalposition: 2
public PdfDocument Line(Double x1, Double y1, Double x2, Double y2, Nullable<PdfColor> strokeColor = null, Double strokeWidth = 1, Nullable<PdfAlign> align = null, Nullable<Double> spacingBefore = null, Nullable<Double> spacingAfter = null, OfficeStrokeDashStyle strokeDashStyle = Solid, Nullable<OfficeStrokeLineCap> strokeLineCap = null, Nullable<OfficeStrokeLineJoin> strokeLineJoin = null, PdfDrawingStyle style = null, String linkUri = null, String linkContents = null) #
Returns: PdfDocument

Adds a flow line using the shared OfficeIMO.Drawing shape descriptor.

Parameters

x1 System.Double requiredposition: 0
y1 System.Double requiredposition: 1
x2 System.Double requiredposition: 2
y2 System.Double requiredposition: 3
strokeColor System.Nullable{OfficeIMO.Pdf.PdfColor} = null optionalposition: 4
strokeWidth System.Double = 1 optionalposition: 5
align System.Nullable{OfficeIMO.Pdf.PdfAlign} = null optionalposition: 6
spacingBefore System.Nullable{System.Double} = null optionalposition: 7
spacingAfter System.Nullable{System.Double} = null optionalposition: 8
strokeDashStyle OfficeIMO.Drawing.OfficeStrokeDashStyle = Solid optionalposition: 9
strokeLineCap System.Nullable{OfficeIMO.Drawing.OfficeStrokeLineCap} = null optionalposition: 10
strokeLineJoin System.Nullable{OfficeIMO.Drawing.OfficeStrokeLineJoin} = null optionalposition: 11
style OfficeIMO.Pdf.PdfDrawingStyle = null optionalposition: 12
linkUri System.String = null optionalposition: 13
linkContents System.String = null optionalposition: 14
Margin 3 overloads
public PdfDocument Margin(Double all) #
Returns: PdfDocument

Sets uniform document-wide default page margins in points.

Parameters

all System.Double requiredposition: 0
public PdfDocument Margin(PageMargins margins) #
Returns: PdfDocument

Sets document-wide default page margins from a reusable margin value.

Parameters

margins OfficeIMO.Pdf.PageMargins requiredposition: 0
public PdfDocument Margin(Double left, Double top, Double right, Double bottom) #
Returns: PdfDocument

Sets document-wide default page margins in points.

Parameters

left System.Double requiredposition: 0
top System.Double requiredposition: 1
right System.Double requiredposition: 2
bottom System.Double requiredposition: 3
Merge 2 overloads
public static PdfDocument Merge(params PdfDocument[] documents) #
Returns: PdfDocument

Creates one PDF by merging all supplied documents in order through a single merge pass.

Parameters

documents OfficeIMO.Pdf.PdfDocument[] requiredposition: 0
public static PdfDocument Merge(IEnumerable<PdfDocument> documents) #
Returns: PdfDocument

Creates one PDF by merging all supplied documents in order through a single merge pass.

Parameters

documents System.Collections.Generic.IEnumerable{OfficeIMO.Pdf.PdfDocument} requiredposition: 0
MergeWith 5 overloads
public PdfDocument MergeWith(PdfDocument document, PdfMergeOptions options) #
Returns: PdfDocument

Merges this PDF with another loaded or generated PDF using an explicit structure policy.

Parameters

document OfficeIMO.Pdf.PdfDocument requiredposition: 0
options OfficeIMO.Pdf.PdfMergeOptions requiredposition: 1
public PdfDocument MergeWith(PdfDocument document) #
Returns: PdfDocument

Creates a new PDF by merging this PDF with another loaded or generated PDF.

Parameters

document OfficeIMO.Pdf.PdfDocument requiredposition: 0
public PdfDocument MergeWith(Byte[] pdf) #
Returns: PdfDocument

Creates a new PDF by merging this PDF with another PDF byte payload.

Parameters

pdf System.Byte[] requiredposition: 0
public PdfDocument MergeWith(String path) #
Returns: PdfDocument

Creates a new PDF by merging this PDF with another PDF file.

Parameters

path System.String requiredposition: 0
public PdfDocument MergeWith(Stream stream) #
Returns: PdfDocument

Creates a new PDF by merging this PDF with another readable PDF stream.

Parameters

stream System.IO.Stream requiredposition: 0
MergeWithReport 2 overloads
public static PdfMergeResult MergeWithReport(PdfMergeOptions options, params PdfDocument[] documents) #
Returns: PdfMergeResult

Merges loaded or generated documents with an explicit structure policy and returns readback evidence.

Parameters

options OfficeIMO.Pdf.PdfMergeOptions requiredposition: 0
documents OfficeIMO.Pdf.PdfDocument[] requiredposition: 1
public static PdfMergeResult MergeWithReport(PdfMergeOptions options, IEnumerable<PdfDocument> documents) #
Returns: PdfMergeResult

Merges loaded or generated documents with an explicit structure policy and returns readback evidence.

Parameters

options OfficeIMO.Pdf.PdfMergeOptions requiredposition: 0
documents System.Collections.Generic.IEnumerable{OfficeIMO.Pdf.PdfDocument} requiredposition: 1
public PdfDocument Meta(String title = null, String author = null, String subject = null, String keywords = null) #
Returns: PdfDocument

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 System.String = null optionalposition: 0
Document title metadata.
author System.String = null optionalposition: 1
Document author metadata.
subject System.String = null optionalposition: 2
Document subject metadata.
keywords System.String = null optionalposition: 3
Document keywords metadata.

Returns

This PdfDocument for chaining.

public PdfDocument MultiSelectChoiceField(String name, IEnumerable<String> options, IEnumerable<String> values = null, Double width = 180, Double height = 72, PdfAlign align = Left, Double fontSize = 10, Double spacingBefore = 0, Double spacingAfter = 6, PdfFormFieldStyle style = null) #
Returns: PdfDocument

Adds a simple AcroForm multi-select choice field at the current flow position.

Parameters

name System.String requiredposition: 0
options System.Collections.Generic.IEnumerable{System.String} requiredposition: 1
values System.Collections.Generic.IEnumerable{System.String} = null optionalposition: 2
width System.Double = 180 optionalposition: 3
height System.Double = 72 optionalposition: 4
align OfficeIMO.Pdf.PdfAlign = Left optionalposition: 5
fontSize System.Double = 10 optionalposition: 6
spacingBefore System.Double = 0 optionalposition: 7
spacingAfter System.Double = 6 optionalposition: 8
style OfficeIMO.Pdf.PdfFormFieldStyle = null optionalposition: 9
public PdfDocument Numbered(IEnumerable<String> items, PdfAlign align = Left, Nullable<PdfColor> color = null, Int32 startNumber = 1, PdfListStyle style = null) #
Returns: PdfDocument

Adds a simple numbered list.

Parameters

items System.Collections.Generic.IEnumerable{System.String} requiredposition: 0
align OfficeIMO.Pdf.PdfAlign = Left optionalposition: 1
color System.Nullable{OfficeIMO.Pdf.PdfColor} = null optionalposition: 2
startNumber System.Int32 = 1 optionalposition: 3
style OfficeIMO.Pdf.PdfListStyle = null optionalposition: 4
Open 3 overloads
public static PdfDocument Open(Byte[] pdf, PdfReadOptions readOptions = null) #
Returns: PdfDocument

Opens an existing PDF from bytes and snapshots the caller-owned input once.

Parameters

pdf System.Byte[] requiredposition: 0
readOptions OfficeIMO.Pdf.PdfReadOptions = null optionalposition: 1
public static PdfDocument Open(String path, PdfReadOptions readOptions = null) #
Returns: PdfDocument

Opens an existing PDF from a bounded file snapshot.

Parameters

path System.String requiredposition: 0
readOptions OfficeIMO.Pdf.PdfReadOptions = null optionalposition: 1
public static PdfDocument Open(Stream stream, PdfReadOptions readOptions = null) #
Returns: PdfDocument

Opens a complete PDF from a readable stream. Seekable streams are read from the beginning and restored.

Parameters

stream System.IO.Stream requiredposition: 0
readOptions OfficeIMO.Pdf.PdfReadOptions = null optionalposition: 1
public PdfDocument OpenAction(Int32 pageNumber = 1, Nullable<Double> destinationTop = null, PdfOpenActionDestinationMode destinationMode = Xyz, Nullable<Double> destinationLeft = null, Nullable<Double> destinationBottom = null, Nullable<Double> destinationRight = null) #
Returns: PdfDocument

Sets the generated catalog open action to a page destination.

Parameters

pageNumber System.Int32 = 1 optionalposition: 0
destinationTop System.Nullable{System.Double} = null optionalposition: 1
destinationMode OfficeIMO.Pdf.PdfOpenActionDestinationMode = Xyz optionalposition: 2
destinationLeft System.Nullable{System.Double} = null optionalposition: 3
destinationBottom System.Nullable{System.Double} = null optionalposition: 4
destinationRight System.Nullable{System.Double} = null optionalposition: 5
OpenAsync 2 overloads
public static async Task<PdfDocument> OpenAsync(String path, PdfReadOptions readOptions = null, CancellationToken cancellationToken = null) #
Returns: Task<PdfDocument>

Asynchronously opens an existing PDF from a bounded file snapshot.

Parameters

path System.String requiredposition: 0
readOptions OfficeIMO.Pdf.PdfReadOptions = null optionalposition: 1
cancellationToken System.Threading.CancellationToken = null optionalposition: 2
public static async Task<PdfDocument> OpenAsync(Stream stream, PdfReadOptions readOptions = null, CancellationToken cancellationToken = null) #
Returns: Task<PdfDocument>

Asynchronously opens a complete PDF from a readable caller-owned stream.

Parameters

stream System.IO.Stream requiredposition: 0
readOptions OfficeIMO.Pdf.PdfReadOptions = null optionalposition: 1
cancellationToken System.Threading.CancellationToken = null optionalposition: 2
Optimize 2 overloads
public PdfOptimizationActionResult Optimize(PdfOptimizationOptions options = null) #
Returns: PdfOptimizationActionResult

Applies dependency-free lossless optimization and returns the candidate with action and preservation reports.

Parameters

options OfficeIMO.Pdf.PdfOptimizationOptions = null optionalposition: 0
public PdfOptimizationActionResult Optimize(PdfOptimizationProfile profile) #
Returns: PdfOptimizationActionResult

Applies a named deterministic lossless optimization profile.

Parameters

profile OfficeIMO.Pdf.PdfOptimizationProfile requiredposition: 0
public PdfDocument Orientation(PdfPageOrientation orientation) #
Returns: PdfDocument

Sets the document-wide default page orientation while preserving the current page size dimensions.

Parameters

orientation OfficeIMO.Pdf.PdfPageOrientation requiredposition: 0
OutputIntent 5 overloads
public PdfDocument OutputIntent(PdfOutputIntent outputIntent) #
Returns: PdfDocument

Sets or clears the generated catalog output intent.

Parameters

outputIntent OfficeIMO.Pdf.PdfOutputIntent requiredposition: 0
public PdfDocument OutputIntent(Byte[] iccProfile) #
Returns: PdfDocument

Sets a generated catalog output intent from ICC profile bytes using the default sRGB output condition identifier.

Parameters

iccProfile System.Byte[] requiredposition: 0
public PdfDocument OutputIntent(Byte[] iccProfile, String outputConditionIdentifier) #
Returns: PdfDocument

Sets a generated catalog output intent from ICC profile bytes.

Parameters

iccProfile System.Byte[] requiredposition: 0
outputConditionIdentifier System.String requiredposition: 1
public PdfDocument OutputIntent(Byte[] iccProfile, PdfOutputIntentPolicy policy) #
Returns: PdfDocument

Sets a generated catalog output intent from ICC profile bytes using the default sRGB output condition identifier.

Parameters

iccProfile System.Byte[] requiredposition: 0
policy OfficeIMO.Pdf.PdfOutputIntentPolicy requiredposition: 1
public PdfDocument OutputIntent(Byte[] iccProfile, String outputConditionIdentifier, PdfOutputIntentPolicy policy) #
Returns: PdfDocument

Sets a generated catalog output intent from ICC profile bytes.

Parameters

iccProfile System.Byte[] requiredposition: 0
outputConditionIdentifier System.String requiredposition: 1
policy OfficeIMO.Pdf.PdfOutputIntentPolicy requiredposition: 2
public PdfDocument Page(Action<PdfPageCompose> configure) #
Returns: PdfDocument

Configures a page-scoped flow with its own page setup and default styles.

Parameters

configure System.Action{OfficeIMO.Pdf.PdfPageCompose} requiredposition: 0
PageBorder 2 overloads
public PdfDocument PageBorder(PdfPageBorder border) #
Returns: PdfDocument

Sets or clears the document-wide default page border.

Parameters

border OfficeIMO.Pdf.PdfPageBorder requiredposition: 0
public PdfDocument PageBorder(Nullable<PdfColor> color = null, Nullable<Double> width = null, Nullable<Double> inset = null, Nullable<Double> opacity = null, OfficeStrokeDashStyle dashStyle = Solid) #
Returns: PdfDocument

Sets a document-wide default page border.

Parameters

color System.Nullable{OfficeIMO.Pdf.PdfColor} = null optionalposition: 0
width System.Nullable{System.Double} = null optionalposition: 1
inset System.Nullable{System.Double} = null optionalposition: 2
opacity System.Nullable{System.Double} = null optionalposition: 3
dashStyle OfficeIMO.Drawing.OfficeStrokeDashStyle = Solid optionalposition: 4
public PdfDocument PageBreak() #
Returns: PdfDocument

Inserts a page break.

public PdfDocument PageLabelRange(Int32 startPageNumber, PdfPageNumberStyle style, Int32 startNumber = 1, String prefix = null) #
Returns: PdfDocument

Adds a generated catalog page-label rule beginning at the specified one-based document page.

Parameters

startPageNumber System.Int32 requiredposition: 0
style OfficeIMO.Pdf.PdfPageNumberStyle requiredposition: 1
startNumber System.Int32 = 1 optionalposition: 2
prefix System.String = null optionalposition: 3
PageLabels 2 overloads
public PdfDocument PageLabels(String prefix = null) #
Returns: PdfDocument

Enables generated catalog page labels that match the configured page-number style and start number.

Parameters

prefix System.String = null optionalposition: 0
public PdfDocument PageLabels(Boolean include, String prefix = null) #
Returns: PdfDocument

Enables or disables generated catalog page labels.

Parameters

include System.Boolean requiredposition: 0
prefix System.String = null optionalposition: 1
public PdfDocument PageNumberStart(Int32 start) #
Returns: PdfDocument

Sets the first visible page number for the document-wide flow.

Parameters

start System.Int32 requiredposition: 0
public PdfDocument PageNumberStyle(PdfPageNumberStyle style) #
Returns: PdfDocument

Sets the document-wide visible page-number style for header/footer tokens.

Parameters

style OfficeIMO.Pdf.PdfPageNumberStyle requiredposition: 0
public PdfDocument Panel(Action<PdfItemCompose> compose, PanelStyle style = null, PdfAlign align = Left, Nullable<PdfColor> defaultColor = null) #
Returns: PdfDocument

Adds a styled panel from common flow blocks such as paragraphs, headings, lists, simple tables, rules, and nested panel paragraphs.

Parameters

compose System.Action{OfficeIMO.Pdf.PdfItemCompose} requiredposition: 0
style OfficeIMO.Pdf.PanelStyle = null optionalposition: 1
align OfficeIMO.Pdf.PdfAlign = Left optionalposition: 2
defaultColor System.Nullable{OfficeIMO.Pdf.PdfColor} = null optionalposition: 3
public PdfDocument PanelParagraph(Action<PdfParagraphBuilder> compose, PanelStyle style = null, PdfAlign align = Left, Nullable<PdfColor> defaultColor = null) #
Returns: PdfDocument

Adds a paragraph inside a simple panel (background + optional border).

Parameters

compose System.Action{OfficeIMO.Pdf.PdfParagraphBuilder} requiredposition: 0
style OfficeIMO.Pdf.PanelStyle = null optionalposition: 1
align OfficeIMO.Pdf.PdfAlign = Left optionalposition: 2
defaultColor System.Nullable{OfficeIMO.Pdf.PdfColor} = null optionalposition: 3
public PdfDocument Paragraph(Action<PdfParagraphBuilder> compose, PdfAlign align = Left, Nullable<PdfColor> defaultColor = null, PdfParagraphStyle style = null) #
Returns: PdfDocument

Fluent paragraph builder in the style of OfficeIMO.Word. Example: Paragraph(p => p.Color(PdfColor.Gray).Text("You can ").Bold("mix ").Italic("styles"));

Parameters

compose System.Action{OfficeIMO.Pdf.PdfParagraphBuilder} requiredposition: 0
align OfficeIMO.Pdf.PdfAlign = Left optionalposition: 1
defaultColor System.Nullable{OfficeIMO.Pdf.PdfColor} = null optionalposition: 2
style OfficeIMO.Pdf.PdfParagraphStyle = null optionalposition: 3
public PdfDocument Path(IEnumerable<OfficePathCommand> commands, Nullable<PdfColor> strokeColor = null, Double strokeWidth = 1, Nullable<PdfColor> fillColor = null, Nullable<PdfAlign> align = null, Nullable<Double> spacingBefore = null, Nullable<Double> spacingAfter = null, OfficeStrokeDashStyle strokeDashStyle = Solid, Nullable<OfficeStrokeLineCap> strokeLineCap = null, Nullable<OfficeStrokeLineJoin> strokeLineJoin = null, PdfDrawingStyle style = null, String linkUri = null, String linkContents = null) #
Returns: PdfDocument

Adds a flow path using the shared OfficeIMO.Drawing shape descriptor.

Parameters

commands System.Collections.Generic.IEnumerable{OfficeIMO.Drawing.OfficePathCommand} requiredposition: 0
strokeColor System.Nullable{OfficeIMO.Pdf.PdfColor} = null optionalposition: 1
strokeWidth System.Double = 1 optionalposition: 2
fillColor System.Nullable{OfficeIMO.Pdf.PdfColor} = null optionalposition: 3
align System.Nullable{OfficeIMO.Pdf.PdfAlign} = null optionalposition: 4
spacingBefore System.Nullable{System.Double} = null optionalposition: 5
spacingAfter System.Nullable{System.Double} = null optionalposition: 6
strokeDashStyle OfficeIMO.Drawing.OfficeStrokeDashStyle = Solid optionalposition: 7
strokeLineCap System.Nullable{OfficeIMO.Drawing.OfficeStrokeLineCap} = null optionalposition: 8
strokeLineJoin System.Nullable{OfficeIMO.Drawing.OfficeStrokeLineJoin} = null optionalposition: 9
style OfficeIMO.Pdf.PdfDrawingStyle = null optionalposition: 10
linkUri System.String = null optionalposition: 11
linkContents System.String = null optionalposition: 12
PdfAIdentification 2 overloads
public PdfDocument PdfAIdentification(PdfAIdentification identification) #
Returns: PdfDocument

Sets PDF/A XMP identification metadata. This does not by itself certify PDF/A conformance.

Parameters

identification OfficeIMO.Pdf.PdfAIdentification requiredposition: 0
public PdfDocument PdfAIdentification(Int32 part, String conformance) #
Returns: PdfDocument

Sets PDF/A XMP identification metadata. This does not by itself certify PDF/A conformance.

Parameters

part System.Int32 requiredposition: 0
conformance System.String requiredposition: 1
PdfUaIdentification 2 overloads
public PdfDocument PdfUaIdentification(PdfUaIdentification identification) #
Returns: PdfDocument

Sets PDF/UA XMP identification metadata. This does not by itself certify PDF/UA conformance.

Parameters

identification OfficeIMO.Pdf.PdfUaIdentification requiredposition: 0
public PdfDocument PdfUaIdentification(Int32 part = 1) #
Returns: PdfDocument

Sets PDF/UA XMP identification metadata. This does not by itself certify PDF/UA conformance.

Parameters

part System.Int32 = 1 optionalposition: 0
public PdfMutationPlan PlanMutation(PdfMutationOperation operation, IEnumerable<String> fieldNames = null, PdfReadOptions options = null, PdfMutationExecutionPreference executionPreference = Automatic) #
Returns: PdfMutationPlan

Chooses a full-rewrite, append-only, or blocked path for an existing-document mutation.

Parameters

operation OfficeIMO.Pdf.PdfMutationOperation requiredposition: 0
fieldNames System.Collections.Generic.IEnumerable{System.String} = null optionalposition: 1
options OfficeIMO.Pdf.PdfReadOptions = null optionalposition: 2
executionPreference OfficeIMO.Pdf.PdfMutationExecutionPreference = Automatic optionalposition: 3
public PdfRedactionPlan PlanRedactions(IEnumerable<PdfRedactionArea> areas, PdfTextLayoutOptions layoutOptions = null, PdfReadOptions options = null) #
Returns: PdfRedactionPlan

Plans rectangle-based redaction impact without modifying the PDF.

Parameters

areas System.Collections.Generic.IEnumerable{OfficeIMO.Pdf.PdfRedactionArea} requiredposition: 0
layoutOptions OfficeIMO.Pdf.PdfTextLayoutOptions = null optionalposition: 1
options OfficeIMO.Pdf.PdfReadOptions = null optionalposition: 2
public PdfDocument Polygon(IEnumerable<OfficePoint> points, Nullable<PdfColor> strokeColor = null, Double strokeWidth = 1, Nullable<PdfColor> fillColor = null, Nullable<PdfAlign> align = null, Nullable<Double> spacingBefore = null, Nullable<Double> spacingAfter = null, OfficeStrokeDashStyle strokeDashStyle = Solid, Nullable<OfficeStrokeLineCap> strokeLineCap = null, Nullable<OfficeStrokeLineJoin> strokeLineJoin = null, PdfDrawingStyle style = null, String linkUri = null, String linkContents = null) #
Returns: PdfDocument

Adds a flow polygon using the shared OfficeIMO.Drawing shape descriptor.

Parameters

points System.Collections.Generic.IEnumerable{OfficeIMO.Drawing.OfficePoint} requiredposition: 0
strokeColor System.Nullable{OfficeIMO.Pdf.PdfColor} = null optionalposition: 1
strokeWidth System.Double = 1 optionalposition: 2
fillColor System.Nullable{OfficeIMO.Pdf.PdfColor} = null optionalposition: 3
align System.Nullable{OfficeIMO.Pdf.PdfAlign} = null optionalposition: 4
spacingBefore System.Nullable{System.Double} = null optionalposition: 5
spacingAfter System.Nullable{System.Double} = null optionalposition: 6
strokeDashStyle OfficeIMO.Drawing.OfficeStrokeDashStyle = Solid optionalposition: 7
strokeLineCap System.Nullable{OfficeIMO.Drawing.OfficeStrokeLineCap} = null optionalposition: 8
strokeLineJoin System.Nullable{OfficeIMO.Drawing.OfficeStrokeLineJoin} = null optionalposition: 9
style OfficeIMO.Pdf.PdfDrawingStyle = null optionalposition: 10
linkUri System.String = null optionalposition: 11
linkContents System.String = null optionalposition: 12
public PdfDocument Portrait() #
Returns: PdfDocument

Sets the document-wide default page orientation to portrait.

Preflight 4 overloads
public static PdfDocumentPreflight Preflight(Byte[] pdf, PdfReadOptions options = null) #
Returns: PdfDocumentPreflight

Reports 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[] requiredposition: 0
options OfficeIMO.Pdf.PdfReadOptions = null optionalposition: 1
public static PdfDocumentPreflight Preflight(String path, PdfReadOptions options = null) #
Returns: PdfDocumentPreflight

Reports 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 requiredposition: 0
options OfficeIMO.Pdf.PdfReadOptions = null optionalposition: 1
public static PdfDocumentPreflight Preflight(Stream stream, PdfReadOptions options = null) #
Returns: PdfDocumentPreflight

Reports 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 requiredposition: 0
options OfficeIMO.Pdf.PdfReadOptions = null optionalposition: 1
public PdfDocumentPreflight Preflight(PdfReadOptions options = null) #
Returns: PdfDocumentPreflight

Reports read and rewrite capabilities for this PDF.

Parameters

options OfficeIMO.Pdf.PdfReadOptions = null optionalposition: 0
public PdfExternalSignaturePreparation PrepareExternalSignature(PdfExternalSignatureOptions signatureOptions = null) #
Returns: PdfExternalSignaturePreparation

Appends an external-signature placeholder as an incremental revision for a later CMS, CAdES, or timestamp signature.

Parameters

signatureOptions OfficeIMO.Pdf.PdfExternalSignatureOptions = null optionalposition: 0
public PdfDocument RadioButtonGroup(String name, IEnumerable<String> options, String value = null, Double size = 14, Double gap = 6, PdfAlign align = Left, Double spacingBefore = 0, Double spacingAfter = 6, PdfFormFieldStyle style = null) #
Returns: PdfDocument

Adds a simple AcroForm radio button group at the current flow position.

Parameters

name System.String requiredposition: 0
options System.Collections.Generic.IEnumerable{System.String} requiredposition: 1
value System.String = null optionalposition: 2
size System.Double = 14 optionalposition: 3
gap System.Double = 6 optionalposition: 4
align OfficeIMO.Pdf.PdfAlign = Left optionalposition: 5
spacingBefore System.Double = 0 optionalposition: 6
spacingAfter System.Double = 6 optionalposition: 7
style OfficeIMO.Pdf.PdfFormFieldStyle = null optionalposition: 8
public PdfDocument Rectangle(Double width, Double height, Nullable<PdfColor> strokeColor = null, Double strokeWidth = 1, Nullable<PdfColor> fillColor = null, Nullable<PdfAlign> align = null, Nullable<Double> spacingBefore = null, Nullable<Double> spacingAfter = null, OfficeStrokeDashStyle strokeDashStyle = Solid, Nullable<OfficeStrokeLineCap> strokeLineCap = null, Nullable<OfficeStrokeLineJoin> strokeLineJoin = null, PdfDrawingStyle style = null, String linkUri = null, String linkContents = null) #
Returns: PdfDocument

Adds a flow rectangle using the shared OfficeIMO.Drawing shape descriptor.

Parameters

width System.Double requiredposition: 0
height System.Double requiredposition: 1
strokeColor System.Nullable{OfficeIMO.Pdf.PdfColor} = null optionalposition: 2
strokeWidth System.Double = 1 optionalposition: 3
fillColor System.Nullable{OfficeIMO.Pdf.PdfColor} = null optionalposition: 4
align System.Nullable{OfficeIMO.Pdf.PdfAlign} = null optionalposition: 5
spacingBefore System.Nullable{System.Double} = null optionalposition: 6
spacingAfter System.Nullable{System.Double} = null optionalposition: 7
strokeDashStyle OfficeIMO.Drawing.OfficeStrokeDashStyle = Solid optionalposition: 8
strokeLineCap System.Nullable{OfficeIMO.Drawing.OfficeStrokeLineCap} = null optionalposition: 9
strokeLineJoin System.Nullable{OfficeIMO.Drawing.OfficeStrokeLineJoin} = null optionalposition: 10
style OfficeIMO.Pdf.PdfDrawingStyle = null optionalposition: 11
linkUri System.String = null optionalposition: 12
linkContents System.String = null optionalposition: 13
public PdfSecurityMutationResult Reencrypt(String currentOwnerPassword, PdfStandardEncryptionOptions newEncryption) #
Returns: PdfSecurityMutationResult

Replaces Standard password security using the current owner password and returns preservation proof.

Parameters

currentOwnerPassword System.String requiredposition: 0
newEncryption OfficeIMO.Pdf.PdfStandardEncryptionOptions requiredposition: 1
public PdfDocument RegisterEmbeddedFontFallbacks(PdfEmbeddedFontFallbackSet fallbackSet) #
Returns: PdfDocument

Registers a planned embedded-font fallback set for generated rich text runs.

Parameters

fallbackSet OfficeIMO.Pdf.PdfEmbeddedFontFallbackSet requiredposition: 0
public PdfDocument ReplaceMetadata(PdfMetadata metadata) #
Returns: PdfDocument

Creates a new PDF with exactly the supplied metadata.

Parameters

metadata OfficeIMO.Pdf.PdfMetadata requiredposition: 0
public PdfDocument RichBullets(IEnumerable<PdfListItem> items, PdfAlign align = Left, Nullable<PdfColor> color = null, PdfListStyle style = null) #
Returns: PdfDocument

Adds a bullet list whose items can contain rich inline text runs.

Parameters

items System.Collections.Generic.IEnumerable{OfficeIMO.Pdf.PdfListItem} requiredposition: 0
align OfficeIMO.Pdf.PdfAlign = Left optionalposition: 1
color System.Nullable{OfficeIMO.Pdf.PdfColor} = null optionalposition: 2
style OfficeIMO.Pdf.PdfListStyle = null optionalposition: 3
public PdfDocument RichNumbered(IEnumerable<PdfListItem> items, PdfAlign align = Left, Nullable<PdfColor> color = null, Int32 startNumber = 1, PdfListStyle style = null) #
Returns: PdfDocument

Adds a numbered list whose items can contain rich inline text runs.

Parameters

items System.Collections.Generic.IEnumerable{OfficeIMO.Pdf.PdfListItem} requiredposition: 0
align OfficeIMO.Pdf.PdfAlign = Left optionalposition: 1
color System.Nullable{OfficeIMO.Pdf.PdfColor} = null optionalposition: 2
startNumber System.Int32 = 1 optionalposition: 3
style OfficeIMO.Pdf.PdfListStyle = null optionalposition: 4
public PdfDocument RoundedRectangle(Double width, Double height, Double cornerRadius, Nullable<PdfColor> strokeColor = null, Double strokeWidth = 1, Nullable<PdfColor> fillColor = null, Nullable<PdfAlign> align = null, Nullable<Double> spacingBefore = null, Nullable<Double> spacingAfter = null, OfficeStrokeDashStyle strokeDashStyle = Solid, Nullable<OfficeStrokeLineCap> strokeLineCap = null, Nullable<OfficeStrokeLineJoin> strokeLineJoin = null, PdfDrawingStyle style = null, String linkUri = null, String linkContents = null) #
Returns: PdfDocument

Adds a flow rounded rectangle using the shared OfficeIMO.Drawing shape descriptor.

Parameters

width System.Double requiredposition: 0
height System.Double requiredposition: 1
cornerRadius System.Double requiredposition: 2
strokeColor System.Nullable{OfficeIMO.Pdf.PdfColor} = null optionalposition: 3
strokeWidth System.Double = 1 optionalposition: 4
fillColor System.Nullable{OfficeIMO.Pdf.PdfColor} = null optionalposition: 5
align System.Nullable{OfficeIMO.Pdf.PdfAlign} = null optionalposition: 6
spacingBefore System.Nullable{System.Double} = null optionalposition: 7
spacingAfter System.Nullable{System.Double} = null optionalposition: 8
strokeDashStyle OfficeIMO.Drawing.OfficeStrokeDashStyle = Solid optionalposition: 9
strokeLineCap System.Nullable{OfficeIMO.Drawing.OfficeStrokeLineCap} = null optionalposition: 10
strokeLineJoin System.Nullable{OfficeIMO.Drawing.OfficeStrokeLineJoin} = null optionalposition: 11
style OfficeIMO.Pdf.PdfDrawingStyle = null optionalposition: 12
linkUri System.String = null optionalposition: 13
linkContents System.String = null optionalposition: 14
public PdfDocument Row(Action<PdfRowCompose> build) #
Returns: PdfDocument

Adds a row with percentage-based columns to the current document flow.

Parameters

build System.Action{OfficeIMO.Pdf.PdfRowCompose} requiredposition: 0
Row builder that defines column widths, layout rhythm, and column content.

Returns

This PdfDocument for chaining.

Examples


PdfDocument.Create()
    .Row(row => row
        .Gap(16)
        .Column(35, column => column.H2("Signals").Bullets(new[] { "Healthy", "Watch", "Needs action" }))
        .Column(65, column => column.Panel("Right-side report callout.")))
    .Save("report.pdf");
            
public PdfSanitizationResult Sanitize(PdfSanitizationOptions options = null) #
Returns: PdfSanitizationResult

Removes or quarantines active content and embedded payloads through a proven full rewrite.

Parameters

options OfficeIMO.Pdf.PdfSanitizationOptions = null optionalposition: 0
Save 2 overloads
public PdfSaveResult Save(Stream stream) #
Returns: PdfSaveResult

Writes the complete document to stream. Seekable streams are overwritten and rewound.

Parameters

stream System.IO.Stream requiredposition: 0
Writable destination stream.
public PdfSaveResult Save(String path) #
Returns: PdfSaveResult

Saves the document to path. Creates the directory if needed.

Parameters

path System.String requiredposition: 0
Destination file path, e.g. "C:\\Docs\\Report.pdf".
SaveAsync 2 overloads
public async Task<PdfSaveResult> SaveAsync(Stream stream, CancellationToken cancellationToken = null) #
Returns: Task<PdfSaveResult>

Asynchronously writes the complete document to stream. Seekable streams are overwritten and rewound.

Parameters

stream System.IO.Stream requiredposition: 0
cancellationToken System.Threading.CancellationToken = null optionalposition: 1
public async Task<PdfSaveResult> SaveAsync(String path, CancellationToken cancellationToken = null) #
Returns: Task<PdfSaveResult>

Asynchronously saves the document to path.

Parameters

path System.String requiredposition: 0
cancellationToken System.Threading.CancellationToken = null optionalposition: 1
public PdfRedactionPlan SearchRedactions(PdfRedactionSearchOptions search, PdfTextLayoutOptions layoutOptions = null, PdfReadOptions options = null) #
Returns: PdfRedactionPlan

Derives a reviewable redaction plan from literal text, regex, logical kinds, and form-field names.

Parameters

search OfficeIMO.Pdf.PdfRedactionSearchOptions requiredposition: 0
layoutOptions OfficeIMO.Pdf.PdfTextLayoutOptions = null optionalposition: 1
options OfficeIMO.Pdf.PdfReadOptions = null optionalposition: 2
Section 2 overloads
public PdfDocument Section(String title, Action<PdfItemCompose> compose, PdfSectionOptions options = null) #
Returns: PdfDocument

Adds a semantic section backed by an outline entry and named destination.

Parameters

title System.String requiredposition: 0
compose System.Action{OfficeIMO.Pdf.PdfItemCompose} requiredposition: 1
options OfficeIMO.Pdf.PdfSectionOptions = null optionalposition: 2
public PdfDocument Section(Action<PdfPageCompose> configure) #
Returns: PdfDocument

Configures a section-scoped flow with its own page setup and default styles.

Parameters

configure System.Action{OfficeIMO.Pdf.PdfPageCompose} requiredposition: 0
public PdfDocument Shape(OfficeShape shape, Nullable<PdfAlign> align = null, Nullable<Double> spacingBefore = null, Nullable<Double> spacingAfter = null, PdfDrawingStyle style = null, String linkUri = null, String linkContents = null) #
Returns: PdfDocument

Adds a shared OfficeIMO.Drawing shape at the current flow position.

Parameters

shape OfficeIMO.Drawing.OfficeShape requiredposition: 0
align System.Nullable{OfficeIMO.Pdf.PdfAlign} = null optionalposition: 1
spacingBefore System.Nullable{System.Double} = null optionalposition: 2
spacingAfter System.Nullable{System.Double} = null optionalposition: 3
style OfficeIMO.Pdf.PdfDrawingStyle = null optionalposition: 4
linkUri System.String = null optionalposition: 5
linkContents System.String = null optionalposition: 6
public PdfExternalSignatureCompletion SignExternal(IPdfExternalSigner signer, PdfExternalSignatureOptions signatureOptions = null) #
Returns: PdfExternalSignatureCompletion

Prepares, externally signs, and applies a PDF signature without placing key-storage logic in OfficeIMO.Pdf.

Parameters

signer OfficeIMO.Pdf.IPdfExternalSigner requiredposition: 0
signatureOptions OfficeIMO.Pdf.PdfExternalSignatureOptions = null optionalposition: 1
Size 2 overloads
public PdfDocument Size(PageSize size) #
Returns: PdfDocument

Sets the document-wide default page size used by top-level flow and composed pages.

Parameters

size OfficeIMO.Pdf.PageSize requiredposition: 0
public PdfDocument Size(Double width, Double height) #
Returns: PdfDocument

Sets the document-wide default page size in points.

Parameters

width System.Double requiredposition: 0
height System.Double requiredposition: 1
public PdfDocument Spacer(Double height) #
Returns: PdfDocument

Adds invisible vertical space to the current document flow.

Parameters

height System.Double requiredposition: 0
public PdfDocument SrgbOutputIntent() #
Returns: PdfDocument

Sets the generated catalog output intent to OfficeIMO's built-in sRGB IEC61966-2.1 ICC profile.

public PdfDocument SynchronizeMetadata(String title = null, String author = null, String subject = null, String keywords = null, Boolean createXmpMetadata = true) #
Returns: PdfDocument

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 System.String = null optionalposition: 0
author System.String = null optionalposition: 1
subject System.String = null optionalposition: 2
keywords System.String = null optionalposition: 3
createXmpMetadata System.Boolean = true optionalposition: 4
Table 2 overloads
public PdfDocument Table(IEnumerable<String[]> rows, PdfAlign align = Left, PdfTableStyle style = null) #
Returns: PdfDocument

Adds a simple table from rows of string arrays.

Parameters

rows System.Collections.Generic.IEnumerable{System.String[]} requiredposition: 0
align OfficeIMO.Pdf.PdfAlign = Left optionalposition: 1
style OfficeIMO.Pdf.PdfTableStyle = null optionalposition: 2
public PdfDocument Table(IEnumerable<PdfTableCell[]> rows, PdfAlign align = Left, PdfTableStyle style = null) #
Returns: PdfDocument

Adds a table from explicit cells, including optional column spans.

Parameters

rows System.Collections.Generic.IEnumerable{OfficeIMO.Pdf.PdfTableCell[]} requiredposition: 0
align OfficeIMO.Pdf.PdfAlign = Left optionalposition: 1
style OfficeIMO.Pdf.PdfTableStyle = null optionalposition: 2
TableDeferred 2 overloads
public PdfDocument TableDeferred(Func<IEnumerable<String[]>> rowFactory, Int32 batchSize = 256, PdfAlign align = Left, PdfTableStyle style = null) #
Returns: PdfDocument

Adds a replayable plain-text table whose rows are enumerated and laid out in bounded batches.

Parameters

rowFactory System.Func{System.Collections.Generic.IEnumerable{System.String[]}} requiredposition: 0
Factory that returns a fresh sequence of table rows for each render pass.
batchSize System.Int32 = 256 optionalposition: 1
Maximum number of body rows materialized for one layout batch.
align OfficeIMO.Pdf.PdfAlign = Left optionalposition: 2
Table alignment in the document flow.
style OfficeIMO.Pdf.PdfTableStyle = null optionalposition: 3
Optional table style.
public PdfDocument TableDeferred(Func<IEnumerable<PdfTableCell[]>> rowFactory, Int32 batchSize = 256, PdfAlign align = Left, PdfTableStyle style = null) #
Returns: PdfDocument

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[]}} requiredposition: 0
Factory that returns a fresh sequence of rich table rows for each render pass.
batchSize System.Int32 = 256 optionalposition: 1
Maximum number of body rows materialized for one layout batch.
align OfficeIMO.Pdf.PdfAlign = Left optionalposition: 2
Table alignment in the document flow.
style OfficeIMO.Pdf.PdfTableStyle = null optionalposition: 3
Optional table style.
public PdfDocument TableOfContents(PdfTableOfContentsOptions options = null) #
Returns: PdfDocument

Adds an automatically generated, internally linked table of contents.

Parameters

options OfficeIMO.Pdf.PdfTableOfContentsOptions = null optionalposition: 0
public PdfDocument TaggedPdfCatalogMarkers() #
Returns: PdfDocument

Emits catalog-level tagged-PDF markers without claiming full tagged-content generation.

public PdfDocument TaggedStructure(PdfTaggedStructureMode mode) #
Returns: PdfDocument

Sets the generated tagged-PDF groundwork mode.

Parameters

mode OfficeIMO.Pdf.PdfTaggedStructureMode requiredposition: 0
public PdfDocument TextAnnotation(String contents, Double width = 18, Double height = 18, Nullable<PdfAlign> align = null, Nullable<Double> spacingBefore = null, Nullable<Double> spacingAfter = null, PdfTextAnnotationIcon icon = Comment, Nullable<PdfColor> color = null, Boolean open = false) #
Returns: PdfDocument

Adds a PDF text annotation at the current flow position.

Parameters

contents System.String requiredposition: 0
width System.Double = 18 optionalposition: 1
height System.Double = 18 optionalposition: 2
align System.Nullable{OfficeIMO.Pdf.PdfAlign} = null optionalposition: 3
spacingBefore System.Nullable{System.Double} = null optionalposition: 4
spacingAfter System.Nullable{System.Double} = null optionalposition: 5
icon OfficeIMO.Pdf.PdfTextAnnotationIcon = Comment optionalposition: 6
color System.Nullable{OfficeIMO.Pdf.PdfColor} = null optionalposition: 7
open System.Boolean = false optionalposition: 8
public PdfDocument TextField(String name, Double width = 180, Double height = 22, String value = "", PdfAlign align = Left, Double fontSize = 10, Double spacingBefore = 0, Double spacingAfter = 6, PdfFormFieldStyle style = null) #
Returns: PdfDocument

Adds a simple AcroForm text field at the current flow position.

Parameters

name System.String requiredposition: 0
width System.Double = 180 optionalposition: 1
height System.Double = 22 optionalposition: 2
value System.String = "" optionalposition: 3
align OfficeIMO.Pdf.PdfAlign = Left optionalposition: 4
fontSize System.Double = 10 optionalposition: 5
spacingBefore System.Double = 0 optionalposition: 6
spacingAfter System.Double = 6 optionalposition: 7
style OfficeIMO.Pdf.PdfFormFieldStyle = null optionalposition: 8
public PdfDocument TextHyphenation(PdfTextHyphenationCallback callback) #
Returns: PdfDocument

Sets or clears the generated text hyphenation callback used for long unspaced tokens.

Parameters

callback OfficeIMO.Pdf.PdfTextHyphenationCallback requiredposition: 0
public PdfDocument TextHyphenationDictionary(PdfHyphenationLexicon dictionary) #
Returns: PdfDocument

Uses or clears an immutable first-party word hyphenation dictionary.

Parameters

dictionary OfficeIMO.Pdf.PdfHyphenationLexicon requiredposition: 0
public PdfDocument TextLineBreaks(Func<String, IReadOnlyList<Int32>> callback) #
Returns: PdfDocument

Sets or clears the generated text line-break callback used for long unspaced tokens.

Parameters

callback System.Func{System.String,System.Collections.Generic.IReadOnlyList{System.Int32}} requiredposition: 0
public PdfDocument Theme(PdfTheme theme) #
Returns: PdfDocument

Applies reusable document-wide default styles.

Parameters

theme OfficeIMO.Pdf.PdfTheme requiredposition: 0
public Byte[] ToBytes() #
Returns: Byte[]

Renders the document into a PDF byte array in memory.

public MemoryStream ToStream() #
Returns: MemoryStream

Renders 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, PdfReadOptions options = null, Boolean createXmpMetadata = false) #
Returns: PdfOperationResult<PdfDocument>

Attempts to append a metadata-only incremental revision, returning diagnostics when blocked or failed.

Parameters

title System.String = null optionalposition: 0
author System.String = null optionalposition: 1
subject System.String = null optionalposition: 2
keywords System.String = null optionalposition: 3
options OfficeIMO.Pdf.PdfReadOptions = null optionalposition: 4
createXmpMetadata System.Boolean = false optionalposition: 5
public PdfOperationResult<PdfDocument> TryApplyRedactions(IEnumerable<PdfRedactionArea> areas, PdfRedactionApplyOptions applyOptions = null, PdfTextLayoutOptions layoutOptions = null, PdfReadOptions options = null) #
Returns: PdfOperationResult<PdfDocument>

Attempts to apply rectangle-based redactions, returning diagnostics when blocked or failed.

Parameters

areas System.Collections.Generic.IEnumerable{OfficeIMO.Pdf.PdfRedactionArea} requiredposition: 0
applyOptions OfficeIMO.Pdf.PdfRedactionApplyOptions = null optionalposition: 1
layoutOptions OfficeIMO.Pdf.PdfTextLayoutOptions = null optionalposition: 2
options OfficeIMO.Pdf.PdfReadOptions = null optionalposition: 3
public PdfOperationResult<PdfSecurityMutationResult> TryDecrypt(String ownerPassword) #
Returns: PdfOperationResult<PdfSecurityMutationResult>

Attempts to remove Standard password security using the current owner password.

Parameters

ownerPassword System.String requiredposition: 0
public PdfOperationResult<PdfSecurityMutationResult> TryEncrypt(PdfStandardEncryptionOptions encryption) #
Returns: PdfOperationResult<PdfSecurityMutationResult>

Attempts to encrypt this unencrypted PDF through the shared mutation planner.

Parameters

encryption OfficeIMO.Pdf.PdfStandardEncryptionOptions requiredposition: 0
public PdfOperationResult<PdfDocument> TryFlattenVisualAnnotations(PdfReadOptions options = null) #
Returns: PdfOperationResult<PdfDocument>

Attempts to flatten visual annotation appearance streams, returning diagnostics when blocked or failed.

Parameters

options OfficeIMO.Pdf.PdfReadOptions = null optionalposition: 0
TryMergeWith 4 overloads
public PdfOperationResult<PdfDocument> TryMergeWith(PdfDocument document, PdfReadOptions options = null) #
Returns: PdfOperationResult<PdfDocument>

Attempts to merge this PDF with another loaded or generated PDF, returning diagnostics when blocked or failed.

Parameters

document OfficeIMO.Pdf.PdfDocument requiredposition: 0
options OfficeIMO.Pdf.PdfReadOptions = null optionalposition: 1
public PdfOperationResult<PdfDocument> TryMergeWith(Byte[] pdf, PdfReadOptions options = null) #
Returns: PdfOperationResult<PdfDocument>

Attempts to merge this PDF with another PDF byte payload, returning diagnostics when blocked or failed.

Parameters

pdf System.Byte[] requiredposition: 0
options OfficeIMO.Pdf.PdfReadOptions = null optionalposition: 1
public PdfOperationResult<PdfDocument> TryMergeWith(String path, PdfReadOptions options = null) #
Returns: PdfOperationResult<PdfDocument>

Attempts to merge this PDF with another PDF file, returning diagnostics when blocked or failed.

Parameters

path System.String requiredposition: 0
options OfficeIMO.Pdf.PdfReadOptions = null optionalposition: 1
public PdfOperationResult<PdfDocument> TryMergeWith(Stream stream, PdfReadOptions options = null) #
Returns: PdfOperationResult<PdfDocument>

Attempts to merge this PDF with another readable PDF stream, returning diagnostics when blocked or failed.

Parameters

stream System.IO.Stream requiredposition: 0
options OfficeIMO.Pdf.PdfReadOptions = null optionalposition: 1
public PdfOperationResult<PdfExternalSignaturePreparation> TryPrepareExternalSignature(PdfExternalSignatureOptions signatureOptions = null, PdfReadOptions options = null) #
Returns: PdfOperationResult<PdfExternalSignaturePreparation>

Attempts to append an external-signature placeholder revision, returning diagnostics when blocked or failed.

Parameters

signatureOptions OfficeIMO.Pdf.PdfExternalSignatureOptions = null optionalposition: 0
options OfficeIMO.Pdf.PdfReadOptions = null optionalposition: 1
public static Boolean TryPrepareImageBytes(Byte[] data, out Byte[] preparedBytes, out OfficeImageInfo imageInfo, out Boolean wasTranscoded, out String unsupportedReason) #
Returns: Boolean

Prepares 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[] requiredposition: 0
preparedBytes System.Byte[]@ requiredposition: 1
imageInfo OfficeIMO.Drawing.OfficeImageInfo@ requiredposition: 2
wasTranscoded System.Boolean@ requiredposition: 3
unsupportedReason System.String@ requiredposition: 4
public PdfOperationResult<PdfSecurityMutationResult> TryReencrypt(String currentOwnerPassword, PdfStandardEncryptionOptions newEncryption) #
Returns: PdfOperationResult<PdfSecurityMutationResult>

Attempts to replace Standard password security using the current owner password.

Parameters

currentOwnerPassword System.String requiredposition: 0
newEncryption OfficeIMO.Pdf.PdfStandardEncryptionOptions requiredposition: 1
public PdfOperationResult<PdfDocument> TryReplaceMetadata(PdfMetadata metadata, PdfReadOptions options = null) #
Returns: PdfOperationResult<PdfDocument>

Attempts to create a new PDF with exactly the supplied metadata, returning diagnostics when blocked or failed.

Parameters

metadata OfficeIMO.Pdf.PdfMetadata requiredposition: 0
options OfficeIMO.Pdf.PdfReadOptions = null optionalposition: 1
TrySave 2 overloads
public PdfSaveResult TrySave(Stream stream) #
Returns: PdfSaveResult

Attempts to write the document to stream and returns output diagnostics instead of throwing.

Parameters

stream System.IO.Stream requiredposition: 0
public PdfSaveResult TrySave(String path) #
Returns: PdfSaveResult

Attempts to save the document to path and returns output diagnostics instead of throwing.

Parameters

path System.String requiredposition: 0
TrySaveAsync 2 overloads
public async Task<PdfSaveResult> TrySaveAsync(Stream stream, CancellationToken cancellationToken = null) #
Returns: Task<PdfSaveResult>

Attempts to asynchronously write the document to stream and returns output diagnostics instead of throwing.

Parameters

stream System.IO.Stream requiredposition: 0
cancellationToken System.Threading.CancellationToken = null optionalposition: 1
public async Task<PdfSaveResult> TrySaveAsync(String path, CancellationToken cancellationToken = null) #
Returns: Task<PdfSaveResult>

Attempts to asynchronously save the document to path and returns output diagnostics instead of throwing.

Parameters

path System.String requiredposition: 0
cancellationToken System.Threading.CancellationToken = null optionalposition: 1
public PdfOperationResult<PdfDocument> TrySynchronizeMetadata(String title = null, String author = null, String subject = null, String keywords = null, Boolean createXmpMetadata = true, PdfReadOptions options = null) #
Returns: PdfOperationResult<PdfDocument>

Attempts a full-rewrite Info/XMP synchronization and returns planner diagnostics when blocked.

Parameters

title System.String = null optionalposition: 0
author System.String = null optionalposition: 1
subject System.String = null optionalposition: 2
keywords System.String = null optionalposition: 3
createXmpMetadata System.Boolean = true optionalposition: 4
options OfficeIMO.Pdf.PdfReadOptions = null optionalposition: 5
public PdfBytesResult TryToBytes() #
Returns: PdfBytesResult

Attempts 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, PdfReadOptions options = null) #
Returns: PdfOperationResult<PdfDocument>

Attempts to create a new PDF with updated metadata, returning diagnostics when blocked or failed.

Parameters

title System.String = null optionalposition: 0
author System.String = null optionalposition: 1
subject System.String = null optionalposition: 2
keywords System.String = null optionalposition: 3
options OfficeIMO.Pdf.PdfReadOptions = null optionalposition: 4
public static Boolean TryValidateImageBytes(Byte[] data, out OfficeImageInfo imageInfo, out String unsupportedReason) #
Returns: Boolean

Checks whether image bytes can be embedded by the first-party PDF writer.

Parameters

data System.Byte[] requiredposition: 0
imageInfo OfficeIMO.Drawing.OfficeImageInfo@ requiredposition: 1
unsupportedReason System.String@ requiredposition: 2
public PdfDocument UpdateMetadata(String title = null, String author = null, String subject = null, String keywords = null) #
Returns: PdfDocument

Creates a new PDF with updated metadata. Null values preserve existing fields; empty strings clear fields.

Parameters

title System.String = null optionalposition: 0
author System.String = null optionalposition: 1
subject System.String = null optionalposition: 2
keywords System.String = null optionalposition: 3
public PdfDocument UseEmbeddedFontFallbacksFromSystem(String familyNames, Int32 maxFallbackFonts = 2) #
Returns: PdfDocument

Registers generated-text fallback fonts from installed system font families without requiring callers to choose PDF font slots.

Parameters

familyNames System.String requiredposition: 0
maxFallbackFonts System.Int32 = 2 optionalposition: 1
UseFontFamily 3 overloads
public PdfDocument UseFontFamily(String familyName, Byte[] regular, Byte[] bold = null, Byte[] italic = null, Byte[] boldItalic = null) #
Returns: PdfDocument

Uses a caller-supplied TrueType font family as the generated document's default font family.

Parameters

familyName System.String requiredposition: 0
regular System.Byte[] requiredposition: 1
bold System.Byte[] = null optionalposition: 2
italic System.Byte[] = null optionalposition: 3
boldItalic System.Byte[] = null optionalposition: 4
public PdfDocument UseFontFamily(PdfEmbeddedFontFamily fontFamily) #
Returns: PdfDocument

Uses a reusable caller-supplied TrueType font family as the generated document's default font family.

Parameters

fontFamily OfficeIMO.Pdf.PdfEmbeddedFontFamily requiredposition: 0
public PdfDocument UseFontFamily(String familyName, String regularPath, String boldPath = null, String italicPath = null, String boldItalicPath = null) #
Returns: PdfDocument

Uses caller-supplied TrueType font files as the generated document's default font family.

Parameters

familyName System.String requiredposition: 0
regularPath System.String requiredposition: 1
boldPath System.String = null optionalposition: 2
italicPath System.String = null optionalposition: 3
boldItalicPath System.String = null optionalposition: 4
public PdfDocument UseTextFallbacks(PdfTextFallbackFeatures features = Default) #
Returns: PdfDocument

Applies OfficeIMO's built-in generated-text fallback groups.

Parameters

features OfficeIMO.Pdf.PdfTextFallbackFeatures = Default optionalposition: 0
public PdfDocument UseTextShaping(PdfTextShapingMode mode, IOfficeTextShapingProvider provider = null) #
Returns: PdfDocument

Configures dependency-free generated-text shaping and an optional host-provided shaping seam.

Parameters

mode OfficeIMO.Pdf.PdfTextShapingMode requiredposition: 0
provider OfficeIMO.Drawing.IOfficeTextShapingProvider = null optionalposition: 1
ValidateSignatures 2 overloads
public PdfSignatureValidationReport ValidateSignatures(PdfReadOptions options = null) #
Returns: PdfSignatureValidationReport

Validates signature structure, byte ranges, and preservation markers for this PDF.

Parameters

options OfficeIMO.Pdf.PdfReadOptions = null optionalposition: 0
public PdfSignatureValidationReport ValidateSignatures(IPdfSignatureCryptographyProvider cryptographyProvider, PdfReadOptions options = null) #
Returns: PdfSignatureValidationReport

Validates signature structure and delegates CMS, trust, timestamp, and revocation policy to an optional provider.

Parameters

cryptographyProvider OfficeIMO.Pdf.IPdfSignatureCryptographyProvider requiredposition: 0
options OfficeIMO.Pdf.PdfReadOptions = null optionalposition: 1
public PdfRedactionVerificationReport VerifyRedactions(PdfRedactionVerificationOptions options) #
Returns: PdfRedactionVerificationReport

Verifies that configured redaction markers were removed and retained markers remain readable in this PDF.

Parameters

options OfficeIMO.Pdf.PdfRedactionVerificationOptions requiredposition: 0
ViewerPreferences 2 overloads
public PdfDocument ViewerPreferences(PdfViewerPreferencesOptions preferences) #
Returns: PdfDocument

Sets or clears generated catalog viewer preferences.

Parameters

preferences OfficeIMO.Pdf.PdfViewerPreferencesOptions requiredposition: 0
public PdfDocument ViewerPreferences(Action<PdfViewerPreferencesOptions> configure) #
Returns: PdfDocument

Configures generated catalog viewer preferences.

Parameters

configure System.Action{OfficeIMO.Pdf.PdfViewerPreferencesOptions} requiredposition: 0
Watermark 2 overloads
public PdfDocument Watermark(PdfTextWatermark watermark) #
Returns: PdfDocument

Sets or clears the document-wide default text watermark rendered behind page content.

Parameters

watermark OfficeIMO.Pdf.PdfTextWatermark requiredposition: 0
public PdfDocument Watermark(String text, Nullable<Double> fontSize = null, Nullable<PdfColor> color = null, Nullable<Double> opacity = null, Nullable<Double> rotationAngle = null, Nullable<PdfStandardFont> font = null, Boolean bold = true, Boolean italic = false) #
Returns: PdfDocument

Sets a document-wide default text watermark rendered behind page content.

Parameters

text System.String requiredposition: 0
fontSize System.Nullable{System.Double} = null optionalposition: 1
color System.Nullable{OfficeIMO.Pdf.PdfColor} = null optionalposition: 2
opacity System.Nullable{System.Double} = null optionalposition: 3
rotationAngle System.Nullable{System.Double} = null optionalposition: 4
font System.Nullable{OfficeIMO.Pdf.PdfStandardFont} = null optionalposition: 5
bold System.Boolean = true optionalposition: 6
italic System.Boolean = false optionalposition: 7

Properties

public PdfDocumentPages Pages { get; } #

Page editing and extraction operations for this PDF.

public PdfDocumentReader Read { get; } #

Readback operations for this PDF.

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 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) #
Returns: IReadOnlyList<OfficeImageExportResult>

Exports pages from an authored or opened PDF document using the shared five-format result contract.

Parameters

arg1 OfficeIMO.Pdf.PdfDocument requiredposition: 0
arg2 OfficeIMO.Drawing.OfficeImageExportFormat requiredposition: 1
arg3 OfficeIMO.Pdf.PdfImageExportOptions = null optionalposition: 2
arg4 OfficeIMO.Pdf.PdfPageSelection = null optionalposition: 3
arg5 System.Threading.CancellationToken = null optionalposition: 4
ToImages 2 overloads
public static PdfDocumentImageExportBuilder ToImages(PdfDocument document) #
Returns: PdfDocumentImageExportBuilder

Starts 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 requiredposition: 0
public static PdfDocumentImageExportBuilder ToImages(PdfDocument document, PdfImageExportOptions options) #
Returns: PdfDocumentImageExportBuilder

Starts 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 requiredposition: 0
options OfficeIMO.Pdf.PdfImageExportOptions requiredposition: 1