Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Cmdlet

New-OfficePdfHtmlOptions

Module
PSWriteOffice
Inputs
None
Outputs
OfficeIMO.Html.Pdf.PdfHtmlExportOptions

Creates native semantic or positioned PDF-to-HTML export settings.

Syntax

New-OfficePdfHtmlOptions
[-DocumentTitleFallback <String>]
[-Fragment]
[-ImageExportMode <PlaceholderOnly|EmbeddedDataUri>]
[-IncludeFormWidgets]
[-IncludeLinkAnnotations]
[-MaxEmbeddedImageSize <Int64>]
[-NoImagePlaceholders]
[-NoMetadata]
[-NoPageContainers]
[-Profile <Semantic|PositionedReview>]
[<CommonParameters>]
#
Parameter set: Default

Examples

Create positioned review HTML with the source links and form fields.

$options = New-OfficePdfHtmlOptions -Profile PositionedReview
Convert-OfficeDocument -Path ./Review.pdf -To Html -OutputPath ./Review.html -Options $options

Export a fragment without source metadata or page containers.

$options = New-OfficePdfHtmlOptions -Fragment -NoMetadata -NoPageContainers
Convert-OfficeDocument -Path ./Report.pdf -To Html -AsString -Options $options

Parameters

-DocumentTitleFallback String optional
Document title used when the source PDF has no title.
-Fragment SwitchParameter optional
Return an HTML fragment without the complete document shell.
-ImageExportMode PdfHtmlImageExportMode optional
Use embedded images or placeholders for detected PDF images.
Possible values: PlaceholderOnly, EmbeddedDataUri
-IncludeFormWidgets SwitchParameter optional
Include inert form-widget projections; positioned review enables them by default.
-IncludeLinkAnnotations SwitchParameter optional
Include inert link annotations; positioned review enables them by default.
-MaxEmbeddedImageSize Int64 optional
Maximum source image bytes embedded in the HTML; zero embeds no nonempty image.
-NoImagePlaceholders SwitchParameter optional
Exclude readable image projections.
-NoMetadata SwitchParameter optional
Exclude source document metadata.
-NoPageContainers SwitchParameter optional
Omit semantic page wrappers and page-number metadata.
-Profile PdfHtmlProfile optional
Semantic content or positioned, inert review HTML; semantic is the default.
Possible values: Semantic, PositionedReview

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.