Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

PdfCreateOptions

OfficeIMO.Pdf

Namespace
OfficeIMO.Pdf
Assembly
OfficeIMO.Pdf
Source revision
e163ccb36643 with working tree changes
Modifiers
sealed

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

Inheritance

  • object
  • PdfCreateOptions

Usage

Explore 84 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Returned or exposed by 80

Accepted by parameters 4

Constructors

public PdfCreateOptions() #

Methods

AddEmbeddedFile 2 overloads
public PdfCreateOptions AddEmbeddedFile(PdfEmbeddedFile file) #

Adds an embedded file associated with the generated PDF catalog.

Parameters

file OfficeIMO.Pdf.PdfEmbeddedFile required

Exceptions

  • InvalidDataException – The payload or projected catalog collection exceeds its configured byte limit.
public PdfCreateOptions AddEmbeddedFile(string fileName, byte[] data, string? mimeType = null, PdfAssociatedFileRelationship relationship = Unspecified, string? description = null) #

Adds an embedded file associated with the generated PDF catalog, checking byte limits before copying caller-owned bytes.

Parameters

fileName string required
data byte[] required
mimeType string? = null optional
relationship OfficeIMO.Pdf.PdfAssociatedFileRelationship = Unspecified optional
description string? = null optional

Exceptions

  • InvalidDataException – The payload or projected catalog collection exceeds its configured byte limit.
public PdfCreateOptions AddFacturXInvoiceXml(byte[] ciiXml, string? conformanceLevel = null, string version = "1.0", PdfAssociatedFileRelationship relationship = Data, string? description = "Factur-X/ZUGFeRD invoice XML") #

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

Parameters

ciiXml byte[] required
conformanceLevel string? = null optional
version string = "1.0" optional
relationship OfficeIMO.Pdf.PdfAssociatedFileRelationship = Data optional
description string? = "Factur-X/ZUGFeRD invoice XML" optional
public PdfCreateOptions AddFacturXInvoiceXmlFile(string ciiXmlPath, string? conformanceLevel = null, string version = "1.0", PdfAssociatedFileRelationship relationship = Data, string? description = "Factur-X/ZUGFeRD invoice XML") #

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

Parameters

ciiXmlPath string required
conformanceLevel string? = null optional
version string = "1.0" optional
relationship OfficeIMO.Pdf.PdfAssociatedFileRelationship = Data optional
description string? = "Factur-X/ZUGFeRD invoice XML" optional
public PdfCreateOptions AddPageLabelRange(int startPageNumber, PdfPageNumberStyle style, int startNumber = 1, string? prefix = null) #

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

Parameters

startPageNumber int required
style OfficeIMO.Pdf.PdfPageNumberStyle required
startNumber int = 1 optional
prefix string? = null optional
public PdfCreateOptions ApplyTheme(PdfTheme theme) #

Applies reusable default styles to this options object.

Parameters

theme OfficeIMO.Pdf.PdfTheme required
public PdfCreateOptions ClearAcroFormDefaultTextAlignment() #

Clears the generated AcroForm default text alignment.

public PdfCreateOptions ClearCatalogUriBase() #

Clears the generated catalog URI base.

public PdfCreateOptions ClearCatalogView() #

Clears generated catalog page mode and page layout viewer hints.

public PdfCreateOptions ClearEmbeddedFiles() #

Removes all embedded files associated with the generated PDF catalog.

public PdfCreateOptions ClearEmbeddedStandardFonts() #

Removes all embedded standard-font mappings.

public PdfCreateOptions ClearEncryption() #

Clears generated PDF password security.

public PdfCreateOptions ClearNamedFontFamilies() #

Removes every embedded named family and its parsed program cache.

public PdfCreateOptions ClearOpenAction() #

Clears the generated catalog open action.

public PdfCreateOptions ClearPageLabelRanges() #

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

public PdfCreateOptions ClearPortfolio() #

Clears the generated document portfolio configuration without removing embedded files.

public PdfCreateOptions Clone() #

Creates a deep copy of the options.

public PdfCreateOptions ConfigureElectronicInvoiceGroundwork(PdfComplianceProfile profile, byte[] ciiXml, string? conformanceLevel = null, string version = "1.0", PdfAssociatedFileRelationship relationship = Data, string? description = "Factur-X/ZUGFeRD invoice XML", bool useDocumentFontFallback = true) #

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

Parameters

