Cmdlet
New-OfficeMarkdownPdfOptions
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:
DefaultExamples
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 $optionsBuilds a typed options object through ordinary PowerShell parameters; no hashtable or .NET construction is required.
Parameters
- PDF author metadata.
- -BaseDirectory String
- Base directory used to resolve local Markdown images.
- -BaseOptions MarkdownPdfExportOptions
- Existing Markdown PDF options to clone and override.
- -DefaultImageHeight OfficeLength
- Fallback image height in PDF points.
- -DefaultImageWidth OfficeLength
- Fallback image width in PDF points.
- -Font String
- Default font family.
- -FrontMatterRenderMode MarkdownPdfFrontMatterRenderMode
- Controls how YAML front matter appears in the PDF body.
- Possible values:
Hidden,DocumentHeader,Table - -IncludeDataUriImages SwitchParameter
- Embed supported data URI images.
- -IncludeLocalImages SwitchParameter
- Embed supported local image files.
- -Keywords String
- PDF keywords metadata.
- -MaximumDataUriImageBytes Int32
- Maximum decoded bytes for one data URI image.
- -NoDefaultTheme SwitchParameter
- Skip the native default Markdown PDF theme.
- -NoFirstHeadingTitle SwitchParameter
- Use the first Markdown heading as the PDF title when no title is supplied.
- -NoFrontMatterMetadata SwitchParameter
- Use front matter values as PDF metadata.
- -NoFrontMatterTheme SwitchParameter
- Use front matter values to select a visual theme.
- -NoLocalImageRestriction SwitchParameter
- Require local images to resolve under BaseDirectory.
- -NoOutline SwitchParameter
- Create PDF outlines from Markdown headings.
- -PdfOptions PdfCreateOptions
- Underlying low-level OfficeIMO PDF options.
- -Subject String
- PDF subject metadata.
- -Theme OfficeThemeInput
- Built-in theme name, shared theme or theme package.
- -Title String
- 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.