API Reference

Class

PdfOptions

Namespace OfficeIMO.Pdf
Assembly OfficeIMO.Pdf
Modifiers sealed

Options controlling page geometry and default typography for a PDF document.

Inheritance

  • Object
  • PdfOptions

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

Constructors

Methods

AddEmbeddedFile 2 overloads
public PdfOptions AddEmbeddedFile(PdfEmbeddedFile file) #
Returns: PdfOptions

Adds an embedded file associated with the generated PDF catalog.

Parameters

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

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 PdfOptions AddFacturXInvoiceXml(Byte[] ciiXml, String conformanceLevel = "EN 16931", String version = "1.0", PdfAssociatedFileRelationship relationship = Data, String description = "Factur-X/ZUGFeRD invoice XML") #
Returns: PdfOptions

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 PdfOptions AddFacturXInvoiceXmlFile(String ciiXmlPath, String conformanceLevel = "EN 16931", String version = "1.0", PdfAssociatedFileRelationship relationship = Data, String description = "Factur-X/ZUGFeRD invoice XML") #
Returns: PdfOptions

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
public PdfOptions AddPageLabelRange(Int32 startPageNumber, PdfPageNumberStyle style, Int32 startNumber = 1, String prefix = null) #
Returns: PdfOptions

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
public PdfOptions ApplyTheme(PdfTheme theme) #
Returns: PdfOptions

Applies reusable default styles to this options object.

Parameters

theme OfficeIMO.Pdf.PdfTheme requiredposition: 0
public PdfOptions ClearAcroFormDefaultTextAlignment() #
Returns: PdfOptions

Clears the generated AcroForm default text alignment.

public PdfOptions ClearCatalogUriBase() #
Returns: PdfOptions

Clears the generated catalog URI base.

public PdfOptions ClearCatalogView() #
Returns: PdfOptions

Clears generated catalog page mode and page layout viewer hints.

public PdfOptions ClearEmbeddedFiles() #
Returns: PdfOptions

Removes all embedded files associated with the generated PDF catalog.

public PdfOptions ClearEmbeddedStandardFonts() #
Returns: PdfOptions

Removes all embedded standard-font mappings.

public PdfOptions ClearEncryption() #
Returns: PdfOptions

Clears generated PDF password security.

public PdfOptions ClearNamedFontFamilies() #
Returns: PdfOptions

Removes every embedded named family and its parsed program cache.

public PdfOptions ClearOpenAction() #
Returns: PdfOptions

Clears the generated catalog open action.

public PdfOptions ClearPageLabelRanges() #
Returns: PdfOptions

Clears generated catalog page-label ranges while leaving simple page-label options unchanged.

public PdfOptions ClearPortfolio() #
Returns: PdfOptions

Clears the generated document portfolio configuration without removing embedded files.

public PdfOptions Clone() #
Returns: PdfOptions

Creates a deep copy of the options.

public PdfOptions ConfigureElectronicInvoiceGroundwork(PdfComplianceProfile profile, Byte[] ciiXml, String conformanceLevel = "EN 16931", String version = "1.0", PdfAssociatedFileRelationship relationship = Data, String description = "Factur-X/ZUGFeRD invoice XML", Boolean useDocumentFontFallback = true) #
Returns: PdfOptions

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
useDocumentFontFallback System.Boolean = true optionalposition: 6
public PdfOptions ConfigureElectronicInvoiceGroundworkFile(PdfComplianceProfile profile, String ciiXmlPath, String conformanceLevel = "EN 16931", String version = "1.0", PdfAssociatedFileRelationship relationship = Data, String description = "Factur-X/ZUGFeRD invoice XML", Boolean useDocumentFontFallback = true) #
Returns: PdfOptions

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
useDocumentFontFallback System.Boolean = true optionalposition: 6
ConfigureFacturXGroundwork 2 overloads
public PdfOptions ConfigureFacturXGroundwork(Byte[] ciiXml, String conformanceLevel = "EN 16931", String version = "1.0", PdfAssociatedFileRelationship relationship = Data, String description = "Factur-X/ZUGFeRD invoice XML", Boolean useDocumentFontFallback = true) #
Returns: PdfOptions

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
useDocumentFontFallback System.Boolean = true optionalposition: 5
public PdfOptions ConfigureFacturXGroundwork(Byte[] ciiXml, PdfTextFallbackFeatures textFallbacks, String conformanceLevel = "EN 16931", String version = "1.0", PdfAssociatedFileRelationship relationship = Data, String description = "Factur-X/ZUGFeRD invoice XML") #
Returns: PdfOptions

Configures common PDF/A-3 Factur-X/ZUGFeRD groundwork with explicit text fallback groups.

Parameters

