API Reference
PdfOptions
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
- Property PdfCanvasStampOptions.RenderingOptions
- Method PdfEmbeddedFontFallbackSet.RegisterFonts
- Method PdfOptions.AddEmbeddedFile
- Method PdfOptions.AddEmbeddedFile
- Method PdfOptions.AddFacturXInvoiceXml
- Method PdfOptions.AddFacturXInvoiceXmlFile
- Method PdfOptions.AddPageLabelRange
- Method PdfOptions.ApplyTheme
- Method PdfOptions.ClearAcroFormDefaultTextAlignment
- Method PdfOptions.ClearCatalogUriBase
- Method PdfOptions.ClearCatalogView
- Method PdfOptions.ClearEmbeddedFiles
- Method PdfOptions.ClearEmbeddedStandardFonts
- Method PdfOptions.ClearEncryption
- Method PdfOptions.ClearNamedFontFamilies
- Method PdfOptions.ClearOpenAction
- Method PdfOptions.ClearPageLabelRanges
- Method PdfOptions.ClearPortfolio
- Method PdfOptions.Clone
- Method PdfOptions.ConfigureElectronicInvoiceGroundwork
- Method PdfOptions.ConfigureElectronicInvoiceGroundworkFile
- Method PdfOptions.ConfigureFacturXGroundwork
- Method PdfOptions.ConfigureFacturXGroundwork
- Method PdfOptions.ConfigureFacturXGroundworkFile
- Method PdfOptions.ConfigurePdfAGroundwork
- Method PdfOptions.ConfigurePdfUaGroundwork
- Method PdfOptions.ConfigurePdfUaGroundwork
- Method PdfOptions.ConfigureViewerPreferences
- Method PdfOptions.EmbedStandardFont
- Method PdfOptions.EmbedStandardFont
- Method PdfOptions.EnableTaggedPdfCatalogMarkers
- Method PdfOptions.RegisterEmbeddedFontFallbacks
- Method PdfOptions.RegisterFontFamily
- Method PdfOptions.RegisterNamedFontFamily
- Method PdfOptions.RegisterOfficeFontFamily
- Method PdfOptions.ReportDiagnosticsTo
- Method PdfOptions.RequireCompliance
- Method PdfOptions.SetAcroFormDefaultTextAlignment
- Method PdfOptions.SetCatalogPageLayout
- Method PdfOptions.SetCatalogPageMode
- Method PdfOptions.SetCatalogUriBase
- Method PdfOptions.SetCatalogView
- Method PdfOptions.SetDefaultHeadingStyle
- Method PdfOptions.SetElectronicInvoiceMetadata
- Method PdfOptions.SetElectronicInvoiceMetadata
- Method PdfOptions.SetEncryption
- Method PdfOptions.SetEncryption
- Method PdfOptions.SetFileVersion
- Method PdfOptions.SetFlattenVisualAnnotations
- Method PdfOptions.SetLanguage
- Method PdfOptions.SetOpenAction
- Method PdfOptions.SetOutputIntent
- Method PdfOptions.SetOutputIntent
- Method PdfOptions.SetOutputIntent
- Method PdfOptions.SetOutputIntent
- Method PdfOptions.SetOutputIntent
- Method PdfOptions.SetPageLabels
- Method PdfOptions.SetPdfAIdentification
- Method PdfOptions.SetPdfAIdentification
- Method PdfOptions.SetPdfUaIdentification
- Method PdfOptions.SetPdfUaIdentification
- Method PdfOptions.SetPortfolio
- Method PdfOptions.SetSrgbOutputIntent
- Method PdfOptions.SetTaggedStructureMode
- Method PdfOptions.SetTextHyphenation
- Method PdfOptions.SetTextLineBreaks
- Method PdfOptions.SetTextShapingMode
- Method PdfOptions.SetTextShapingProvider
- Method PdfOptions.SetViewerPreferences
- Method PdfOptions.UseEmbeddedFontFallbacksFromSystem
- Method PdfOptions.UseFacturX
- Method PdfOptions.UseFacturXFile
- Method PdfOptions.UseFontFamily
- Method PdfOptions.UseFontFamily
- Method PdfOptions.UseFontFamily
- Method PdfOptions.UseManagedTextShaping
- Method PdfOptions.UseOfficeFontFamily
- Method PdfOptions.UsePdfA
- Method PdfOptions.UsePdfUa
- Method PdfOptions.UseTextFallbacks
- Method PdfOptions.UseTextHyphenationDictionary
Accepted by parameters
Constructors
public PdfOptions() #Methods
public PdfOptions AddEmbeddedFile(PdfEmbeddedFile file) #PdfOptionsAdds an embedded file associated with the generated PDF catalog.
Parameters
- file OfficeIMO.Pdf.PdfEmbeddedFile
public PdfOptions AddEmbeddedFile(String fileName, Byte[] data, String mimeType = null, PdfAssociatedFileRelationship relationship = Unspecified, String description = null) #PdfOptionsAdds an embedded file associated with the generated PDF catalog.
Parameters
- fileName System.String
- data System.Byte[]
- mimeType System.String = null
- relationship OfficeIMO.Pdf.PdfAssociatedFileRelationship = Unspecified
- description System.String = null
public PdfOptions AddFacturXInvoiceXml(Byte[] ciiXml, String conformanceLevel = "EN 16931", String version = "1.0", PdfAssociatedFileRelationship relationship = Data, String description = "Factur-X/ZUGFeRD invoice XML") #PdfOptionsAdds the canonical Factur-X/ZUGFeRD CrossIndustryInvoice XML payload and matching XMP extension metadata.
Parameters
- ciiXml System.Byte[]
- conformanceLevel System.String = "EN 16931"
- version System.String = "1.0"
- relationship OfficeIMO.Pdf.PdfAssociatedFileRelationship = Data
- description System.String = "Factur-X/ZUGFeRD invoice XML"
public PdfOptions AddFacturXInvoiceXmlFile(String ciiXmlPath, String conformanceLevel = "EN 16931", String version = "1.0", PdfAssociatedFileRelationship relationship = Data, String description = "Factur-X/ZUGFeRD invoice XML") #PdfOptionsAdds the canonical Factur-X/ZUGFeRD CrossIndustryInvoice XML file and matching XMP extension metadata.
Parameters
- ciiXmlPath System.String
- conformanceLevel System.String = "EN 16931"
- version System.String = "1.0"
- relationship OfficeIMO.Pdf.PdfAssociatedFileRelationship = Data
- description System.String = "Factur-X/ZUGFeRD invoice XML"
public PdfOptions AddPageLabelRange(Int32 startPageNumber, PdfPageNumberStyle style, Int32 startNumber = 1, String prefix = null) #PdfOptionsAdds a generated catalog page-label rule beginning at the specified one-based document page.
Parameters
- startPageNumber System.Int32
- style OfficeIMO.Pdf.PdfPageNumberStyle
- startNumber System.Int32 = 1
- prefix System.String = null
public PdfOptions ApplyTheme(PdfTheme theme) #PdfOptionsApplies reusable default styles to this options object.
Parameters
- theme OfficeIMO.Pdf.PdfTheme
public PdfOptions ClearAcroFormDefaultTextAlignment() #PdfOptionsClears the generated AcroForm default text alignment.
public PdfOptions ClearCatalogView() #PdfOptionsClears generated catalog page mode and page layout viewer hints.
public PdfOptions ClearEmbeddedFiles() #PdfOptionsRemoves all embedded files associated with the generated PDF catalog.
public PdfOptions ClearEmbeddedStandardFonts() #PdfOptionsRemoves all embedded standard-font mappings.
public PdfOptions ClearNamedFontFamilies() #PdfOptionsRemoves every embedded named family and its parsed program cache.
public PdfOptions ClearPageLabelRanges() #PdfOptionsClears generated catalog page-label ranges while leaving simple page-label options unchanged.
public PdfOptions ClearPortfolio() #PdfOptionsClears the generated document portfolio configuration without removing embedded files.
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) #PdfOptionsConfigures common PDF/A-3 e-invoice groundwork for Factur-X or ZUGFeRD without enabling formal compliance profile generation.
Parameters
- profile OfficeIMO.Pdf.PdfComplianceProfile
- ciiXml System.Byte[]
- conformanceLevel System.String = "EN 16931"
- version System.String = "1.0"
- relationship OfficeIMO.Pdf.PdfAssociatedFileRelationship = Data
- description System.String = "Factur-X/ZUGFeRD invoice XML"
- useDocumentFontFallback System.Boolean = true
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) #PdfOptionsConfigures common PDF/A-3 e-invoice groundwork for Factur-X or ZUGFeRD from a CrossIndustryInvoice XML file.
Parameters
- profile OfficeIMO.Pdf.PdfComplianceProfile
- ciiXmlPath System.String
- conformanceLevel System.String = "EN 16931"
- version System.String = "1.0"
- relationship OfficeIMO.Pdf.PdfAssociatedFileRelationship = Data
- description System.String = "Factur-X/ZUGFeRD invoice XML"
- useDocumentFontFallback System.Boolean = true
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) #PdfOptionsConfigures common PDF/A-3 Factur-X/ZUGFeRD groundwork without enabling formal compliance profile generation.
Parameters
- ciiXml System.Byte[]
- conformanceLevel System.String = "EN 16931"
- version System.String = "1.0"
- relationship OfficeIMO.Pdf.PdfAssociatedFileRelationship = Data
- description System.String = "Factur-X/ZUGFeRD invoice XML"
- useDocumentFontFallback System.Boolean = true
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") #PdfOptionsConfigures common PDF/A-3 Factur-X/ZUGFeRD groundwork with explicit text fallback groups.
Parameters
- ciiXml System.Byte[]
- textFallbacks OfficeIMO.Pdf.PdfTextFallbackFeatures
- conformanceLevel System.String = "EN 16931"
- version System.String = "1.0"
- relationship OfficeIMO.Pdf.PdfAssociatedFileRelationship = Data
- description System.String = "Factur-X/ZUGFeRD invoice XML"
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) #PdfOptionsConfigures common PDF/A-3 Factur-X/ZUGFeRD groundwork from a CrossIndustryInvoice XML file.
Parameters
- ciiXmlPath System.String
- conformanceLevel System.String = "EN 16931"
- version System.String = "1.0"
- relationship OfficeIMO.Pdf.PdfAssociatedFileRelationship = Data
- description System.String = "Factur-X/ZUGFeRD invoice XML"
- useDocumentFontFallback System.Boolean = true
public PdfOptions ConfigurePdfAGroundwork(PdfComplianceProfile profile, String language = "en-US") #PdfOptionsConfigures common PDF/A-2, PDF/A-3, or PDF/A-4 groundwork without enabling formal compliance profile generation.
Parameters
- profile OfficeIMO.Pdf.PdfComplianceProfile
- language System.String = "en-US"
public PdfOptions ConfigurePdfUaGroundwork(String language = "en-US") #PdfOptionsConfigures common PDF/UA-1 groundwork without enabling formal compliance profile generation.
Parameters
- language System.String = "en-US"
public PdfOptions ConfigurePdfUaGroundwork(PdfComplianceProfile profile, String language = "en-US") #PdfOptionsConfigures common PDF/UA-1 or PDF/UA-2 groundwork without enabling formal compliance profile generation.
Parameters
- profile OfficeIMO.Pdf.PdfComplianceProfile
- language System.String = "en-US"
public PdfOptions ConfigureViewerPreferences(Action<PdfViewerPreferencesOptions> configure) #PdfOptionsConfigures generated catalog viewer preferences.
Parameters
- configure System.Action{OfficeIMO.Pdf.PdfViewerPreferencesOptions}
public PdfOptions EmbedStandardFont(PdfStandardFont font, Byte[] data, String fontName = null) #PdfOptionsEmbeds a TrueType font file for a generated standard-font slot.
Parameters
- font OfficeIMO.Pdf.PdfStandardFont
- data System.Byte[]
- fontName System.String = null
public PdfOptions EmbedStandardFont(PdfStandardFont font, String path, String fontName = null) #PdfOptionsEmbeds a TrueType font file from disk for a generated standard-font slot.
Parameters
- font OfficeIMO.Pdf.PdfStandardFont
- path System.String
- fontName System.String = null
public PdfOptions EnableTaggedPdfCatalogMarkers() #PdfOptionsEmits catalog-level tagged-PDF markers without claiming full tagged-content generation.
public Boolean HasEmbeddedStandardFontFamily(PdfStandardFont font) #BooleanReports whether a generated standard-font family slot currently has an embedded font mapping.
Parameters
- font OfficeIMO.Pdf.PdfStandardFont
- Generated PDF font slot or variant.
Returns
True when the normalized font family slot has embedded font data.
public Boolean HasNamedFontFamily(String familyName) #BooleanReports whether an embedded named family is registered.
Parameters
- familyName System.String
public PdfOptions RegisterEmbeddedFontFallbacks(PdfEmbeddedFontFallbackSet fallbackSet) #PdfOptionsRegisters a planned embedded-font fallback set into its generated standard-font family slots.
Parameters
- fallbackSet OfficeIMO.Pdf.PdfEmbeddedFontFallbackSet
- Fallback set that pairs prioritized embedded font candidates with generated font slots.
public PdfOptions RegisterFontFamily(PdfStandardFont baseFontFamily, PdfEmbeddedFontFamily fontFamily) #PdfOptionsRegisters 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
- The semantic standard family slot to back: Helvetica, Times-Roman, or Courier.
- fontFamily OfficeIMO.Pdf.PdfEmbeddedFontFamily
- Reusable TrueType font family to embed into that semantic slot.
public PdfOptions RegisterNamedFontFamily(PdfEmbeddedFontFamily fontFamily) #PdfOptionsRegisters 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
public PdfOptions RegisterOfficeFontFamily(String familyName, PdfStandardFont baseFontFamily, Boolean embedSystemFont = true) #PdfOptionsRegisters 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
- Office, CSS, or system font family name such as Aptos, Georgia, or Consolas.
- baseFontFamily OfficeIMO.Pdf.PdfStandardFont
- The semantic standard family slot to back: Helvetica, Times-Roman, or Courier.
- embedSystemFont System.Boolean = true
- When true, installed TrueType faces are embedded into the selected semantic slot when available.
public PdfOptions ReportDiagnosticsTo(PdfConversionReport report, String converter = "OfficeIMO.Pdf") #PdfOptionsRecords generated text diagnostics encountered while writing PDF content.
Parameters
- report OfficeIMO.Pdf.PdfConversionReport
- Mutable conversion report that receives text encoding, missing-glyph, shaping, and embedded-font diagnostics.
- converter System.String = "OfficeIMO.Pdf"
- Converter or adapter name to place on recorded warnings.
Returns
The current options instance for fluent configuration.
public PdfOptions RequireCompliance(PdfComplianceProfile profile) #PdfOptionsRequests a generated-PDF compliance profile for this document.
Parameters
- profile OfficeIMO.Pdf.PdfComplianceProfile
public PdfOptions SetAcroFormDefaultTextAlignment(Nullable<PdfFormFieldTextAlignment> alignment) #PdfOptionsSets or clears the generated AcroForm default text alignment emitted through /Q.
Parameters
- alignment System.Nullable{OfficeIMO.Pdf.PdfFormFieldTextAlignment}
public PdfOptions SetCatalogPageLayout(Nullable<PdfCatalogPageLayout> pageLayout) #PdfOptionsSets or clears the generated catalog page layout.
Parameters
- pageLayout System.Nullable{OfficeIMO.Pdf.PdfCatalogPageLayout}
public PdfOptions SetCatalogPageMode(Nullable<PdfCatalogPageMode> pageMode) #PdfOptionsSets or clears the generated catalog page mode.
Parameters
- pageMode System.Nullable{OfficeIMO.Pdf.PdfCatalogPageMode}
public PdfOptions SetCatalogUriBase(String uriBase) #PdfOptionsSets or clears the generated catalog URI base used by viewers to resolve relative URI actions.
Parameters
- uriBase System.String
public PdfOptions SetCatalogView(Nullable<PdfCatalogPageMode> pageMode = null, Nullable<PdfCatalogPageLayout> pageLayout = null) #PdfOptionsSets generated catalog page mode and page layout viewer hints.
Parameters
- pageMode System.Nullable{OfficeIMO.Pdf.PdfCatalogPageMode} = null
- pageLayout System.Nullable{OfficeIMO.Pdf.PdfCatalogPageLayout} = null
public PdfOptions SetDefaultHeadingStyle(Int32 level, PdfHeadingStyle style) #PdfOptionsSets the default style for a built-in heading level.
Parameters
- level System.Int32
- style OfficeIMO.Pdf.PdfHeadingStyle
public PdfOptions SetElectronicInvoiceMetadata(PdfElectronicInvoiceMetadata metadata) #PdfOptionsSets Factur-X/ZUGFeRD XMP extension metadata and enables XMP metadata emission.
Parameters
- metadata OfficeIMO.Pdf.PdfElectronicInvoiceMetadata
public PdfOptions SetElectronicInvoiceMetadata(String conformanceLevel, String version = "1.0") #PdfOptionsSets Factur-X/ZUGFeRD XMP extension metadata and enables XMP metadata emission.
Parameters
- conformanceLevel System.String
- version System.String = "1.0"
public PdfOptions SetEncryption(String userPassword, String ownerPassword = null, Int32 permissions = -4) #PdfOptionsSets Standard password security for generated PDFs.
Parameters
- userPassword System.String
- ownerPassword System.String = null
- permissions System.Int32 = -4
public PdfOptions SetEncryption(PdfStandardEncryptionOptions encryption) #PdfOptionsSets or clears Standard password security for generated PDFs.
Parameters
- encryption OfficeIMO.Pdf.PdfStandardEncryptionOptions
public PdfOptions SetFileVersion(PdfFileVersion version) #PdfOptionsSets the PDF file header version emitted for generated documents.
Parameters
- version OfficeIMO.Pdf.PdfFileVersion
public PdfOptions SetFlattenVisualAnnotations(Boolean flatten = true) #PdfOptionsEnables or disables flattening generated FreeText and Highlight annotations into page content.
Parameters
- flatten System.Boolean = true
public PdfOptions SetLanguage(String language) #PdfOptionsSets or clears the generated catalog document language.
Parameters
- language System.String
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) #PdfOptionsSets the generated catalog open action to a page destination.
Parameters
- pageNumber System.Int32 = 1
- destinationTop System.Nullable{System.Double} = null
- destinationMode OfficeIMO.Pdf.PdfOpenActionDestinationMode = Xyz
- destinationLeft System.Nullable{System.Double} = null
- destinationBottom System.Nullable{System.Double} = null
- destinationRight System.Nullable{System.Double} = null
public PdfOptions SetOutputIntent(PdfOutputIntent outputIntent) #PdfOptionsSets a generated catalog output intent backed by an ICC profile.
Parameters
- outputIntent OfficeIMO.Pdf.PdfOutputIntent
public PdfOptions SetOutputIntent(Byte[] iccProfile) #PdfOptionsSets a generated catalog output intent from ICC profile bytes using the default sRGB output condition identifier.
Parameters
- iccProfile System.Byte[]
public PdfOptions SetOutputIntent(Byte[] iccProfile, String outputConditionIdentifier) #PdfOptionsSets a generated catalog output intent from ICC profile bytes.
Parameters
- iccProfile System.Byte[]
- outputConditionIdentifier System.String
public PdfOptions SetOutputIntent(Byte[] iccProfile, PdfOutputIntentPolicy policy) #PdfOptionsSets a generated catalog output intent from ICC profile bytes using the default sRGB output condition identifier.
Parameters
- iccProfile System.Byte[]
- policy OfficeIMO.Pdf.PdfOutputIntentPolicy
public PdfOptions SetOutputIntent(Byte[] iccProfile, String outputConditionIdentifier, PdfOutputIntentPolicy policy) #PdfOptionsSets a generated catalog output intent from ICC profile bytes.
Parameters
- iccProfile System.Byte[]
- outputConditionIdentifier System.String
- policy OfficeIMO.Pdf.PdfOutputIntentPolicy
public PdfOptions SetPageLabels(Boolean include = true, String prefix = null) #PdfOptionsEnables or disables generated catalog page labels.
Parameters
- include System.Boolean = true
- prefix System.String = null
public PdfOptions SetPdfAIdentification(PdfAIdentification identification) #PdfOptionsSets PDF/A XMP identification metadata and enables XMP metadata emission.
Parameters
- identification OfficeIMO.Pdf.PdfAIdentification
public PdfOptions SetPdfAIdentification(Int32 part, String conformance) #PdfOptionsSets PDF/A XMP identification metadata and enables XMP metadata emission.
Parameters
- part System.Int32
- conformance System.String
public PdfOptions SetPdfUaIdentification(PdfUaIdentification identification) #PdfOptionsSets PDF/UA XMP identification metadata and enables XMP metadata emission.
Parameters
- identification OfficeIMO.Pdf.PdfUaIdentification
public PdfOptions SetPdfUaIdentification(Int32 part = 1) #PdfOptionsSets PDF/UA XMP identification metadata and enables XMP metadata emission.
Parameters
- part System.Int32 = 1
public PdfOptions SetPortfolio(PdfPortfolioOptions portfolio) #PdfOptionsConfigures the generated embedded files as a document portfolio.
Parameters
- portfolio OfficeIMO.Pdf.PdfPortfolioOptions
public PdfOptions SetSrgbOutputIntent() #PdfOptionsSets the generated catalog output intent to OfficeIMO's built-in sRGB IEC61966-2.1 ICC profile.
public PdfOptions SetTaggedStructureMode(PdfTaggedStructureMode mode) #PdfOptionsSets the generated tagged-PDF groundwork mode.
Parameters
- mode OfficeIMO.Pdf.PdfTaggedStructureMode
public PdfOptions SetTextHyphenation(PdfTextHyphenationCallback callback) #PdfOptionsSets or clears the callback used to provide preferred break positions for long unspaced tokens.
Parameters
- callback OfficeIMO.Pdf.PdfTextHyphenationCallback
- Callback returning UTF-16 break indexes for a token, or null to disable the hook.
public PdfOptions SetTextLineBreaks(Func<String, IReadOnlyList<Int32>> callback) #PdfOptionsSets 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}}
- Callback returning UTF-16 break indexes for a token, or null to disable the hook.
public PdfOptions SetTextShapingMode(PdfTextShapingMode mode) #PdfOptionsSets the dependency-free generated text shaping mode used by embedded font output.
Parameters
- mode OfficeIMO.Pdf.PdfTextShapingMode
- Shaping mode to apply when writing generated text with embedded fonts.
public PdfOptions SetTextShapingProvider(IOfficeTextShapingProvider provider) #PdfOptionsSets or clears the host-provided shaping engine used for generated text written with embedded fonts.
Parameters
- provider OfficeIMO.Drawing.IOfficeTextShapingProvider
- 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) #PdfOptionsSets or clears generated catalog viewer preferences.
Parameters
- preferences OfficeIMO.Pdf.PdfViewerPreferencesOptions
public Boolean TryRegisterDefaultDocumentMonospaceFontFallback(Boolean requireEmbeddedFont = false) #BooleanAttempts to register the shared document monospace fallback family for generated PDF code/preformatted text.
Parameters
- requireEmbeddedFont System.Boolean = false
- 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) #BooleanTries 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
- System font family candidates, for example Segoe UI Emoji, Noto Emoji, DejaVu Sans.
- maxFallbackFonts System.Int32 = 2
- 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) #BooleanLoads and registers the first installed family in an Office/CSS family list.
Parameters
- familyNames System.String
- Comma- or semicolon-separated installed family candidates.
- registeredFamilyName System.String@
- The registered installed family name when successful.
Returns
True when an installed embeddable family was found and registered.
public Boolean TryUseDefaultDocumentFontFallback(Boolean requireEmbeddedFont = true) #BooleanAttempts to configure the shared document Unicode font fallback family for generated PDF text.
Parameters
- requireEmbeddedFont System.Boolean = true
- 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) #BooleanAttempts to use an Office-style font family name and reports whether the generated PDF text font state changed.
Parameters
- familyName System.String
- Office, CSS, or system font family name such as Aptos, Calibri, or Consolas.
- embedSystemFont System.Boolean = true
- When true, installed TrueType faces are preferred over dependency-free standard PDF font aliases.
- requireEmbeddedFont System.Boolean = false
- 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) #PdfOptionsRegisters 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
- System font family candidates, for example Segoe UI Emoji, Noto Emoji, DejaVu Sans.
- maxFallbackFonts System.Int32 = 2
- 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) #PdfOptionsApplies Factur-X/ZUGFeRD PDF/A-3 groundwork and attaches the CrossIndustryInvoice XML payload.
Parameters
- ciiXml System.Byte[]
- conformanceLevel System.String = "EN 16931"
- version System.String = "1.0"
- relationship OfficeIMO.Pdf.PdfAssociatedFileRelationship = Data
- description System.String = "Factur-X/ZUGFeRD invoice XML"
- textFallbacks OfficeIMO.Pdf.PdfTextFallbackFeatures = DocumentFont
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) #PdfOptionsApplies Factur-X/ZUGFeRD PDF/A-3 groundwork from a CrossIndustryInvoice XML file.
Parameters
- ciiXmlPath System.String
- conformanceLevel System.String = "EN 16931"
- version System.String = "1.0"
- relationship OfficeIMO.Pdf.PdfAssociatedFileRelationship = Data
- description System.String = "Factur-X/ZUGFeRD invoice XML"
- textFallbacks OfficeIMO.Pdf.PdfTextFallbackFeatures = DocumentFont
public PdfOptions UseFontFamily(String familyName, Byte[] regular, Byte[] bold = null, Byte[] italic = null, Byte[] boldItalic = null) #PdfOptionsUses a caller-supplied TrueType font family as the generated document's default font family.
Parameters
- familyName System.String
- regular System.Byte[]
- bold System.Byte[] = null
- italic System.Byte[] = null
- boldItalic System.Byte[] = null
public PdfOptions UseFontFamily(PdfEmbeddedFontFamily fontFamily) #PdfOptionsUses a reusable caller-supplied TrueType font family as the generated document's default font family.
Parameters
- fontFamily OfficeIMO.Pdf.PdfEmbeddedFontFamily
public PdfOptions UseFontFamily(String familyName, String regularPath, String boldPath = null, String italicPath = null, String boldItalicPath = null) #PdfOptionsUses caller-supplied TrueType font files as the generated document's default font family.
Parameters
- familyName System.String
- regularPath System.String
- boldPath System.String = null
- italicPath System.String = null
- boldItalicPath System.String = null
public PdfOptions UseManagedTextShaping() #PdfOptionsUses the shared dependency-light Drawing provider for bounded Arabic joining and bidirectional text.
public PdfOptions UseOfficeFontFamily(String familyName, Boolean embedSystemFont = true) #PdfOptionsUses 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
- Office, CSS, or system font family name such as Aptos, Calibri, or Consolas.
- embedSystemFont System.Boolean = true
- When true, installed TrueType faces are preferred over dependency-free standard PDF font aliases.
public PdfOptions UsePdfA(PdfComplianceProfile profile = PdfA3B, String language = "en-US") #PdfOptionsApplies common PDF/A groundwork for the requested profile.
Parameters
- profile OfficeIMO.Pdf.PdfComplianceProfile = PdfA3B
- language System.String = "en-US"
public PdfOptions UsePdfUa(PdfComplianceProfile profile = PdfUa1, String language = "en-US") #PdfOptionsApplies common PDF/UA groundwork for the requested profile.
Parameters
- profile OfficeIMO.Pdf.PdfComplianceProfile = PdfUa1
- language System.String = "en-US"
public PdfOptions UseTextFallbacks(PdfTextFallbackFeatures features = Default) #PdfOptionsApplies OfficeIMO's built-in generated-text fallback groups without requiring callers to manually assign fallback font slots.
Parameters
- features OfficeIMO.Pdf.PdfTextFallbackFeatures = Default
- 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) #PdfOptionsUses or clears an immutable first-party word hyphenation dictionary.
Parameters
- dictionary OfficeIMO.Pdf.PdfHyphenationLexicon
- Dictionary whose breakpoints should be used, or null to clear hyphenation.
Inherited Methods
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 String FirstPageHeaderFormat { get; set; } #Header text format used on page 1 when DifferentFirstPageHeaderFooter is true. Supports {page} and {pages}.
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 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 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.
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 Sanspublic const String DefaultDocumentSymbolAndEmojiFontFamilyFallback #Default installed symbol and emoji family candidates used by document converters for generated PDF text fallback runs.
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, Arialpublic const String DefaultDocumentFontFamilyFallback #Default installed sans-serif family candidates used by document converters when they need Unicode-capable generated PDF text.
Arial, Aptos, Calibri, Liberation Sans, DejaVu Sanspublic const String DefaultDocumentMonospaceFontFamilyFallback #Default installed monospace family candidates used by document converters for code and preformatted text.
Consolas, Courier New, Liberation Mono, DejaVu Sans Mono