profile OfficeIMO.Pdf.PdfComplianceProfile required
ciiXml byte[] required
conformanceLevel string? = null optional
version string = "1.0" optional
relationship OfficeIMO.Pdf.PdfAssociatedFileRelationship = Data optional
description string? = "Factur-X/ZUGFeRD invoice XML" optional
useDocumentFontFallback bool = true optional
public PdfCreateOptions ConfigureElectronicInvoiceGroundworkFile(PdfComplianceProfile profile, string ciiXmlPath, string? conformanceLevel = null, string version = "1.0", PdfAssociatedFileRelationship relationship = Data, string? description = "Factur-X/ZUGFeRD invoice XML", bool useDocumentFontFallback = true) #

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

Parameters

profile OfficeIMO.Pdf.PdfComplianceProfile required
ciiXmlPath string required
conformanceLevel string? = null optional
version string = "1.0" optional
relationship OfficeIMO.Pdf.PdfAssociatedFileRelationship = Data optional
description string? = "Factur-X/ZUGFeRD invoice XML" optional
useDocumentFontFallback bool = true optional
ConfigureFacturXGroundwork 2 overloads
public PdfCreateOptions ConfigureFacturXGroundwork(byte[] ciiXml, string? conformanceLevel = null, string version = "1.0", PdfAssociatedFileRelationship relationship = Data, string? description = "Factur-X/ZUGFeRD invoice XML", bool useDocumentFontFallback = true) #

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

Parameters

ciiXml byte[] required
conformanceLevel string? = null optional
version string = "1.0" optional
relationship OfficeIMO.Pdf.PdfAssociatedFileRelationship = Data optional
description string? = "Factur-X/ZUGFeRD invoice XML" optional
useDocumentFontFallback bool = true optional
public PdfCreateOptions ConfigureFacturXGroundwork(byte[] ciiXml, PdfTextFallbackFeatures textFallbacks, string? conformanceLevel = null, string version = "1.0", PdfAssociatedFileRelationship relationship = Data, string? description = "Factur-X/ZUGFeRD invoice XML") #

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

Parameters

ciiXml byte[] required
textFallbacks OfficeIMO.Pdf.PdfTextFallbackFeatures required
conformanceLevel string? = null optional
version string = "1.0" optional
relationship OfficeIMO.Pdf.PdfAssociatedFileRelationship = Data optional
description string? = "Factur-X/ZUGFeRD invoice XML" optional
public PdfCreateOptions ConfigureFacturXGroundworkFile(string ciiXmlPath, string? conformanceLevel = null, string version = "1.0", PdfAssociatedFileRelationship relationship = Data, string? description = "Factur-X/ZUGFeRD invoice XML", bool useDocumentFontFallback = true) #

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

Parameters

ciiXmlPath string required
conformanceLevel string? = null optional
version string = "1.0" optional
relationship OfficeIMO.Pdf.PdfAssociatedFileRelationship = Data optional
description string? = "Factur-X/ZUGFeRD invoice XML" optional
useDocumentFontFallback bool = true optional
public PdfCreateOptions ConfigurePdfAGroundwork(PdfComplianceProfile profile, string language = "en-US") #

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

Parameters

profile OfficeIMO.Pdf.PdfComplianceProfile required
language string = "en-US" optional
ConfigurePdfUaGroundwork 2 overloads
public PdfCreateOptions ConfigurePdfUaGroundwork(string language = "en-US") #

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

Parameters

language string = "en-US" optional
public PdfCreateOptions ConfigurePdfUaGroundwork(PdfComplianceProfile profile, string language = "en-US") #

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

Parameters

profile OfficeIMO.Pdf.PdfComplianceProfile required
language string = "en-US" optional
public PdfCreateOptions ConfigurePdfX(PdfComplianceProfile profile, byte[] cmykIccProfile, string outputConditionIdentifier, PdfTrappingStatus trappingStatus = False) #

Configures fail-closed PDF/X generation using a caller-supplied CMYK print-condition ICC profile.

Parameters

profile OfficeIMO.Pdf.PdfComplianceProfile required
cmykIccProfile byte[] required
outputConditionIdentifier string required
trappingStatus OfficeIMO.Pdf.PdfTrappingStatus = False optional
public PdfCreateOptions ConfigurePdfXGroundwork(PdfComplianceProfile profile, byte[] cmykIccProfile, string outputConditionIdentifier, PdfTrappingStatus trappingStatus = Unknown) #

Configures PDF/X metadata, print-condition color conversion, and production-page groundwork without selecting a formal compliance profile.

Parameters