ciiXml System.Byte[] requiredposition: 0
textFallbacks OfficeIMO.Pdf.PdfTextFallbackFeatures 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 PdfOptions ConfigureFacturXGroundworkFile(String ciiXmlPath, String conformanceLevel = "EN 16931", String version = "1.0", PdfAssociatedFileRelationship relationship = Data, String description = "Factur-X/ZUGFeRD invoice XML", Boolean useDocumentFontFallback = true) #
Returns: PdfOptions

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
useDocumentFontFallback System.Boolean = true optionalposition: 5
public PdfOptions ConfigurePdfAGroundwork(PdfComplianceProfile profile, String language = "en-US") #
Returns: PdfOptions

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 PdfOptions ConfigurePdfUaGroundwork(String language = "en-US") #
Returns: PdfOptions

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

Parameters

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

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 PdfOptions ConfigureViewerPreferences(Action<PdfViewerPreferencesOptions> configure) #
Returns: PdfOptions

Configures generated catalog viewer preferences.

Parameters

configure System.Action{OfficeIMO.Pdf.PdfViewerPreferencesOptions} requiredposition: 0
EmbedStandardFont 2 overloads
public PdfOptions EmbedStandardFont(PdfStandardFont font, Byte[] data, String fontName = null) #
Returns: PdfOptions

Embeds a TrueType font file for a generated standard-font slot.

Parameters

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

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

Parameters

font OfficeIMO.Pdf.PdfStandardFont requiredposition: 0
path System.String requiredposition: 1
fontName System.String = null optionalposition: 2
public PdfOptions EnableTaggedPdfCatalogMarkers() #
Returns: PdfOptions

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

public Boolean HasEmbeddedStandardFontFamily(PdfStandardFont font) #
Returns: Boolean

Reports whether a generated standard-font family slot currently has an embedded font mapping.

Parameters

font OfficeIMO.Pdf.PdfStandardFont requiredposition: 0
Generated PDF font slot or variant.

Returns

True when the normalized font family slot has embedded font data.

public Boolean HasNamedFontFamily(String familyName) #
Returns: Boolean

Reports whether an embedded named family is registered.

Parameters

familyName System.String requiredposition: 0
public PdfOptions RegisterEmbeddedFontFallbacks(PdfEmbeddedFontFallbackSet fallbackSet) #
Returns: PdfOptions

Registers a planned embedded-font fallback set into its generated standard-font family slots.

Parameters

fallbackSet OfficeIMO.Pdf.PdfEmbeddedFontFallbackSet requiredposition: 0
Fallback set that pairs prioritized embedded font candidates with generated font slots.
public PdfOptions RegisterFontFamily(PdfStandardFont baseFontFamily, PdfEmbeddedFontFamily fontFamily) #
Returns: PdfOptions

Registers a caller-supplied TrueType font family for one semantic PDF font family slot without changing the document default font. Use this for private, licensed, or packaged fonts that should back a specific generated Helvetica, Times, or Courier family.

Parameters

baseFontFamily OfficeIMO.Pdf.PdfStandardFont requiredposition: 0
The semantic standard family slot to back: Helvetica, Times-Roman, or Courier.
fontFamily OfficeIMO.Pdf.PdfEmbeddedFontFamily requiredposition: 1
Reusable TrueType font family to embed into that semantic slot.
public PdfOptions RegisterNamedFontFamily(PdfEmbeddedFontFamily fontFamily) #
Returns: PdfOptions

Registers a reusable embedded family under its authored family name. Named families do not consume Helvetica, Times, or Courier compatibility slots and may be used together on one page.

Parameters

fontFamily OfficeIMO.Pdf.PdfEmbeddedFontFamily requiredposition: 0
public PdfOptions RegisterOfficeFontFamily(String familyName, PdfStandardFont baseFontFamily, Boolean embedSystemFont = true) #
Returns: PdfOptions

Registers an Office-style font family for one semantic PDF font family slot without changing the document default font. This is used by converters for run-level and cell-level fonts.

Parameters

familyName System.String requiredposition: 0
Office, CSS, or system font family name such as Aptos, Georgia, or Consolas.
baseFontFamily OfficeIMO.Pdf.PdfStandardFont requiredposition: 1
The semantic standard family slot to back: Helvetica, Times-Roman, or Courier.
embedSystemFont System.Boolean = true optionalposition: 2
When true, installed TrueType faces are embedded into the selected semantic slot when available.
public PdfOptions ReportDiagnosticsTo(PdfConversionReport report, String converter = "OfficeIMO.Pdf") #
Returns: PdfOptions

Records generated text diagnostics encountered while writing PDF content.

Parameters

report OfficeIMO.Pdf.PdfConversionReport requiredposition: 0
Mutable conversion report that receives text encoding, missing-glyph, shaping, and embedded-font diagnostics.
converter System.String = "OfficeIMO.Pdf" optionalposition: 1
Converter or adapter name to place on recorded warnings.

