Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Cmdlet

New-OfficeConversionOptions

Module PSWriteOffice
Inputs
None

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 Sets

Description

Requires PowerShell 7.4 or newer. Format-specific options apply only to their matching routes.

Examples

Authored help example

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 $options

Parameters

-AllowLegacyImportLoss SwitchParameter optional
Explicitly accept known legacy DOC import reductions.
-ChmOptions ChmConversionOptions optional
CHM topic selection and conversion budgets.
-CompressPdfOutput SwitchParameter optional
Losslessly compress generated PDF output.
-DjVuOptions DjVuToPdfOptions optional
DjVu scanned-page PDF and stored-text settings.
-DrawOptions OdgToPdfOptions optional
ODG/FODG drawing projection and PDF options; accepts a property hashtable.
-ExcelOptions ExcelToPdfOptions optional
Excel-to-PDF settings from New-OfficeExcelPdfOptions.
-HtmlOptions HtmlToPdfOptions optional
HTML-to-PDF settings from New-OfficeHtmlPdfOptions.
-MarkdownOptions MarkdownToPdfOptions optional
Markdown-to-PDF settings from New-OfficeMarkdownPdfOptions.
-PageRange String optional
Page ranges for PDF source reconstruction.
-PdfHtmlProfile PdfHtmlProfile optional
Semantic or positioned-review HTML reconstructed from PDF.
Possible values: Semantic, PositionedReview
-PdfPowerPointMode PdfPowerPointImportMode optional
PDF-to-PowerPoint reconstruction or rendered-page strategy.
Possible values: VisualPages, EditableTables, HybridVisualAndEditableTables, EditableContent, Auto
-PdfWordMode PdfWordImportMode optional
PDF-to-Word reconstruction or rendered-page strategy.
Possible values: EditableContent, VisualPages
-PowerPointOptions PowerPointToPdfOptions optional
PowerPoint-to-PDF settings from New-OfficePowerPointPdfOptions.
-PublisherPdfOptions PdfOptions optional
Shared PDF settings for recovered Publisher pages.
-PublisherReadOptions PublisherReadOptions optional
Native Publisher decoding and projection limits.
-RasterDpi Double optional
Resolution of rendered PDF pages, when applicable.
-RequireNoLoss SwitchParameter optional
Reject any reduction reported by the selected route.
-RtfOptions RtfToPdfOptions optional
RTF-to-PDF settings from New-OfficeRtfPdfOptions.
-TextOptions PdfPlainTextOptions optional
Literal-text settings from New-OfficeTextPdfOptions.
-VisioOptions VisioToPdfOptions optional
Visio diagram-page projection settings; accepts a property hashtable.
-WordOptions WordToPdfOptions optional
Word-to-PDF settings from New-OfficeWordPdfOptions.
-WorksheetLayout ExcelPdfWorksheetLayoutMode optional
Workbook worksheet-canvas or flowing-table layout.
Possible values: WorksheetCanvas, FlowTable
-XpsOptions XpsToPdfOptions optional
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.