Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Cmdlet

New-OfficeMarkdownPdfOptions

Module
PSWriteOffice
Inputs
OfficeIMO.Markdown.Pdf.MarkdownPdfExportOptions
Outputs
OfficeIMO.Markdown.Pdf.MarkdownPdfExportOptions

Creates native Markdown-to-PDF conversion options for Convert-OfficeDocument.

Syntax

New-OfficeMarkdownPdfOptions
[-Author <String>]
[-BaseDirectory <String>]
[-BaseOptions <MarkdownPdfExportOptions>]
[-DefaultImageHeight <OfficeLength>]
[-DefaultImageWidth <OfficeLength>]
[-Font <String>]
[-FrontMatterRenderMode <Hidden|DocumentHeader|Table>]
[-IncludeDataUriImages]
[-IncludeLocalImages]
[-Keywords <String>]
[-MaximumDataUriImageBytes <Int32>]
[-NoDefaultTheme]
[-NoFirstHeadingTitle]
[-NoFrontMatterMetadata]
[-NoFrontMatterTheme]
[-NoLocalImageRestriction]
[-NoOutline]
[-PdfOptions <PdfCreateOptions>]
[-Subject <String>]
[-Theme <OfficeThemeInput>]
[-Title <String>]
[<CommonParameters>]
#
Parameter set: Default

Examples

Allow local report images and apply PDF metadata.

$options = New-OfficeMarkdownPdfOptions -Title 'Service report' -Author 'Evotec' -IncludeLocalImages -BaseDirectory .\Assets
Convert-OfficeDocument -Path .\Report.md -OutputPath .\Report.pdf -Options $options

Builds a typed options object through ordinary PowerShell parameters; no hashtable or .NET construction is required.

Parameters

-Author String optional
PDF author metadata.
-BaseDirectory String optional
Base directory used to resolve local Markdown images.
-BaseOptions MarkdownPdfExportOptions optionalpipeline: True (ByValue)
Existing Markdown PDF options to clone and override.
-DefaultImageHeight OfficeLength optional
Fallback image height in PDF points.
-DefaultImageWidth OfficeLength optional
Fallback image width in PDF points.
-Font String optional
Default font family.
-FrontMatterRenderMode MarkdownPdfFrontMatterRenderMode optional
Controls how YAML front matter appears in the PDF body.
Possible values: Hidden, DocumentHeader, Table
-IncludeDataUriImages SwitchParameter optional
Embed supported data URI images.
-IncludeLocalImages SwitchParameter optional
Embed supported local image files.
-Keywords String optional
PDF keywords metadata.
-MaximumDataUriImageBytes Int32 optional
Maximum decoded bytes for one data URI image.
-NoDefaultTheme SwitchParameter optional
Skip the native default Markdown PDF theme.
-NoFirstHeadingTitle SwitchParameter optional
Use the first Markdown heading as the PDF title when no title is supplied.
-NoFrontMatterMetadata SwitchParameter optional
Use front matter values as PDF metadata.
-NoFrontMatterTheme SwitchParameter optional
Use front matter values to select a visual theme.
-NoLocalImageRestriction SwitchParameter optional
Require local images to resolve under BaseDirectory.
-NoOutline SwitchParameter optional
Create PDF outlines from Markdown headings.
-PdfOptions PdfCreateOptions optional
Underlying low-level OfficeIMO PDF options.
-Subject String optional
PDF subject metadata.
-Theme OfficeThemeInput optional
Built-in theme name, shared theme or theme package.
-Title String optional
PDF title metadata.

Common Parameters

This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.

For more information, see about_CommonParameters.