Returns

The current options instance for fluent configuration.

public PdfOptions RequireCompliance(PdfComplianceProfile profile) #
Returns: PdfOptions

Requests a generated-PDF compliance profile for this document.

Parameters

profile OfficeIMO.Pdf.PdfComplianceProfile requiredposition: 0
public PdfOptions SetAcroFormDefaultTextAlignment(Nullable<PdfFormFieldTextAlignment> alignment) #
Returns: PdfOptions

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

Parameters

alignment System.Nullable{OfficeIMO.Pdf.PdfFormFieldTextAlignment} requiredposition: 0
public PdfOptions SetCatalogPageLayout(Nullable<PdfCatalogPageLayout> pageLayout) #
Returns: PdfOptions

Sets or clears the generated catalog page layout.

Parameters

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

Sets or clears the generated catalog page mode.

Parameters

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

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

Parameters

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

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 PdfOptions SetDefaultHeadingStyle(Int32 level, PdfHeadingStyle style) #
Returns: PdfOptions

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

Parameters

level System.Int32 requiredposition: 0
style OfficeIMO.Pdf.PdfHeadingStyle requiredposition: 1
SetElectronicInvoiceMetadata 2 overloads
public PdfOptions SetElectronicInvoiceMetadata(PdfElectronicInvoiceMetadata metadata) #
Returns: PdfOptions

Sets Factur-X/ZUGFeRD XMP extension metadata and enables XMP metadata emission.

Parameters

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

Sets Factur-X/ZUGFeRD XMP extension metadata and enables XMP metadata emission.

Parameters

conformanceLevel System.String requiredposition: 0
version System.String = "1.0" optionalposition: 1
SetEncryption 2 overloads
public PdfOptions SetEncryption(String userPassword, String ownerPassword = null, Int32 permissions = -4) #
Returns: PdfOptions

Sets Standard password security for generated PDFs.

Parameters

userPassword System.String requiredposition: 0
ownerPassword System.String = null optionalposition: 1
permissions System.Int32 = -4 optionalposition: 2
public PdfOptions SetEncryption(PdfStandardEncryptionOptions encryption) #
Returns: PdfOptions

Sets or clears Standard password security for generated PDFs.

Parameters

encryption OfficeIMO.Pdf.PdfStandardEncryptionOptions requiredposition: 0
public PdfOptions SetFileVersion(PdfFileVersion version) #
Returns: PdfOptions

Sets the PDF file header version emitted for generated documents.

Parameters

version OfficeIMO.Pdf.PdfFileVersion requiredposition: 0
public PdfOptions SetFlattenVisualAnnotations(Boolean flatten = true) #
Returns: PdfOptions

Enables or disables flattening generated FreeText and Highlight annotations into page content.

Parameters

flatten System.Boolean = true optionalposition: 0
public PdfOptions SetLanguage(String language) #
Returns: PdfOptions

Sets or clears the generated catalog document language.

Parameters

language System.String requiredposition: 0
public PdfOptions SetOpenAction(Int32 pageNumber = 1, Nullable<Double> destinationTop = null, PdfOpenActionDestinationMode destinationMode = Xyz, Nullable<Double> destinationLeft = null, Nullable<Double> destinationBottom = null, Nullable<Double> destinationRight = null) #
Returns: PdfOptions

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
SetOutputIntent 5 overloads
public PdfOptions SetOutputIntent(PdfOutputIntent outputIntent) #
Returns: PdfOptions

Sets a generated catalog output intent backed by an ICC profile.

Parameters

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

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

Parameters

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

Sets a generated catalog output intent from ICC profile bytes.

Parameters

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

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 PdfOptions SetOutputIntent(Byte[] iccProfile, String outputConditionIdentifier, PdfOutputIntentPolicy policy) #
Returns: PdfOptions

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 PdfOptions SetPageLabels(Boolean include = true, String prefix = null) #
Returns: PdfOptions

Enables or disables generated catalog page labels.

Parameters

include System.Boolean = true optionalposition: 0
prefix System.String = null optionalposition: 1
SetPdfAIdentification 2 overloads
public PdfOptions SetPdfAIdentification(PdfAIdentification identification) #
Returns: PdfOptions

Sets PDF/A XMP identification metadata and enables XMP metadata emission.

Parameters

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

Sets PDF/A XMP identification metadata and enables XMP metadata emission.

Parameters

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

Sets PDF/UA XMP identification metadata and enables XMP metadata emission.

Parameters

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

Sets PDF/UA XMP identification metadata and enables XMP metadata emission.

Parameters

part System.Int32 = 1 optionalposition: 0
public PdfOptions SetPortfolio(PdfPortfolioOptions portfolio) #
Returns: PdfOptions

Configures the generated embedded files as a document portfolio.

