API Reference

Cmdlet

New-OfficeMarkdownPdfOptions

Namespace PSWriteOffice
Inputs
OfficeIMO.Markdown.Pdf.MarkdownPdfSaveOptions
Outputs
OfficeIMO.Markdown.Pdf.MarkdownPdfSaveOptions

Creates discoverable Markdown-to-PDF conversion options for Export-OfficeDocumentPdf.

Remarks

Creates discoverable Markdown-to-PDF conversion options for Export-OfficeDocumentPdf.

Examples

Authored help example

Allow local report images and apply PDF metadata.

PS>


$options = New-OfficeMarkdownPdfOptions -Title 'Service report' -Author 'Evotec' -IncludeLocalImages -BaseDirectory .\Assets
            Export-OfficeDocumentPdf -InputPath .\Report.md -Path .\Report.pdf -MarkdownOptions $options
        

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

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.

Syntax

New-OfficeMarkdownPdfOptions [-ApplyWordLikeTheme] [-Author <String>] [-BaseDirectory <String>] [-CreateOutlineFromHeadings] [-DefaultImageHeight <Double>] [-DefaultImageWidth <Double>] [-FontFamily <String>] [-FrontMatterRenderMode <Hidden|DocumentHeader|Table>] [-IncludeDataUriImages] [-IncludeLocalImages] [-Keywords <String>] [-MaximumDataUriImageBytes <Int32>] [-Options <MarkdownPdfSaveOptions>] [-PdfOptions <PdfOptions>] [-RestrictLocalImagesToBaseDirectory] [-Subject <String>] [-Theme <Plain>] [-Title <String>] [-UseFirstHeadingAsTitle] [-UseFrontMatterMetadata] [-UseFrontMatterVisualTheme] [<CommonParameters>]
#
Parameter set: All Parameter Sets

Parameters

ApplyWordLikeTheme SwitchParameter optionalposition: namedpipeline: False
Apply the built-in Word-like Markdown PDF baseline theme.
Author String optionalposition: namedpipeline: False
PDF author metadata.
BaseDirectory String optionalposition: namedpipeline: False
Base directory used to resolve local Markdown images.
CreateOutlineFromHeadings SwitchParameter optionalposition: namedpipeline: False
Create PDF outlines from Markdown headings.
DefaultImageHeight Double optionalposition: namedpipeline: False
Fallback image height in PDF points.
DefaultImageWidth Double optionalposition: namedpipeline: False
Fallback image width in PDF points.
FontFamily String optionalposition: namedpipeline: False
Default font family.
FrontMatterRenderMode MarkdownPdfFrontMatterRenderMode optionalposition: namedpipeline: Falsevalues: 3
Controls how YAML front matter appears in the PDF body.
Possible values: Hidden, DocumentHeader, Table
IncludeDataUriImages SwitchParameter optionalposition: namedpipeline: False
Embed supported data URI images.
IncludeLocalImages SwitchParameter optionalposition: namedpipeline: False
Embed supported local image files.
Keywords String optionalposition: namedpipeline: False
PDF keywords metadata.
MaximumDataUriImageBytes Int32 optionalposition: namedpipeline: False
Maximum decoded bytes for one data URI image.
Options MarkdownPdfSaveOptions optionalposition: namedpipeline: True (ByValue)
Existing Markdown PDF options to clone and override.
PdfOptions PdfOptions optionalposition: namedpipeline: False
Underlying low-level OfficeIMO PDF options.
RestrictLocalImagesToBaseDirectory SwitchParameter optionalposition: namedpipeline: False
Require local images to resolve under BaseDirectory.
Subject String optionalposition: namedpipeline: False
PDF subject metadata.
Theme OfficeVisualThemeKind optionalposition: namedpipeline: Falsevalues: 6
Built-in visual theme.
Possible values: Plain, WordLike, TechnicalDocument, GitHubLike, Compact, Report
Title String optionalposition: namedpipeline: False
PDF title metadata.
UseFirstHeadingAsTitle SwitchParameter optionalposition: namedpipeline: False
Use the first Markdown heading as the PDF title when no title is supplied.
UseFrontMatterMetadata SwitchParameter optionalposition: namedpipeline: False
Use front matter values as PDF metadata.
UseFrontMatterVisualTheme SwitchParameter optionalposition: namedpipeline: False
Use front matter values to select a visual theme.

Outputs

OfficeIMO.Markdown.Pdf.MarkdownPdfSaveOptions