Cmdlet
ConvertTo-OfficePdfHtml
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 SetsExamples
Export a PDF as semantic HTML.
New-OfficePdf -Path .\report.pdf { Add-OfficePdfParagraph -Text 'Ready' }
ConvertTo-OfficePdfHtml -Path .\report.pdf -OutputPath .\report.htmlWrites HTML generated from the OfficeIMO logical PDF read model.
Parameters
- -DocumentTitleFallback String
- Fallback HTML document title when PDF metadata does not provide one.
- -Fragment SwitchParameter
- Emit an HTML fragment instead of a complete document shell.
- -IgnorePermissionRestrictions SwitchParameter
- After successful password authentication, explicitly ignore owner-imposed extraction restrictions.
- -ImageExportMode PdfHtmlImageExportMode
- Controls whether extracted images are embedded or represented as placeholders.
- Possible values:
PlaceholderOnly,EmbeddedDataUri - -IncludeFormWidgets SwitchParameter
- Include AcroForm widget placeholders.
- -IncludeLinkAnnotations SwitchParameter
- Include link annotation placeholders.
- -MaxEmbeddedImageBytes Int64
- Maximum extracted image byte length that may be embedded into generated HTML. Set to 0 to disable embedding.
- -NoImagePlaceholders SwitchParameter
- Do not emit image placeholders.
- -NoMetadata SwitchParameter
- Do not emit PDF metadata into the generated HTML.
- -NoPageContainers SwitchParameter
- Do not emit page wrapper elements.
- -Options PdfToHtmlOptions
- Optional OfficeIMO PDF to HTML save options.
- -OutputPath String
- Optional output HTML file path.
- -PageRange String
- Optional page ranges such as 1-3,5.
- -Password String
- Password used to read a Standard password-encrypted PDF.
- -Path String
- PDF file path.
- -Profile PdfHtmlProfile
- 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.