Parameters

portfolio OfficeIMO.Pdf.PdfPortfolioOptions requiredposition: 0
public PdfOptions SetSrgbOutputIntent() #
Returns: PdfOptions

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

public PdfOptions SetTaggedStructureMode(PdfTaggedStructureMode mode) #
Returns: PdfOptions

Sets the generated tagged-PDF groundwork mode.

Parameters

mode OfficeIMO.Pdf.PdfTaggedStructureMode requiredposition: 0
public PdfOptions SetTextHyphenation(PdfTextHyphenationCallback callback) #
Returns: PdfOptions

Sets or clears the callback used to provide preferred break positions for long unspaced tokens.

Parameters

callback OfficeIMO.Pdf.PdfTextHyphenationCallback requiredposition: 0
Callback returning UTF-16 break indexes for a token, or null to disable the hook.
public PdfOptions SetTextLineBreaks(Func<String, IReadOnlyList<Int32>> callback) #
Returns: PdfOptions

Sets or clears the callback used to provide preferred non-hyphenating break positions for long unspaced tokens.

Parameters

callback System.Func{System.String,System.Collections.Generic.IReadOnlyList{System.Int32}} requiredposition: 0
Callback returning UTF-16 break indexes for a token, or null to disable the hook.
public PdfOptions SetTextShapingMode(PdfTextShapingMode mode) #
Returns: PdfOptions

Sets the dependency-free generated text shaping mode used by embedded font output.

Parameters

mode OfficeIMO.Pdf.PdfTextShapingMode requiredposition: 0
Shaping mode to apply when writing generated text with embedded fonts.
public PdfOptions SetTextShapingProvider(IOfficeTextShapingProvider provider) #
Returns: PdfOptions

Sets or clears the host-provided shaping engine used for generated text written with embedded fonts.

Parameters

provider OfficeIMO.Drawing.IOfficeTextShapingProvider requiredposition: 0
Provider that returns shaped glyph runs, or null to use only built-in shaping.

Returns

The current options instance for fluent configuration.

public PdfOptions SetViewerPreferences(PdfViewerPreferencesOptions preferences) #
Returns: PdfOptions

Sets or clears generated catalog viewer preferences.

Parameters

preferences OfficeIMO.Pdf.PdfViewerPreferencesOptions requiredposition: 0
public Boolean TryRegisterDefaultDocumentMonospaceFontFallback(Boolean requireEmbeddedFont = false) #
Returns: Boolean

Attempts to register the shared document monospace fallback family for generated PDF code/preformatted text.

Parameters

requireEmbeddedFont System.Boolean = false optionalposition: 0
When true, returns true only when an installed monospace fallback face was embedded.

Returns

True when the fallback changed the generated font state and, when requested, embedded a monospace font mapping.

public Boolean TryRegisterEmbeddedFontFallbacksFromSystem(String familyNames, Int32 maxFallbackFonts = 2) #
Returns: Boolean

Tries to register generated-text fallback fonts from installed system font families without requiring callers to choose PDF font slots. Existing explicit EmbeddedFontFallbacks are preserved.

Parameters

familyNames System.String requiredposition: 0
System font family candidates, for example Segoe UI Emoji, Noto Emoji, DejaVu Sans.
maxFallbackFonts System.Int32 = 2 optionalposition: 1
Maximum number of installed fallback font families to register.

Returns

True when fallback fonts are already configured or at least one installed fallback was registered.

public Boolean TryRegisterNamedOfficeFontFamily(String familyNames, out String registeredFamilyName) #
Returns: Boolean

Loads and registers the first installed family in an Office/CSS family list.

Parameters

familyNames System.String requiredposition: 0
Comma- or semicolon-separated installed family candidates.
registeredFamilyName System.String@ requiredposition: 1
The registered installed family name when successful.

Returns

True when an installed embeddable family was found and registered.

public Boolean TryUseDefaultDocumentFontFallback(Boolean requireEmbeddedFont = true) #
Returns: Boolean

Attempts to configure the shared document Unicode font fallback family for generated PDF text.

Parameters

requireEmbeddedFont System.Boolean = true optionalposition: 0
When true, returns true only when an installed fallback face was embedded.

Returns

True when the fallback changed the generated font state and, when requested, embedded a default font mapping.

public Boolean TryUseOfficeFontFamily(String familyName, Boolean embedSystemFont = true, Boolean requireEmbeddedFont = false) #
Returns: Boolean

Attempts to use an Office-style font family name and reports whether the generated PDF text font state changed.

Parameters

familyName System.String requiredposition: 0
Office, CSS, or system font family name such as Aptos, Calibri, or Consolas.
embedSystemFont System.Boolean = true optionalposition: 1
When true, installed TrueType faces are preferred over dependency-free standard PDF font aliases.
requireEmbeddedFont System.Boolean = false optionalposition: 2
When true, returns true only when the selected default generated font family has an embedded font mapping.