profile OfficeIMO.Pdf.PdfComplianceProfile required
cmykIccProfile byte[] required
outputConditionIdentifier string required
trappingStatus OfficeIMO.Pdf.PdfTrappingStatus = Unknown optional
public PdfCreateOptions ConfigureViewerPreferences(Action<PdfViewerPreferencesOptions> configure) #

Configures generated catalog viewer preferences.

Parameters

configure System.Action<OfficeIMO.Pdf.PdfViewerPreferencesOptions> required
EmbedStandardFont 2 overloads
public PdfCreateOptions EmbedStandardFont(PdfStandardFont font, byte[] data, string? fontName = null) #

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

Parameters

font OfficeIMO.Pdf.PdfStandardFont required
data byte[] required
fontName string? = null optional
public PdfCreateOptions EmbedStandardFont(PdfStandardFont font, string path, string? fontName = null) #

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

Parameters

font OfficeIMO.Pdf.PdfStandardFont required
path string required
fontName string? = null optional
public PdfCreateOptions EnableTaggedPdfCatalogMarkers() #

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

public bool HasEmbeddedStandardFontFamily(PdfStandardFont font) #

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

Parameters

font OfficeIMO.Pdf.PdfStandardFont required
Generated PDF font slot or variant.

Returns

bool True when the normalized font family slot has embedded font data.
public bool HasNamedFontFamily(string? familyName) #

Reports whether an embedded named family is registered.

Parameters

familyName string? required

Returns

bool
public PdfCreateOptions RegisterEmbeddedFontFallbacks(PdfEmbeddedFontFallbackSet fallbackSet) #

Registers a planned embedded-font fallback set while preserving existing compatibility-slot font families. Occupied compatibility slots are resolved when fallback runs are rendered.

Parameters

fallbackSet OfficeIMO.Pdf.PdfEmbeddedFontFallbackSet required
Fallback set that pairs prioritized embedded font candidates with generated font slots.
public PdfCreateOptions RegisterFontFamily(PdfStandardFont baseFontFamily, PdfEmbeddedFontFamily fontFamily) #

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 required
The semantic standard family slot to back: Helvetica, Times-Roman, or Courier.
fontFamily OfficeIMO.Pdf.PdfEmbeddedFontFamily required
Reusable TrueType font family to embed into that semantic slot.
public PdfCreateOptions RegisterFontFamilySubstitution(string sourceFontFamily, string targetFontFamily, PdfFontFamilySubstitutionImpact impact = LayoutSensitive) #

Registers a source document family as a planned substitute for an embedded named PDF family.

Parameters

sourceFontFamily string required
Source family declared by the input document.
targetFontFamily string required
Registered embedded family used in generated PDF text.
impact OfficeIMO.Pdf.PdfFontFamilySubstitutionImpact = LayoutSensitive optional
Expected layout impact of the substitution.

Returns

PdfCreateOptions The current options instance.
public PdfCreateOptions RegisterNamedFontFamily(PdfEmbeddedFontFamily fontFamily) #

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 required
public PdfCreateOptions RegisterOfficeFontFamily(string? familyName, PdfStandardFont baseFontFamily, bool embedSystemFont = true) #

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 string? required
Office, CSS, or system font family name such as Aptos, Georgia, or Consolas.
baseFontFamily OfficeIMO.Pdf.PdfStandardFont required
The semantic standard family slot to back: Helvetica, Times-Roman, or Courier.
embedSystemFont bool = true optional
When true, installed TrueType faces are embedded into the selected semantic slot when available.
public PdfCreateOptions ReportDiagnosticsTo(PdfConversionReport report, string converter = "OfficeIMO.Pdf") #

Records generated text and layout diagnostics encountered while writing PDF content.

Parameters

report OfficeIMO.Pdf.PdfConversionReport required
Mutable conversion report that receives text encoding, missing-glyph, shaping, embedded-font, and layout diagnostics.
converter string = "OfficeIMO.Pdf" optional
Converter or adapter name to place on recorded warnings.

Returns

PdfCreateOptions The current options instance for fluent configuration.
public PdfCreateOptions RequireCompliance(PdfComplianceProfile profile) #

Requests a generated-PDF compliance profile for this document.

Parameters

profile OfficeIMO.Pdf.PdfComplianceProfile required
public PdfCreateOptions SetAcroFormDefaultTextAlignment(PdfFormFieldTextAlignment? alignment) #

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

Parameters

alignment OfficeIMO.Pdf.PdfFormFieldTextAlignment? required
public PdfCreateOptions SetCatalogPageLayout(PdfCatalogPageLayout? pageLayout) #

Sets or clears the generated catalog page layout.

Parameters

