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

ConvertTo-OfficePdfHtml

Aliases: ConvertTo-PdfHtml
Module
PSWriteOffice
Aliases
ConvertTo-PdfHtml
Inputs
System.String
Outputs
System.String System.IO.FileInfo

Converts a PDF file to HTML through the first-party OfficeIMO HTML/PDF adapter.

Syntax

ConvertTo-OfficePdfHtml
[-DocumentTitleFallback <String>]
[-Fragment]
[-IgnorePermissionRestrictions]
[-ImageExportMode <PlaceholderOnly|EmbeddedDataUri>]
[-IncludeFormWidgets]
[-IncludeLinkAnnotations]
[-MaxEmbeddedImageBytes <Int64>]
[-NoImagePlaceholders]
[-NoMetadata]
[-NoPageContainers]
[-Options <PdfToHtmlOptions>]
[-OutputPath <String>]
[-PageRange <String>]
[-Password <String>]
[-Path] <String>
[-Profile <Semantic|PositionedReview>]
[<CommonParameters>]
#
Parameter set: All Parameter Sets

Examples

Export a PDF as semantic HTML.

New-OfficePdf -Path .\report.pdf { Add-OfficePdfParagraph -Text 'Ready' }
ConvertTo-OfficePdfHtml -Path .\report.pdf -OutputPath .\report.html

Writes HTML generated from the OfficeIMO logical PDF read model.

Parameters

-DocumentTitleFallback String optional
Fallback HTML document title when PDF metadata does not provide one.
-Fragment SwitchParameter optional
Emit an HTML fragment instead of a complete document shell.
-IgnorePermissionRestrictions SwitchParameter optional
After successful password authentication, explicitly ignore owner-imposed extraction restrictions.
-ImageExportMode PdfHtmlImageExportMode optional
Controls whether extracted images are embedded or represented as placeholders.
Possible values: PlaceholderOnly, EmbeddedDataUri
-IncludeFormWidgets SwitchParameter optional
Include AcroForm widget placeholders.
-IncludeLinkAnnotations SwitchParameter optional
Include link annotation placeholders.
-MaxEmbeddedImageBytes Int64 optional
Maximum extracted image byte length that may be embedded into generated HTML. Set to 0 to disable embedding.
-NoImagePlaceholders SwitchParameter optional
Do not emit image placeholders.
-NoMetadata SwitchParameter optional
Do not emit PDF metadata into the generated HTML.
-NoPageContainers SwitchParameter optional
Do not emit page wrapper elements.
-Options PdfToHtmlOptions optional
Optional OfficeIMO PDF to HTML save options.
-OutputPath String optionalaliases: OutPath
Optional output HTML file path.
-PageRange String optional
Optional page ranges such as 1-3,5.
-Password String optional
Password used to read a Standard password-encrypted PDF.
-Path String requiredposition: 0pipeline: True (ByValue)aliases: FilePath
PDF file path.
-Profile PdfHtmlProfile optional
PDF to HTML profile to use when Options is not supplied.
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.