Returns

True when the family changed the generated font state and, when requested, produced an embedded default font mapping.

public PdfOptions UseEmbeddedFontFallbacksFromSystem(String familyNames, Int32 maxFallbackFonts = 2) #
Returns: PdfOptions

Registers generated-text fallback fonts by resolving an Office-style comma/semicolon-separated system font family list. Callers do not need to choose PDF standard-font slots; OfficeIMO selects available slots and preserves explicit fallback sets.

Parameters

familyNames System.String requiredposition: 0
System font family candidates, for example Segoe UI Emoji, Noto Emoji, DejaVu Sans.
maxFallbackFonts System.Int32 = 2 optionalposition: 1
Maximum number of installed fallback font families to register.

Returns

The current options for fluent chaining.

public PdfOptions UseFacturX(Byte[] ciiXml, String conformanceLevel = "EN 16931", String version = "1.0", PdfAssociatedFileRelationship relationship = Data, String description = "Factur-X/ZUGFeRD invoice XML", PdfTextFallbackFeatures textFallbacks = DocumentFont) #
Returns: PdfOptions

Applies Factur-X/ZUGFeRD PDF/A-3 groundwork and attaches the CrossIndustryInvoice XML payload.

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
textFallbacks OfficeIMO.Pdf.PdfTextFallbackFeatures = DocumentFont optionalposition: 5
public PdfOptions UseFacturXFile(String ciiXmlPath, String conformanceLevel = "EN 16931", String version = "1.0", PdfAssociatedFileRelationship relationship = Data, String description = "Factur-X/ZUGFeRD invoice XML", PdfTextFallbackFeatures textFallbacks = DocumentFont) #
Returns: PdfOptions

Applies Factur-X/ZUGFeRD PDF/A-3 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
textFallbacks OfficeIMO.Pdf.PdfTextFallbackFeatures = DocumentFont optionalposition: 5
UseFontFamily 3 overloads
public PdfOptions UseFontFamily(String familyName, Byte[] regular, Byte[] bold = null, Byte[] italic = null, Byte[] boldItalic = null) #
Returns: PdfOptions

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 PdfOptions UseFontFamily(PdfEmbeddedFontFamily fontFamily) #
Returns: PdfOptions

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

Parameters

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

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 PdfOptions UseManagedTextShaping() #
Returns: PdfOptions

Uses the shared dependency-light Drawing provider for bounded Arabic joining and bidirectional text.

public PdfOptions UseOfficeFontFamily(String familyName, Boolean embedSystemFont = true) #
Returns: PdfOptions

Uses an Office-style font family name for generated text, embedding the installed TrueType family when it is available and otherwise falling back to the nearest PDF standard family.

Parameters

familyName System.String requiredposition: 0
Office, CSS, or system font family name such as Aptos, Calibri, or Consolas.
embedSystemFont System.Boolean = true optionalposition: 1
When true, installed TrueType faces are preferred over dependency-free standard PDF font aliases.
public PdfOptions UsePdfA(PdfComplianceProfile profile = PdfA3B, String language = "en-US") #
Returns: PdfOptions

Applies common PDF/A groundwork for the requested profile.

Parameters

profile OfficeIMO.Pdf.PdfComplianceProfile = PdfA3B optionalposition: 0
language System.String = "en-US" optionalposition: 1
public PdfOptions UsePdfUa(PdfComplianceProfile profile = PdfUa1, String language = "en-US") #
Returns: PdfOptions

Applies common PDF/UA groundwork for the requested profile.

Parameters

profile OfficeIMO.Pdf.PdfComplianceProfile = PdfUa1 optionalposition: 0
language System.String = "en-US" optionalposition: 1
public PdfOptions UseTextFallbacks(PdfTextFallbackFeatures features = Default) #
Returns: PdfOptions

Applies OfficeIMO's built-in generated-text fallback groups without requiring callers to manually assign fallback font slots.

Parameters

features OfficeIMO.Pdf.PdfTextFallbackFeatures = Default optionalposition: 0
Fallback groups to enable. The default enables document, monospace, symbol, and emoji fallbacks.

Returns

The current options for fluent chaining.

public PdfOptions UseTextHyphenationDictionary(PdfHyphenationLexicon dictionary) #
Returns: PdfOptions

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

Parameters

dictionary OfficeIMO.Pdf.PdfHyphenationLexicon requiredposition: 0
Dictionary whose breakpoints should be used, or null to clear hyphenation.

Properties

public Boolean CompressContentStreams { get; set; } #

When true, generated page content streams are written with Flate compression.

public Int64 ObjectBufferMemoryLimitBytes { get; set; } #