pageLayout OfficeIMO.Pdf.PdfCatalogPageLayout? required
public PdfCreateOptions SetCatalogPageMode(PdfCatalogPageMode? pageMode) #

Sets or clears the generated catalog page mode.

Parameters

pageMode OfficeIMO.Pdf.PdfCatalogPageMode? required
public PdfCreateOptions SetCatalogUriBase(string? uriBase) #

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

Parameters

uriBase string? required
public PdfCreateOptions SetCatalogView(PdfCatalogPageMode? pageMode = null, PdfCatalogPageLayout? pageLayout = null) #

Sets generated catalog page mode and page layout viewer hints.

Parameters

pageMode OfficeIMO.Pdf.PdfCatalogPageMode? = null optional
pageLayout OfficeIMO.Pdf.PdfCatalogPageLayout? = null optional
public PdfCreateOptions SetDefaultHeadingStyle(int level, PdfHeadingStyle style) #

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

Parameters

level int required
style OfficeIMO.Pdf.PdfHeadingStyle required
SetElectronicInvoiceMetadata 2 overloads
public PdfCreateOptions SetElectronicInvoiceMetadata(PdfElectronicInvoiceMetadata? metadata) #

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

Parameters

metadata OfficeIMO.Pdf.PdfElectronicInvoiceMetadata? required
public PdfCreateOptions SetElectronicInvoiceMetadata(string conformanceLevel, string version = "1.0") #

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

Parameters

conformanceLevel string required
version string = "1.0" optional
public PdfCreateOptions SetEmbeddedFileModificationDate(string fileName, DateTimeOffset modificationDate) #

Sets the modification date emitted in the embedded-file stream parameters for an existing attachment.

Parameters

fileName string required
modificationDate System.DateTimeOffset required
SetEncryption 2 overloads
public PdfCreateOptions SetEncryption(string userPassword, string? ownerPassword = null, int permissions = -4) #

Sets Standard password security for generated PDFs.

Parameters

userPassword string required
ownerPassword string? = null optional
permissions int = -4 optional
public PdfCreateOptions SetEncryption(PdfStandardEncryptionOptions? encryption) #

Sets or clears Standard password security for generated PDFs.

Parameters

encryption OfficeIMO.Pdf.PdfStandardEncryptionOptions? required
public PdfCreateOptions SetFileVersion(PdfFileVersion version) #

Sets the PDF file header version emitted for generated documents.

Parameters

version OfficeIMO.Pdf.PdfFileVersion required
public PdfCreateOptions SetFlattenVisualAnnotations(bool flatten = true) #

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

Parameters

flatten bool = true optional
public PdfCreateOptions SetLanguage(string? language) #

Sets or clears the generated catalog document language.

Parameters

language string? required
public PdfCreateOptions SetOpenAction(int pageNumber = 1, double? destinationTop = null, PdfOpenActionDestinationMode destinationMode = Xyz, double? destinationLeft = null, double? destinationBottom = null, double? destinationRight = null) #

Sets the generated catalog open action to a page destination.

Parameters

pageNumber int = 1 optional
destinationTop double? = null optional
destinationMode OfficeIMO.Pdf.PdfOpenActionDestinationMode = Xyz optional
destinationLeft double? = null optional
destinationBottom double? = null optional
destinationRight double? = null optional
SetOutputIntent 5 overloads
public PdfCreateOptions SetOutputIntent(PdfOutputIntent? outputIntent) #

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

Parameters

outputIntent OfficeIMO.Pdf.PdfOutputIntent? required
public PdfCreateOptions SetOutputIntent(byte[] iccProfile) #

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

Parameters

iccProfile byte[] required
public PdfCreateOptions SetOutputIntent(byte[] iccProfile, string outputConditionIdentifier) #

Sets a generated catalog output intent from ICC profile bytes.

Parameters

iccProfile byte[] required
outputConditionIdentifier string required
public PdfCreateOptions SetOutputIntent(byte[] iccProfile, PdfOutputIntentPolicy policy) #

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

Parameters

iccProfile byte[] required
policy OfficeIMO.Pdf.PdfOutputIntentPolicy required
public PdfCreateOptions SetOutputIntent(byte[] iccProfile, string outputConditionIdentifier, PdfOutputIntentPolicy policy) #

Sets a generated catalog output intent from ICC profile bytes.

Parameters

iccProfile byte[] required
outputConditionIdentifier string required
policy OfficeIMO.Pdf.PdfOutputIntentPolicy required
public PdfCreateOptions SetPageLabels(bool include = true, string? prefix = null) #

