Project

PSWriteOffice

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

Stars 654
Forks 82
Open issues 1
Total downloads 4,320,051
Release OfficeIMO-v3.5.3
Language: C# Updated: 2026-11-03
Cmdlet

New-OfficeRtfPdfOptions

Module
PSWriteOffice
Inputs
None
Outputs
OfficeIMO.Rtf.Pdf.RtfToPdfOptions

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

Syntax

New-OfficeRtfPdfOptions
[-AllowDocumentFontEmbedding]
[-AllowSystemFontEmbedding]
[-DefaultImageHeight <Double>]
[-DefaultImageWidth <Double>]
[-IncludeHeaderFooters]
[-IncludeHiddenText]
[-IncludeImages]
[-IncludeMetadata]
[-IncludeNotes]
[-IncludeTables]
[-MaximumSystemFontFamilies <Int32>]
[-PdfOptions <PdfOptions>]
[<CommonParameters>]
#
Parameter set: All Parameter Sets

Examples

Include document structure and bound system-font discovery.

$options = New-OfficeRtfPdfOptions -IncludeImages -IncludeTables -IncludeHeaderFooters -MaximumSystemFontFamilies 32
Export-OfficeDocumentPdf -InputPath .\Report.rtf -Path .\Report.pdf -RtfOptions $options

Parameters

-AllowDocumentFontEmbedding SwitchParameter optional
Allow embedding fonts referenced by the RTF document.
-AllowSystemFontEmbedding SwitchParameter optional
Allow embedding fonts discovered on the current system.
-DefaultImageHeight Double optional
Fallback image height in PDF points.
-DefaultImageWidth Double optional
Fallback image width in PDF points.
-IncludeHeaderFooters SwitchParameter optional
Render headers and footers.
-IncludeHiddenText SwitchParameter optional
Include text marked hidden.
-IncludeImages SwitchParameter optional
Render images.
-IncludeMetadata SwitchParameter optional
Copy document metadata into the PDF.
-IncludeNotes SwitchParameter optional
Render document notes.
-IncludeTables SwitchParameter optional
Render tables.
-MaximumSystemFontFamilies Int32 optional
Maximum number of system font families to discover.
-PdfOptions PdfOptions optional
Underlying low-level OfficeIMO PDF options.

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.