Maximum serialized-object bytes retained in memory while saving. Zero spills every completed object to temporary storage.

public Int64 PageContentMemoryLimitBytes { get; set; } #

Maximum completed page-content bytes retained during layout. Zero spills every completed page and effect stream to temporary storage.

public Boolean IncludeStandardFontToUnicodeMaps { get; set; } #

When true, generated standard-font resources include WinAnsi-to-Unicode CMaps for stronger extraction and compliance groundwork.

public Boolean CompressEmbeddedFonts { get; set; } #

When true, embedded TrueType font file streams are Flate-compressed while preserving their original /Length1 metadata.

public Boolean IncludeXmpMetadata { get; set; } #

When true, generated PDFs include a catalog XMP metadata stream synchronized with document Info metadata.

public Boolean IncludePageLabels { get; set; } #

When true, generated PDFs include catalog page labels that match the configured page-number style and start number.

public Boolean FlattenVisualAnnotations { get; set; } #

When true, generated FreeText and Highlight annotations are painted into page content instead of emitted as interactive annotations.

public String PageLabelPrefix { get; set; } #

Optional catalog page-label prefix, for example "A-" or "Appendix ". Requires IncludePageLabels to be emitted.

public IReadOnlyList<PdfPageLabelRange> PageLabelRanges { get; } #

Generated catalog page-label rules, ordered by their one-based start page number.

public PdfFileVersion FileVersion { get; set; } #

PDF file header version emitted for generated documents.

public PdfComplianceProfile ComplianceProfile { get; set; } #

Requested generated-PDF compliance profile. Non-None profiles are validated strictly and fail until their required primitives are implemented.

public PdfAIdentification PdfAIdentification { get; set; } #

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

public PdfUaIdentification PdfUaIdentification { get; set; } #

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

public PdfElectronicInvoiceMetadata ElectronicInvoiceMetadata { get; set; } #

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

public PdfOutputIntent OutputIntent { get; set; } #

Optional generated catalog output intent backed by an ICC profile.

public PdfTaggedStructureMode TaggedStructureMode { get; set; } #

Controls catalog-level tagged-PDF groundwork emitted for accessibility-oriented profiles.

public String Language { get; set; } #

Optional document language for the generated catalog /Lang entry, for example "en-US".

public Nullable<PdfCatalogPageMode> CatalogPageMode { get; set; } #

Optional catalog page mode emitted for generated PDFs.

public Nullable<PdfCatalogPageLayout> CatalogPageLayout { get; set; } #

Optional catalog page layout emitted for generated PDFs.

public PdfOpenActionOptions OpenAction { get; set; } #

Optional generated catalog open action controlling the initial page destination.

public PdfViewerPreferencesOptions ViewerPreferences { get; set; } #

Optional simple viewer preferences emitted through the generated catalog.

public String CatalogUriBase { get; set; } #

Optional catalog URI base used by viewers to resolve relative URI actions.

public PdfStandardEncryptionOptions Encryption { get; set; } #

Optional Standard password security for generated PDFs.

public Nullable<PdfFormFieldTextAlignment> AcroFormDefaultTextAlignment { get; set; } #

Optional AcroForm default text alignment emitted as catalog-level /Q quadding.

public IReadOnlyList<PdfEmbeddedFile> EmbeddedFiles { get; } #

Embedded files associated with the generated document catalog.

public PdfPortfolioOptions Portfolio { get; set; } #

Optional document portfolio configuration for the generated embedded files.

public IReadOnlyDictionary<PdfStandardFont, PdfEmbeddedFont> EmbeddedFonts { get; } #

Embedded TrueType font mappings keyed by generated standard-font slot.

public Nullable<PdfColor> BackgroundColor { get; set; } #

Optional page background color rendered behind all page content.

public PdfTextWatermark TextWatermark { get; set; } #

Optional reusable text watermark rendered behind all page content.

public PdfTextWatermark FirstPageTextWatermark { get; set; } #

Optional first-page text watermark rendered behind page content when first-page variants are enabled.

public PdfTextWatermark EvenPageTextWatermark { get; set; } #

Optional even-page text watermark rendered behind page content when odd/even variants are enabled.

public PdfImageWatermark ImageWatermark { get; set; } #

Optional reusable image watermark rendered behind all page content.

public PdfImageWatermark FirstPageImageWatermark { get; set; } #

Optional first-page image watermark rendered behind page content when first-page variants are enabled.

public PdfImageWatermark EvenPageImageWatermark { get; set; } #

Optional even-page image watermark rendered behind page content when odd/even variants are enabled.

public PdfPageBorder PageBorder { get; set; } #

Optional reusable page border rendered as a page decoration.

public PdfPageBackgroundImage PageBackgroundImage { get; set; } #

Optional reusable page background image rendered behind all page content.

