API Reference

Cmdlet

ConvertTo-OfficePdfHtml

Aliases: ConvertTo-PdfHtml
Namespace 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.

Remarks

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

Examples

Authored help example

Export a PDF as semantic HTML.

PS>


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.

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.

Syntax

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

Parameters

DocumentTitleFallback String optionalposition: namedpipeline: False
Fallback HTML document title when PDF metadata does not provide one.
Fragment SwitchParameter optionalposition: namedpipeline: False
Emit an HTML fragment instead of a complete document shell.
ImageExportMode PdfHtmlImageExportMode optionalposition: namedpipeline: Falsevalues: 2
Controls whether extracted images are embedded or represented as placeholders.
Possible values: PlaceholderOnly, EmbeddedDataUri
IncludeFormWidgets SwitchParameter optionalposition: namedpipeline: False
Include AcroForm widget placeholders.
IncludeLinkAnnotations SwitchParameter optionalposition: namedpipeline: False
Include link annotation placeholders.
MaxEmbeddedImageBytes Nullable`1 optionalposition: namedpipeline: False
Maximum extracted image byte length that may be embedded into generated HTML. Set to 0 to disable embedding.
NoImagePlaceholders SwitchParameter optionalposition: namedpipeline: False
Do not emit image placeholders.
NoMetadata SwitchParameter optionalposition: namedpipeline: False
Do not emit PDF metadata into the generated HTML.
NoPageContainers SwitchParameter optionalposition: namedpipeline: False
Do not emit page wrapper elements.
Options PdfHtmlSaveOptions optionalposition: namedpipeline: False
Optional OfficeIMO PDF to HTML save options.
OutputPath String optionalposition: namedpipeline: Falsealiases: OutPath
Optional output HTML file path.
PageRange String optionalposition: namedpipeline: False
Optional page ranges such as 1-3,5.
Password String optionalposition: namedpipeline: False
Password used to read a Standard password-encrypted PDF.
Path String requiredposition: 0pipeline: True (ByValue)aliases: FilePath
PDF file path.
Profile PdfHtmlProfile optionalposition: namedpipeline: Falsevalues: 2
PDF to HTML profile to use when Options is not supplied.
Possible values: Semantic, PositionedReview

Outputs

System.String System.IO.FileInfo