# New-OfficeMarkdownPdfOptions

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

Project

PSWriteOffice

PowerShell document automation across OfficeIMO's document, spreadsheet, presentation, PDF, Project, Access, EPUB, invoicing, and conversion engines.

[View on GitHub](https://github.com/EvotecIT/OfficeIMO/tree/master/PowerShell/PSWriteOffice) [Visit Website](#) [Releases](https://github.com/EvotecIT/PSWriteOffice/releases/tag/v3.0.5) [Changelog](#) [Get package](https://www.powershellgallery.com/packages/PSWriteOffice/0.2.0)

Stars **727**

Forks **84**

Open issues **7**

Total downloads **5,275,783**

Release **OfficeIMO-v3.6.2**

Language: C# Updated: 2026-11-24

Cmdlet 

**Module**

`PSWriteOffice`

**Inputs**

`OfficeIMO.Markdown.Pdf.MarkdownToPdfOptions`

**Outputs**

`OfficeIMO.Markdown.Pdf.MarkdownToPdfOptions`

**Source**

[NewOfficeMarkdownPdfOptionsCommand.cs:18](https://github.com/EvotecIT/PSWriteOffice/blob/main/Sources/PSWriteOffice/Cmdlets/Markdown/NewOfficeMarkdownPdfOptionsCommand.cs#L18) 

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

## 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 <MarkdownToPdfOptions>]
[-PdfOptions <PdfOptions>]
[-RestrictLocalImagesToBaseDirectory]
[-Subject <String>]
[-Theme <OfficeVisualThemeKind>]
[-Title <String>]
[-UseFirstHeadingAsTitle]
[-UseFrontMatterMetadata]
[-UseFrontMatterVisualTheme]
[<CommonParameters>]
```

[#](#member-4e58e7e60b07c6bddb8324fd)

Parameter set: `All Parameter Sets`

## Examples

### Allow local report images and apply PDF metadata.

```powershell
$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.

## Parameters

**-ApplyWordLikeTheme SwitchParameter optional**

Apply the built-in Word-like Markdown PDF baseline theme.

**-Author String optional**

PDF author metadata.

**-BaseDirectory String optional**

Base directory used to resolve local Markdown images.

**-CreateOutlineFromHeadings SwitchParameter optional**

Create PDF outlines from Markdown headings.

**-DefaultImageHeight Double optional**

Fallback image height in PDF points.

**-DefaultImageWidth Double optional**

Fallback image width in PDF points.

**-FontFamily 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.

**-Options MarkdownToPdfOptions optionalpipeline: True (ByValue)**

Existing Markdown PDF options to clone and override.

**-PdfOptions PdfOptions optional**

Underlying low-level OfficeIMO PDF options.

**-RestrictLocalImagesToBaseDirectory SwitchParameter optional**

Require local images to resolve under BaseDirectory.

**-Subject String optional**

PDF subject metadata.

**-Theme OfficeVisualThemeKind optional**

Built-in visual theme.

Possible values: `Plain`, `WordLike`, `TechnicalDocument`, `GitHubLike`, `Compact`, `Report`

**-Title String optional**

PDF title metadata.

**-UseFirstHeadingAsTitle SwitchParameter optional**

Use the first Markdown heading as the PDF title when no title is supplied.

**-UseFrontMatterMetadata SwitchParameter optional**

Use front matter values as PDF metadata.

**-UseFrontMatterVisualTheme SwitchParameter optional**

Use front matter values to select a visual theme.

## 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](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_commonparameters).

Evotec API Reference Copyright 2026 Evotec Services

<!-- PowerForge markdown artifact sha256:1B63325B16FFAF265608B03002001CE8A7FECBE1BFFC0D3B6D5DFC6F07A76516 -->