public IReadOnlyList<PdfPageBackgroundShape> PageBackgroundShapes { get; set; } #

Optional reusable page background shapes rendered behind all page content.

public PdfEmbeddedFontFallbackSet EmbeddedFontFallbacks { get; set; } #

Embedded font fallback set used to split generated rich text runs that cannot be written by their selected font.

public Boolean ShowHeader { get; set; } #

When true, renders header text using HeaderFormat.

public String HeaderFormat { get; set; } #

Header text format, supports {page} and {pages}. Default: empty.

public Boolean DifferentFirstPageHeaderFooter { get; set; } #

When true, page 1 uses first-page header/footer content instead of the running header/footer.

public String FirstPageHeaderFormat { get; set; } #

Header text format used on page 1 when DifferentFirstPageHeaderFooter is true. Supports {page} and {pages}.

public Boolean DifferentOddAndEvenPagesHeaderFooter { get; set; } #

When true, even-numbered pages use even-page header/footer content instead of the running odd-page content.

public String EvenPageHeaderFormat { get; set; } #

Header text format used on even-numbered pages when DifferentOddAndEvenPagesHeaderFooter is true. Supports {page} and {pages}.

public PdfStandardFont HeaderFont { get; set; } #

Header font.

public Boolean HasExplicitHeaderFont { get; } #

Gets whether the header font slot was explicitly supplied by the caller or a theme.

public String HeaderFontFamily { get; set; } #

Optional registered named font family used for header text. When null, HeaderFont is used.

public Double HeaderFontSize { get; set; } #

Header font size in points.

public Nullable<PdfColor> HeaderTextColor { get; set; } #

Header text color. When null, the current PDF fill color is preserved.

public PdfAlign HeaderAlign { get; set; } #

Header alignment.

public Double HeaderOffsetY { get; set; } #

Header baseline Y offset above the top margin (points). Default 18.

public Boolean ShowPageNumbers { get; set; } #

When true, renders page numbers in the footer using FooterFormat.

public String FooterFormat { get; set; } #

Footer text format, supports {page} and {pages}. Default: "Page {page}/{pages}".

public String FirstPageFooterFormat { get; set; } #

Footer text format used on page 1 when DifferentFirstPageHeaderFooter is true. Supports {page} and {pages}.

public String EvenPageFooterFormat { get; set; } #

Footer text format used on even-numbered pages when DifferentOddAndEvenPagesHeaderFooter is true. Supports {page} and {pages}.

public PdfStandardFont FooterFont { get; set; } #

Footer font.

public Boolean HasExplicitFooterFont { get; } #

Gets whether the footer font slot was explicitly supplied by the caller or a theme.

public String FooterFontFamily { get; set; } #

Optional registered named font family used for footer text. When null, FooterFont is used.

public Double FooterFontSize { get; set; } #

Footer font size in points.

public Nullable<PdfColor> FooterTextColor { get; set; } #

Footer text color. When null, the current PDF fill color is preserved.

public PdfAlign FooterAlign { get; set; } #

Footer alignment.

public Double FooterOffsetY { get; set; } #

Footer baseline Y position from bottom margin (points). Default 18.

public Int32 PageNumberStart { get; set; } #

First visible page number for this document or section flow. Default 1.

public PdfPageNumberStyle PageNumberStyle { get; set; } #

Visible numbering style for generated page tokens. Default Arabic.

public List<FooterSegment> FooterSegments { get; set; } #

Advanced footer template segments. When set, overrides FooterFormat.

public List<FooterSegment> FirstPageFooterSegments { get; set; } #

Advanced page-1 footer template segments used when DifferentFirstPageHeaderFooter is true.

public List<FooterSegment> EvenPageFooterSegments { get; set; } #

Advanced even-page footer template segments used when DifferentOddAndEvenPagesHeaderFooter is true.

public PdfImageOptimizationOptions ImageOptimization { get; set; } #

Optional placement-aware image optimization used while generating image XObjects. The value is snapshotted; optimization is disabled when this option is null or disabled.

public IReadOnlyDictionary<String, PdfEmbeddedFontFamily> NamedFontFamilies { get; } #

Embedded named font families available to run-level text without consuming a standard-font slot.

public Double PageWidth { get; set; } #

Page width in points (1 pt = 1/72 in). Default is 612 (Letter 8.5in).

public Double PageHeight { get; set; } #

Page height in points. Default is 792 (Letter 11in).

public PageSize PageSize { get; set; } #

Page size in points.

public PdfPageOrientation PageOrientation { get; } #

Page orientation inferred from the current page size.

public Double MarginLeft { get; set; } #

Left margin in points. Default 72 (1 inch).

public Double MarginRight { get; set; } #

Right margin in points. Default 72 (1 inch).

public Double MarginTop { get; set; } #

Top margin in points. Default 72 (1 inch).