Enables or disables generated catalog page labels.

Parameters

include bool = true optional
prefix string? = null optional
SetPdfAIdentification 2 overloads
public PdfCreateOptions SetPdfAIdentification(PdfAIdentification? identification) #

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

Parameters

identification OfficeIMO.Pdf.PdfAIdentification? required
public PdfCreateOptions SetPdfAIdentification(int part, string conformance) #

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

Parameters

part int required
conformance string required
SetPdfUaIdentification 2 overloads
public PdfCreateOptions SetPdfUaIdentification(PdfUaIdentification? identification) #

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

Parameters

identification OfficeIMO.Pdf.PdfUaIdentification? required
public PdfCreateOptions SetPdfUaIdentification(int part = 1) #

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

Parameters

part int = 1 optional
public PdfCreateOptions SetPdfXIdentification(PdfXIdentification? identification) #

Sets PDF/X identification metadata.

Parameters

identification OfficeIMO.Pdf.PdfXIdentification? required
public PdfCreateOptions SetPdfXOutputIntent(byte[] iccProfile, string outputConditionIdentifier) #

Sets a PDF/X output intent from a caller-supplied CMYK print-condition ICC profile.

Parameters

iccProfile byte[] required
outputConditionIdentifier string required
public PdfCreateOptions SetPdfXProductionMetadata(PdfXProductionMetadata? metadata) #

Sets explicit PDF/X production timestamps and identity for reproducible generation.

Parameters

metadata OfficeIMO.Pdf.PdfXProductionMetadata? required
public PdfCreateOptions SetPortfolio(PdfPortfolioOptions portfolio) #

Configures the generated embedded files as a document portfolio.

Parameters

portfolio OfficeIMO.Pdf.PdfPortfolioOptions required
public PdfCreateOptions SetSrgbOutputIntent() #

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

public PdfCreateOptions SetTaggedStructureMode(PdfTaggedStructureMode mode) #

Sets the generated tagged-PDF groundwork mode.

Parameters

mode OfficeIMO.Pdf.PdfTaggedStructureMode required
public PdfCreateOptions SetTextHyphenation(PdfTextHyphenationCallback? callback) #

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

Parameters

callback OfficeIMO.Pdf.PdfTextHyphenationCallback? required
Callback returning UTF-16 break indexes for a token, or null to disable the hook.
public PdfCreateOptions SetTextLineBreaks(Func<string, IReadOnlyList<int>>? callback) #

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

Parameters

callback System.Func<string, System.Collections.Generic.IReadOnlyList<int>>? required
Callback returning UTF-16 break indexes for a token, or null to disable the hook.
public PdfCreateOptions SetTextShapingMode(PdfTextShapingMode mode) #

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

Parameters

mode OfficeIMO.Pdf.PdfTextShapingMode required
Shaping mode to apply when writing generated text with embedded fonts.
public PdfCreateOptions SetTextShapingProvider(IOfficeTextShapingProvider? provider) #

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

Parameters

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

Returns

PdfCreateOptions The current options instance for fluent configuration.
public PdfCreateOptions SetTrappingStatus(PdfTrappingStatus? status) #

Sets the print trapping status written to the document information dictionary.

Parameters

status OfficeIMO.Pdf.PdfTrappingStatus? required
public PdfCreateOptions SetViewerPreferences(PdfViewerPreferencesOptions? preferences) #

Sets or clears generated catalog viewer preferences.

Parameters

preferences OfficeIMO.Pdf.PdfViewerPreferencesOptions? required
public bool TryRegisterDefaultDocumentMonospaceFontFallback(bool requireEmbeddedFont = false) #

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

Parameters

requireEmbeddedFont bool = false optional
When true, returns true only when an installed monospace fallback face was embedded.

Returns

bool True when the fallback changed the generated font state and, when requested, embedded a monospace font mapping.
public bool TryRegisterEmbeddedFontFallbacksFromSystem(string? familyNames, int maxFallbackFonts = 2) #

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

Parameters

familyNames string? required
System font family candidates, for example Segoe UI Emoji, Noto Emoji, DejaVu Sans.
maxFallbackFonts int = 2 optional
Maximum number of installed fallback font families to register.

Returns

bool True when fallback fonts are already configured or at least one installed fallback was registered.
public bool TryRegisterNamedOfficeFontFamily(string? familyNames, out string? registeredFamilyName) #

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

Parameters

familyNames string? required
Comma- or semicolon-separated installed family candidates.
registeredFamilyName string? required
The registered installed family name when successful.

Returns

