Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Cmdlet

New-OfficeHtmlPdfOptions

Module
PSWriteOffice
Inputs
OfficeIMO.Html.Pdf.HtmlPdfExportOptions
Outputs
OfficeIMO.Html.Pdf.HtmlPdfExportOptions

Creates HTML-to-PDF options for Convert-OfficeDocument -To Pdf.

Syntax

New-OfficeHtmlPdfOptions
[-BaseOptions <HtmlPdfExportOptions>]
[-Font <String>]
[-IncludeLocalResources]
[-Margin <OfficeLength>]
[-NoInteractiveFormControls]
[-PdfOptions <PdfCreateOptions>]
[<CommonParameters>]
#
Parameter set: Default

Examples

Use the native OfficeHtmlPdfOptions command.

Convert-OfficeDocument -Path .\Report.html -To Pdf -OutputPath .\Report.pdf -Options (New-OfficeHtmlPdfOptions -Margin 2cm)

Parameters

-BaseOptions HtmlPdfExportOptions optionalpipeline: True (ByValue)
BaseOptions for this operation.
-Font String optional
Font for this operation.
-IncludeLocalResources SwitchParameter optional
IncludeLocalResources for this operation.
-Margin OfficeLength optional
Margin for this operation.
-NoInteractiveFormControls SwitchParameter optional
NoInteractiveFormControls for this operation.
-PdfOptions PdfCreateOptions optional
PdfOptions for this operation.

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.