public Double MarginBottom { get; set; } #

Bottom margin in points. Default 72 (1 inch).

public PageMargins Margins { get; set; } #

Page margins in points.

public PdfStandardFont DefaultFont { get; set; } #

Default standard font used for paragraphs.

public Boolean HasExplicitDefaultFont { get; } #

Gets whether the default paragraph font slot was explicitly supplied by the caller or a theme.

public Double DefaultFontSize { get; set; } #

Default paragraph font size in points. Default 11.

public Nullable<PdfColor> DefaultTextColor { get; set; } #

Default text color for blocks when none is specified.

public PdfParagraphStyle DefaultParagraphStyle { get; set; } #

Default paragraph style applied when a paragraph does not specify its own style.

public PdfTableStyle DefaultTableStyle { get; set; } #

Default table style applied when none is provided.

public Boolean HasExplicitDefaultTableStyle { get; } #

Gets whether DefaultTableStyle was explicitly supplied by the caller or a theme.

public PdfHeadingStyles DefaultHeadingStyles { get; set; } #

Default heading styles applied when H1/H2/H3 blocks do not specify their own style.

public PdfListStyle DefaultListStyle { get; set; } #

Default list style applied when bullet and numbered lists do not specify their own style.

public PanelStyle DefaultPanelStyle { get; set; } #

Default panel style applied when panel paragraphs do not specify their own style.

public PdfHorizontalRuleStyle DefaultHorizontalRuleStyle { get; set; } #

Default horizontal rule style applied when horizontal rules do not specify their own style.

public PdfImageStyle DefaultImageStyle { get; set; } #

Default image placement style applied when images do not specify their own style.

public PdfDrawingStyle DefaultDrawingStyle { get; set; } #

Default placement style for OfficeIMO.Drawing-backed flow objects.

public PdfRowStyle DefaultRowStyle { get; set; } #

Default row/column layout style applied when rows do not specify their own style.

public PdfDebugOptions Debug { get; set; } #

Optional debug overlays (margins, baselines, boxes).

public Boolean CreateOutlineFromHeadings { get; set; } #

When true, H1/H2/H3 blocks are written as PDF outline/bookmark entries.

public Int32 OutlineExpansionLevel { get; set; } #

Highest outline level expanded when generated heading outlines are opened in a PDF reader. Defaults to all levels. Set to 0 to show only top-level entries with children collapsed.

public PdfTextShapingMode TextShapingMode { get; set; } #

Dependency-free generated text shaping mode used by embedded TrueType and OpenType/CFF font output.

public IOfficeTextShapingProvider TextShapingProvider { get; set; } #

Optional host-provided shaping engine for embedded-font text runs that need script shaping, bidirectional layout, or glyph substitution beyond the built-in dependency-free modes.

public PdfTextHyphenationCallback TextHyphenationCallback { get; set; } #

Optional callback used to provide preferred break positions for long unspaced tokens during generated text wrapping.

public Func<String, IReadOnlyList<Int32>> TextLineBreakCallback { get; set; } #

Optional callback used to provide preferred non-hyphenating break positions for long unspaced tokens during generated text wrapping.

Fields

public const String DefaultDocumentMultilingualFontFamilyFallback #

Default installed multilingual family candidates used by document converters for CJK, Arabic, and other non-Latin generated PDF text.

Value: Arial Unicode MS, Noto Sans CJK JP, Yu Gothic, PingFang SC, Microsoft YaHei, Noto Sans CJK SC, Meiryo, Hiragino Sans GB, Microsoft JhengHei, Noto Sans CJK TC, Malgun Gothic, Apple SD Gothic Neo, Noto Sans CJK KR, MS Gothic, SimSun, Noto Sans JP, Noto Sans SC, Noto Sans TC, Noto Sans KR, Noto Sans Arabic, Noto Naskh Arabic, Arabic Typesetting, Traditional Arabic, Nirmala UI, Microsoft Uighur, DejaVu Sans
public const String DefaultDocumentSymbolAndEmojiFontFamilyFallback #

Default installed symbol and emoji family candidates used by document converters for generated PDF text fallback runs.

Value: Segoe UI Symbol, Apple Symbols, DejaVu Sans, Noto Sans Symbols 2, Noto Sans Symbols, Symbola, Arial Unicode MS, Segoe UI Emoji, Noto Emoji, Noto Color Emoji, Arial
public const String DefaultDocumentFontFamilyFallback #

Default installed sans-serif family candidates used by document converters when they need Unicode-capable generated PDF text.

Value: Arial, Aptos, Calibri, Liberation Sans, DejaVu Sans
public const String DefaultDocumentMonospaceFontFamilyFallback #

Default installed monospace family candidates used by document converters for code and preformatted text.

Value: Consolas, Courier New, Liberation Mono, DejaVu Sans Mono