Cmdlet
New-OfficeConversionOptions
Creates discoverable renderer and reconstruction settings for general conversion jobs.
Syntax
New-OfficeConversionOptions [-AllowLegacyImportLoss] [-ChmOptions <ChmConversionOptions>] [-CompressPdfOutput] [-DjVuOptions <DjVuToPdfOptions>] [-DrawOptions <OdgToPdfOptions>] [-ExcelOptions <ExcelToPdfOptions>] [-HtmlOptions <HtmlToPdfOptions>] [-MarkdownOptions <MarkdownToPdfOptions>] [-PageRange <String>] [-PdfHtmlProfile <Semantic|PositionedReview>] [-PdfPowerPointMode <PdfPowerPointImportMode>] [-PdfWordMode <EditableContent|VisualPages>] [-PowerPointOptions <PowerPointToPdfOptions>] [-PublisherPdfOptions <PdfOptions>] [-PublisherReadOptions <PublisherReadOptions>] [-RasterDpi <Double>] [-RequireNoLoss] [-RtfOptions <RtfToPdfOptions>] [-TextOptions <PdfPlainTextOptions>] [-VisioOptions <VisioToPdfOptions>] [-WordOptions <WordToPdfOptions>] [-WorksheetLayout <WorksheetCanvas|FlowTable>] [-XpsOptions <XpsToPdfOptions>] [<CommonParameters>]#Parameter set:
All Parameter SetsDescription
Requires PowerShell 7.4 or newer. Format-specific options apply only to their matching routes.
Examples
Keep workbook charts in a strict conversion job.
$options = New-OfficeConversionOptions -RequireNoLoss -ExcelOptions (New-OfficeExcelPdfOptions -UseWorksheetCharts)
ConvertTo-OfficeDocument -InputPath ./report.xlsx -OutputPath ./report.pdf -ConversionOptions $optionsParameters
- -AllowLegacyImportLoss SwitchParameter
- Explicitly accept known legacy DOC import reductions.
- -ChmOptions ChmConversionOptions
- CHM topic selection and conversion budgets.
- -CompressPdfOutput SwitchParameter
- Losslessly compress generated PDF output.
- -DjVuOptions DjVuToPdfOptions
- DjVu scanned-page PDF and stored-text settings.
- -DrawOptions OdgToPdfOptions
- ODG/FODG drawing projection and PDF options; accepts a property hashtable.
- -ExcelOptions ExcelToPdfOptions
- Excel-to-PDF settings from New-OfficeExcelPdfOptions.
- -HtmlOptions HtmlToPdfOptions
- HTML-to-PDF settings from New-OfficeHtmlPdfOptions.
- -MarkdownOptions MarkdownToPdfOptions
- Markdown-to-PDF settings from New-OfficeMarkdownPdfOptions.
- -PageRange String
- Page ranges for PDF source reconstruction.
- -PdfHtmlProfile PdfHtmlProfile
- Semantic or positioned-review HTML reconstructed from PDF.
- Possible values:
Semantic,PositionedReview - -PdfPowerPointMode PdfPowerPointImportMode
- PDF-to-PowerPoint reconstruction or rendered-page strategy.
- Possible values:
VisualPages,EditableTables,HybridVisualAndEditableTables,EditableContent,Auto - -PdfWordMode PdfWordImportMode
- PDF-to-Word reconstruction or rendered-page strategy.
- Possible values:
EditableContent,VisualPages - -PowerPointOptions PowerPointToPdfOptions
- PowerPoint-to-PDF settings from New-OfficePowerPointPdfOptions.
- -PublisherPdfOptions PdfOptions
- Shared PDF settings for recovered Publisher pages.
- -PublisherReadOptions PublisherReadOptions
- Native Publisher decoding and projection limits.
- -RasterDpi Double
- Resolution of rendered PDF pages, when applicable.
- -RequireNoLoss SwitchParameter
- Reject any reduction reported by the selected route.
- -RtfOptions RtfToPdfOptions
- RTF-to-PDF settings from New-OfficeRtfPdfOptions.
- -TextOptions PdfPlainTextOptions
- Literal-text settings from New-OfficeTextPdfOptions.
- -VisioOptions VisioToPdfOptions
- Visio diagram-page projection settings; accepts a property hashtable.
- -WordOptions WordToPdfOptions
- Word-to-PDF settings from New-OfficeWordPdfOptions.
- -WorksheetLayout ExcelPdfWorksheetLayoutMode
- Workbook worksheet-canvas or flowing-table layout.
- Possible values:
WorksheetCanvas,FlowTable - -XpsOptions XpsToPdfOptions
- Native XPS preservation and PDF output settings.
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.