Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

MarkdownPdfExportOptions

OfficeIMO.Markdown.Pdf

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

Options for converting OfficeIMO.Markdown documents to first-party PDF documents.

Inheritance

  • object
  • MarkdownPdfExportOptions

Usage

Explore 6 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.

Accepted by parameters 4

Constructors

public MarkdownPdfExportOptions() #

Methods

public MarkdownPdfExportOptions Clone() #

Creates an independent copy of these conversion options.

public MarkdownPdfExportOptions UseProfile(PdfExportProfile profile) #

Applies a high-level export profile by setting the Markdown PDF options that correspond to that profile.

Parameters

profile OfficeIMO.Pdf.PdfExportProfile required

Properties

public bool FailOnLoss { get; set; } #

Rejects the converted artifact before publication when completed stages report loss.

public PdfCreateOptions? PdfOptions { get; set; } #

PDF creation options passed to the first-party PDF engine.

public string? FontFamily { get; set; } #

Optional Markdown default font family used by the first-party PDF engine.

public PdfTextFallbackFeatures TextFallbacks { get; set; } #

Built-in generated-text fallback groups applied by the Markdown PDF converter. Set to PdfTextFallbackFeatures.None for exact standard-font output.

public PdfResourcePolicy ResourcePolicy { get; set; } #

Host-resource policy. Defaults to balanced conversion: system fonts and bounded in-source resources are allowed and remote reads are denied. Local images are read only for a document loaded from a file, from that file's folder, unless a policy is assigned.

public bool ShowPageNumbers { get; set; } #

When true (the default), pages get a "Page N of M" footer. It applies when MarkdownPdfExportOptions.PdfOptions is not set; supplied PDF options keep their own header and footer settings. Set to false for documents without page numbers.

public bool IncludeImages { get; set; } #

When true, supported image references are rendered. Resource access is still governed by MarkdownPdfExportOptions.ResourcePolicy.

public bool ApplyDefaultTheme { get; set; } #

Applies the built-in Word-like PDF theme before rendering Markdown blocks.

public MarkdownVisualTheme? Theme { get; set; } #

Shared Markdown visual theme used to align PDF output with HTML and Word exporters. When set, this is translated into PDF-specific styling unless MarkdownPdfExportOptions.Style is also set.

public MarkdownPdfStyle? Style { get; set; } #

PDF-specific layout and rendering style overrides. Preset selection belongs to MarkdownPdfExportOptions.Theme so HTML, PDF, and Word share one visual-theme catalog.

public bool UseFrontMatterTheme { get; set; } #

Use theme, visualTheme, pdfTheme, or equivalent front matter values as the visual profile when no explicit theme is set.

public bool CreateOutlineFromHeadings { get; set; } #

Create PDF outlines from supported Markdown headings.

public bool UseFrontMatterMetadata { get; set; } #

Use common front matter keys such as title, author, subject, description, keywords, and tags as PDF metadata.

public MarkdownPdfFrontMatterRenderMode FrontMatterRenderMode { get; set; } #

Controls whether front matter is rendered as a document heading, a metadata table, or hidden from the PDF body.

public bool UseFirstHeadingAsTitle { get; set; } #

Use the first Markdown heading as PDF title metadata when no explicit or front matter title is available.

public string? Title { get; set; } #

Explicit PDF title metadata. When null, front matter or the first heading can be used.

public string? Author { get; set; } #

Explicit PDF author metadata. When null, front matter author can be used.

public string? Subject { get; set; } #

Explicit PDF subject metadata. When null, front matter subject, description, or summary can be used.

public string? Keywords { get; set; } #

Explicit PDF keywords metadata. When null, front matter keywords or tags can be used.

public string? BaseDirectory { get; set; } #

Base directory used to resolve relative local image paths.

public bool RestrictLocalImagesToBaseDirectory { get; set; } #

When true and MarkdownPdfExportOptions.BaseDirectory is set, local image paths must resolve inside that directory.

public int MaximumDataUriImageBytes { get; set; } #

Maximum decoded byte length for a single data URI image.

public Func<Uri, byte[]?>? RemoteImageResolver { get; set; } #

Optional resolver for HTTPS/HTTP Markdown images. When null, remote images are rendered as placeholders and recorded as warnings.

public int MaximumRemoteImageBytes { get; set; } #

Maximum byte length accepted from MarkdownPdfExportOptions.RemoteImageResolver for a single remote image.

public OfficeLength DefaultImageWidth { get; set; } #

Fallback image width when Markdown did not provide a width hint.

public OfficeLength DefaultImageHeight { get; set; } #

Fallback image height when Markdown did not provide a height hint.