# New-OfficeMarkdownPdfOptions

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

Cmdlet 

**Module**

`PSWriteOffice`

**Inputs**

`OfficeIMO.Markdown.Pdf.MarkdownPdfExportOptions`

**Outputs**

`OfficeIMO.Markdown.Pdf.MarkdownPdfExportOptions`

**Source**

[NewOfficeMarkdownPdfOptionsCommand.cs:19](https://github.com/EvotecIT/OfficeIMO/blob/3b680b1b6fb15a268ff5525a4ca6cdd70b2f6613/PowerShell/PSWriteOffice/Sources/PSWriteOffice/Cmdlets/Markdown/NewOfficeMarkdownPdfOptionsCommand.cs#L19) 

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>]
```

[#](#member-d22b06a299c93c9460988568)

Parameter set: `Default`

## Guides & Samples

Authored walkthroughs and practical samples linked to this command.

- [Convert Markdown to HTML, PDF and Word](/docs/markdown/convert/) Guide
  
  Convert Markdown to HTML, PDF and Word, and HTML back to Markdown, with conversion reports that list anything that could not be kept.

## Examples

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

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

<!-- PowerForge markdown artifact sha256:C3FEC61762D90ECC5DAB69AEE5C8461A09BD0152EBD5A2B931A8F3021E46BF49 -->