bool True when an installed embeddable family was found and registered.
public bool TryUseDefaultDocumentFontFallback(bool requireEmbeddedFont = true) #

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

Parameters

requireEmbeddedFont bool = true optional
When true, returns true only when an installed fallback face was embedded.

Returns

bool True when the fallback changed the generated font state and, when requested, embedded a default font mapping.
public bool TryUseOfficeFontFamily(string? familyName, bool embedSystemFont = true, bool requireEmbeddedFont = false) #

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

Parameters

familyName string? required
Office, CSS, or system font family name such as Aptos, Calibri, or Consolas.
embedSystemFont bool = true optional
When true, installed TrueType faces are preferred over dependency-free standard PDF font aliases.
requireEmbeddedFont bool = false optional
When true, returns true only when the selected default generated font family has an embedded font mapping.

Returns

bool True when the family changed the generated font state and, when requested, produced an embedded default font mapping.
public PdfCreateOptions UseAutomaticHyphenation(string? language = null) #

Hyphenates words at line ends with the embedded Liang patterns (US English and reformed German).

Parameters

language string? = null optional
A supported tag such as en-US or de-DE; null uses PdfCreateOptions.Language at layout time.
public PdfCreateOptions UseEmbeddedFontFallbacksFromSystem(string? familyNames, int maxFallbackFonts = 2) #

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 string? required
System font family candidates, for example Segoe UI Emoji, Noto Emoji, DejaVu Sans.
maxFallbackFonts int = 2 optional
Maximum number of installed fallback font families to register.

Returns

PdfCreateOptions The current options for fluent chaining.
public PdfCreateOptions UseFacturX(byte[] ciiXml, string? conformanceLevel = null, string version = "1.0", PdfAssociatedFileRelationship relationship = Data, string? description = "Factur-X/ZUGFeRD invoice XML", PdfTextFallbackFeatures textFallbacks = DocumentFont) #

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

Parameters

ciiXml byte[] required
conformanceLevel string? = null optional
version string = "1.0" optional
relationship OfficeIMO.Pdf.PdfAssociatedFileRelationship = Data optional
description string? = "Factur-X/ZUGFeRD invoice XML" optional
textFallbacks OfficeIMO.Pdf.PdfTextFallbackFeatures = DocumentFont optional
public PdfCreateOptions UseFacturXDocument(PdfCiiInvoiceDocument invoice, string? conformanceLevel = null, string version = "1.0", PdfAssociatedFileRelationship relationship = Data, string? description = "Factur-X/ZUGFeRD invoice XML", PdfTextFallbackFeatures textFallbacks = DocumentFont) #

Attaches a snapshot of an invoice document using the existing Factur-X PDF/A-3 groundwork. This does not render invoice content or certify agreement between visible content and XML. The profile is inferred from the XML unless explicitly supplied; conflicting declarations are rejected. The caller must still validate the resulting PDF and invoice together.

Parameters

invoice OfficeIMO.Pdf.PdfCiiInvoiceDocument required
conformanceLevel string? = null optional
version string = "1.0" optional
relationship OfficeIMO.Pdf.PdfAssociatedFileRelationship = Data optional
description string? = "Factur-X/ZUGFeRD invoice XML" optional
textFallbacks OfficeIMO.Pdf.PdfTextFallbackFeatures = DocumentFont optional
public PdfCreateOptions UseFacturXFile(string ciiXmlPath, string? conformanceLevel = null, string version = "1.0", PdfAssociatedFileRelationship relationship = Data, string? description = "Factur-X/ZUGFeRD invoice XML", PdfTextFallbackFeatures textFallbacks = DocumentFont) #

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

Parameters

ciiXmlPath string required
conformanceLevel string? = null optional
version string = "1.0" optional
relationship OfficeIMO.Pdf.PdfAssociatedFileRelationship = Data optional
description string? = "Factur-X/ZUGFeRD invoice XML" optional
textFallbacks OfficeIMO.Pdf.PdfTextFallbackFeatures = DocumentFont optional
UseFontFamily 3 overloads
public PdfCreateOptions UseFontFamily(string familyName, byte[] regular, byte[]? bold = null, byte[]? italic = null, byte[]? boldItalic = null) #

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

Parameters

familyName string required
regular byte[] required
bold byte[]? = null optional
italic byte[]? = null optional
boldItalic byte[]? = null optional
public PdfCreateOptions UseFontFamily(PdfEmbeddedFontFamily fontFamily) #

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

Parameters

