API Reference
Cmdlet
New-OfficeMarkdown
Creates a Markdown document using a DSL scriptblock.
Remarks
Runs the scriptblock against a Markdown document and saves it to disk unless -NoSave is specified.
Examples
Example 1: Create a Markdown document with headings and a table.
PS>
New-OfficeMarkdown -Path .\README.md { MarkdownHeading -Level 1 -Text 'Report'; MarkdownTable -InputObject $data }
Creates a README file with a heading and table content.
Example 2: Create a report with multiple tables.
PS>
New-OfficeMarkdown -Path .\Report.md {
MarkdownHeading -Level 1 -Text 'Summary'
MarkdownTable -InputObject $summary
MarkdownHeading -Level 2 -Text 'Details'
MarkdownTable -InputObject $details
}
Creates a report with two tables separated by headings.
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-OfficeMarkdown [-Content <ScriptBlock>] [-ImageRenderingMode <Nullable`1>] [-LineEnding <String>] [-MarkdownPdfOptions <MarkdownPdfSaveOptions>] [-NoSave] -OutputPath <String> [-PassThru] [-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 SetsParameters
- Content ScriptBlock
- DSL scriptblock describing Markdown content.
- ImageRenderingMode Nullable`1
- Controls how Markdown images are serialized. Possible values: RichMarkdown, PortableMarkdown, Html
- LineEnding String
- Markdown line ending: CRLF, LF, CR, or a literal line ending string.
- MarkdownPdfOptions MarkdownPdfSaveOptions
- Advanced Markdown PDF options. Friendly PDF parameters override matching values.
- NoSave SwitchParameter
- Skip saving after executing the DSL.
- OutputPath String
- Destination path for the Markdown file.
- PassThru SwitchParameter
- Emit a FileInfo for chaining.
- PdfApplyWordLikeTheme Nullable`1
- Apply the built-in Word-like Markdown PDF baseline theme.
- PdfAuthor String
- PDF author metadata.
- PdfBaseDirectory String
- Base directory used to resolve local Markdown images during PDF export.
- PdfConversionReportVariable String
- Variable name that receives the Markdown PDF conversion report.
- PdfCreateOutlineFromHeadings Nullable`1
- Create PDF outlines from Markdown headings.
- PdfDefaultImageHeight Nullable`1
- Fallback PDF image height in points.
- PdfDefaultImageWidth Nullable`1
- Fallback PDF image width in points.
- PdfFontFamily String
- Default font family used by Markdown PDF export.
- PdfFrontMatterRenderMode Nullable`1
- Controls how YAML front matter appears in the PDF body. Possible values: Hidden, DocumentHeader, Table
- PdfIncludeDataUriImages Nullable`1
- Embed supported data URI images in Markdown PDF output.
- PdfIncludeLocalImages Nullable`1
- Embed supported local image files in Markdown PDF output.
- PdfKeywords String
- PDF keywords metadata.
- PdfMaximumDataUriImageBytes Nullable`1
- Maximum decoded bytes for one data URI image in Markdown PDF output.
- PdfOptions PdfOptions
- Underlying OfficeIMO.Pdf options used by Markdown PDF export.
- PdfPath String
- Optional PDF path to create from the same Markdown document.
- PdfRestrictLocalImagesToBaseDirectory Nullable`1
- Require local images to resolve under the base directory.
- PdfSubject String
- PDF subject metadata.
- PdfTheme Nullable`1
- Built-in Markdown PDF visual theme. Possible values: Plain, WordLike, TechnicalDocument, GitHubLike, Compact, Report
- PdfTitle String
- PDF title metadata.
- PdfUseFirstHeadingAsTitle Nullable`1
- Use the first Markdown heading as the PDF title when no title is supplied.
- PdfUseFrontMatterMetadata Nullable`1
- Use front matter values as PDF metadata.
- PdfUseFrontMatterVisualTheme Nullable`1
- Use front matter values to select a visual theme.
- PdfWarningVariable String
- Variable name that receives Markdown PDF export warnings.
- UnorderedListMarker String
- Unordered list marker: '-', '*', or '+'.
- WriteOptions MarkdownWriteOptions
- Optional Markdown writer options.
- WriteProfile Nullable`1
- Friendly Markdown writer profile. Possible values: OfficeIMO, Portable, HtmlImage
Outputs
OfficeIMO.Markdown.MarkdownDoc, System.IO.FileInfo