API Reference

Cmdlet

Save-OfficeMarkdown

Namespace PSWriteOffice
Inputs
OfficeIMO.Markdown.MarkdownDoc
Outputs
OfficeIMO.Markdown.MarkdownDoc System.IO.FileInfo

Saves a Markdown document and optionally creates a PDF sidecar.

Remarks

Saves a Markdown document and optionally creates a PDF sidecar.

Examples

Authored help example

Save Markdown and PDF outputs.

PS>


$doc | Save-OfficeMarkdown -Path .\Report.md -PdfPath .\Report.pdf
        

Writes both artifacts from the same Markdown document model.

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

Save-OfficeMarkdown -Document <MarkdownDoc> [-ImageRenderingMode <Nullable`1>] [-LineEnding <String>] [-MarkdownPdfOptions <MarkdownPdfSaveOptions>] [-PassThru] [-Path <String>] [-PdfApplyWordLikeTheme <Nullable`1>] [-PdfAuthor <String>] [-PdfBaseDirectory <String>] [-PdfConversionReportVariable <String>] [-PdfCreateOutlineFromHeadings <Nullable`1>] [-PdfDefaultImageHeight <Nullable`1>] [-PdfDefaultImageWidth <Nullable`1>] [-PdfFontFamily <String>] [-PdfFrontMatterRenderMode <Nullable`1>] [-PdfIncludeDataUriImages <Nullable`1>] [-PdfIncludeLocalImages <Nullable`1>] [-PdfKeywords <String>] [-PdfMaximumDataUriImageBytes <Nullable`1>] [-PdfOptions <PdfOptions>] [-PdfPath <String>] [-PdfRestrictLocalImagesToBaseDirectory <Nullable`1>] [-PdfSubject <String>] [-PdfTheme <Nullable`1>] [-PdfTitle <String>] [-PdfUseFirstHeadingAsTitle <Nullable`1>] [-PdfUseFrontMatterMetadata <Nullable`1>] [-PdfUseFrontMatterVisualTheme <Nullable`1>] [-PdfWarningVariable <String>] [-UnorderedListMarker <String>] [-WriteOptions <MarkdownWriteOptions>] [-WriteProfile <Nullable`1>] [<CommonParameters>]
#
Parameter set: All Parameter Sets

Parameters

Document MarkdownDoc requiredposition: 0pipeline: True (ByValue)
Markdown document to save.
ImageRenderingMode Nullable`1 optionalposition: namedpipeline: False
Controls how Markdown images are serialized.
LineEnding String optionalposition: namedpipeline: False
Markdown line ending: CRLF, LF, CR, or a literal line ending string.
MarkdownPdfOptions MarkdownPdfSaveOptions optionalposition: namedpipeline: False
Advanced Markdown PDF options. Friendly PDF parameters override matching values.
PassThru SwitchParameter optionalposition: namedpipeline: False
Emit the Markdown document rather than the saved file.
Path String optionalposition: 1pipeline: Falsealiases: FilePath
Destination Markdown path.
PdfApplyWordLikeTheme Nullable`1 optionalposition: namedpipeline: False
Apply the built-in Word-like Markdown PDF baseline theme.
PdfAuthor String optionalposition: namedpipeline: False
PDF author metadata.
PdfBaseDirectory String optionalposition: namedpipeline: False
Base directory used to resolve local Markdown images during PDF export.
PdfConversionReportVariable String optionalposition: namedpipeline: False
Variable name that receives the Markdown PDF conversion report.
PdfCreateOutlineFromHeadings Nullable`1 optionalposition: namedpipeline: False
Create PDF outlines from Markdown headings.
PdfDefaultImageHeight Nullable`1 optionalposition: namedpipeline: False
Fallback PDF image height in points.
PdfDefaultImageWidth Nullable`1 optionalposition: namedpipeline: False
Fallback PDF image width in points.
PdfFontFamily String optionalposition: namedpipeline: False
Default font family used by Markdown PDF export.
PdfFrontMatterRenderMode Nullable`1 optionalposition: namedpipeline: False
Controls how YAML front matter appears in the PDF body.
PdfIncludeDataUriImages Nullable`1 optionalposition: namedpipeline: False
Embed supported data URI images in Markdown PDF output.
PdfIncludeLocalImages Nullable`1 optionalposition: namedpipeline: False
Embed supported local image files in Markdown PDF output.
PdfKeywords String optionalposition: namedpipeline: False
PDF keywords metadata.
PdfMaximumDataUriImageBytes Nullable`1 optionalposition: namedpipeline: False
Maximum decoded bytes for one data URI image in Markdown PDF output.
PdfOptions PdfOptions optionalposition: namedpipeline: False
Underlying OfficeIMO.Pdf options used by Markdown PDF export.
PdfPath String optionalposition: namedpipeline: False
Optional PDF path to create from the same Markdown document.
PdfRestrictLocalImagesToBaseDirectory Nullable`1 optionalposition: namedpipeline: False
Require local images to resolve under the base directory.
PdfSubject String optionalposition: namedpipeline: False
PDF subject metadata.
PdfTheme Nullable`1 optionalposition: namedpipeline: False
Built-in Markdown PDF visual theme.
PdfTitle String optionalposition: namedpipeline: False
PDF title metadata.
PdfUseFirstHeadingAsTitle Nullable`1 optionalposition: namedpipeline: False
Use the first Markdown heading as the PDF title when no title is supplied.
PdfUseFrontMatterMetadata Nullable`1 optionalposition: namedpipeline: False
Use front matter values as PDF metadata.
PdfUseFrontMatterVisualTheme Nullable`1 optionalposition: namedpipeline: False
Use front matter values to select a visual theme.
PdfWarningVariable String optionalposition: namedpipeline: False
Variable name that receives Markdown PDF export warnings.
UnorderedListMarker String optionalposition: namedpipeline: False
Unordered list marker: '-', '*', or '+'.
WriteOptions MarkdownWriteOptions optionalposition: namedpipeline: False
Optional Markdown writer options.
WriteProfile Nullable`1 optionalposition: namedpipeline: False
Friendly Markdown writer profile.

Outputs

OfficeIMO.Markdown.MarkdownDoc System.IO.FileInfo