fontFamily OfficeIMO.Pdf.PdfEmbeddedFontFamily required
public PdfCreateOptions UseFontFamily(string familyName, string regularPath, string? boldPath = null, string? italicPath = null, string? boldItalicPath = null) #

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

Parameters

familyName string required
regularPath string required
boldPath string? = null optional
italicPath string? = null optional
boldItalicPath string? = null optional
public PdfCreateOptions UseManagedTextShaping() #

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

public PdfCreateOptions UseOfficeFontFamily(string? familyName, bool embedSystemFont = true) #

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 string? required
Office, CSS, or system font family name such as Aptos, Calibri, or Consolas.
embedSystemFont bool = true optional
When true, installed TrueType faces are preferred over dependency-free standard PDF font aliases.
public PdfCreateOptions UsePdfA(PdfComplianceProfile profile = PdfA3B, string language = "en-US") #

Configures PDF/A generation and enables strict generation and saved-artifact checks. Call ConfigurePdfAGroundwork for metadata-only preparation without the strict gate.

Parameters

profile OfficeIMO.Pdf.PdfComplianceProfile = PdfA3B optional
language string = "en-US" optional
public PdfCreateOptions UsePdfUa(PdfComplianceProfile profile = PdfUa1, string language = "en-US") #

Configures PDF/UA generation and enables strict generation and saved-artifact checks. Call ConfigurePdfUaGroundwork for metadata-only preparation without the strict gate.

Parameters

profile OfficeIMO.Pdf.PdfComplianceProfile = PdfUa1 optional
language string = "en-US" optional
public PdfCreateOptions UseRenderingProfile(OfficeRenderingProfile profile, OfficeRenderingProfileApplyMode mode = Replace) #

Applies the text and font resources from a shared OfficeIMO rendering profile.

Parameters

profile OfficeIMO.Drawing.OfficeRenderingProfile required
Shared rendering profile.
mode OfficeIMO.Drawing.OfficeRenderingProfileApplyMode = Replace optional
Whether profile-owned resources replace or overlay existing PDF settings.

Returns

PdfCreateOptions This options instance for fluent configuration.
public PdfCreateOptions UseTextFallbacks(PdfTextFallbackFeatures features = Default) #

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

Parameters

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

Returns

PdfCreateOptions The current options for fluent chaining.
public PdfCreateOptions UseTextHyphenationDictionary(PdfHyphenationLexicon? dictionary) #

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

Parameters

dictionary OfficeIMO.Pdf.PdfHyphenationLexicon? required
Dictionary whose breakpoints should be used, or null to clear hyphenation.

Properties

public long MaxEmbeddedFileBytes { get; set; } #

Maximum payload bytes in each catalog attachment admitted or attachment emitted by this generated document. Defaults to 128 MiB.

public long MaxTotalEmbeddedFileBytes { get; set; } #

Maximum aggregate catalog payload bytes admitted and distinct attachment payload bytes emitted by this generated document. Defaults to 256 MiB.

public IReadOnlyList<PdfEmbeddedFile> EmbeddedFiles { get; } #

Embedded files associated with the generated document catalog.

public int? MaxGeneratedPages { get; set; } #

Optional maximum number of pages generated during PDF layout.

public long? MaxGeneratedOutputBytes { get; set; } #

Optional maximum number of bytes serialized for a generated PDF.

public bool CompressContentStreams { get; set; } #

When true (the default), generated page content streams are written with Flate compression.

public PdfObjectSerializationMode ObjectSerializationMode { get; set; } #

Controls whether completed indirect objects are buffered or emitted once in forward-only order.

public long ObjectBufferMemoryLimitBytes { get; set; } #

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

public long PageContentMemoryLimitBytes { get; set; } #

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

public bool IncludeStandardFontToUnicodeMaps { get; set; } #

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

public bool CompressEmbeddedFonts { get; set; } #

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

public bool IncludeXmpMetadata { get; set; } #

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

public bool IncludePageLabels { get; set; } #

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

public bool 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 PdfCreateOptions.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 PdfCatalogPageMode? CatalogPageMode { get; set; } #

Optional catalog page mode emitted for generated PDFs.

public 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 PdfFormFieldTextAlignment? AcroFormDefaultTextAlignment { get; set; } #

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

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 OfficeColor? BackgroundColor { get; set; } #

Page background for new composition. An explicit null keeps the page transparent.

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 bool EmbedDefaultFonts { get; set; } #

When true (the default), text set in a standard font slot (Helvetica, Times or Courier) that has no registered font file uses an installed font resolved through the default theme's fallback lists, embedded as a subset: the body font for Helvetica, the serif chain for Times and the monospace chain for Courier. When no font file can be found the standard font is written without embedding and a font-not-embedded diagnostic is reported. Set to false to write the non-embedded standard PDF fonts.

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 IReadOnlyList<PdfFontFamilySubstitution> FontFamilySubstitutions { get; } #

Configured source-to-embedded font substitutions ordered by source family.

public int 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 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 OfficeTheme? Theme { get; set; } #

Supplies defaults for new PDF composition. Null selects OfficeTheme.Default. Explicit option styles, fonts and sizes, and block/run formatting take precedence. Loading a PDF and source-format layout imports do not apply this theme.

public bool UseContinuingPageNumberForStartParity { get; set; } #

Uses the page number continuing the preceding group for start parity. Numbering restarts are applied after padding. Default is false, which uses the physical page index.

public PdfPageParity? PageStartParity { get; set; } #

Optional start parity for a composed page or section. Uses the physical page index unless PdfCreateOptions.UseContinuingPageNumberForStartParity is enabled. A blank page is inserted before a later section when needed; the first section starts without padding.

public PdfPageSetup PageSetup { get; } #

Page size, margins, orientation and running headers and footers of these options.

public PdfXIdentification? PdfXIdentification { get; set; } #

Optional PDF/X identification metadata written to XMP.

public PdfXProductionMetadata? PdfXProductionMetadata { get; set; } #

Production timestamps and identity reconciled between the PDF Info dictionary and XMP packet.

public PdfTrappingStatus? TrappingStatus { get; set; } #

Optional print trapping status written to the document information dictionary.

public bool ConvertVectorColorsToPdfXPrintCondition { get; set; } #

Converts generated text and vector RGB color operators through the configured PDF/X CMYK output profile.

public bool ConvertRasterImagesToPdfXPrintCondition { get; set; } #

Converts supported generated raster images through the configured PDF/X CMYK output profile.

public bool FlattenRasterTransparencyForPdfX { get; set; } #

Flattens raster alpha against PdfCreateOptions.PdfXTransparencyBackground during CMYK conversion.

public OfficeColor PdfXTransparencyBackground { get; set; } #

Background used when raster transparency is flattened for PDF/X-1a.

public OfficeIccRenderingIntent PdfXRenderingIntent { get; set; } #

ICC rendering intent used for generated vector and text color conversion.

public PdfBlackPreservationMode BlackPreservationMode { get; set; } #

Black-preservation policy used for generated vector and text color conversion.

public PdfPrintProductionPageBoxes? PrintProductionPageBoxes { get; set; } #

Optional TrimBox and BleedBox policy for generated print-production pages.

public PdfStandardFont DefaultFont { get; set; } #

Default standard font used for paragraphs.

public bool HasExplicitDefaultFont { get; } #

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

public OfficeLength DefaultFontSize { get; set; } #

Default paragraph font size; new composition inherits the theme body size unless assigned.

public OfficeColor? 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. When not assigned, the style comes from PdfCreateOptions.Theme.

public bool HasExplicitDefaultTableStyle { get; } #

Gets whether PdfCreateOptions.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. When not assigned, the styles come from PdfCreateOptions.Theme.

public PdfListStyle? DefaultListStyle { get; set; } #

Default list style applied when bullet and numbered lists do not specify their own style. When not assigned, the style comes from PdfCreateOptions.Theme.

public PdfPanelStyle? 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 bool CreateOutlineFromHeadings { get; set; } #

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

public int 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 bool TextKerning { get; set; } #

Applies pair kerning to text without explicit run features: OpenType GPOS/kern pairs for embedded fonts and Adobe AFM pairs for the standard Helvetica and Times fonts. The default is true. Setting false restores nominal glyph advances; runs with explicit features keep their own kern value.

public PdfTextWhitespaceMode TextWhitespaceMode { get; set; } #

Controls ordinary spaces in flow text. The default is PdfTextWhitespaceMode.Collapse.

public bool PreserveTextWhitespace { get; set; } #

Retains leading and repeated spaces. Setting true selects literal PdfTextWhitespaceMode.Preformatted layout; setting false selects PdfTextWhitespaceMode.Collapse.

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<int>>? 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, Microsoft YaHei, Yu Gothic, PingFang SC, Noto Sans CJK SC, Noto Sans CJK JP, Nirmala UI, DejaVu Sans, Droid Sans Fallback, WenQuanYi Zen Hei, IPAGothic, IPA Gothic, Noto Sans Arabic, Noto Naskh Arabic, Arabic Typesetting, Traditional Arabic, Microsoft Uighur, 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
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