Cmdlet
Read-OfficePdf
Reads a PDF into OfficeIMO.Pdf's canonical structured document model.
Syntax
Read-OfficePdf
[-IgnorePermissionRestrictions]
[-Options <PdfReadOptions>]
[-PageRange <String>]
[-Password <String>]
[-Path] <String>
[-Profile <Fast| Structured>]
[<CommonParameters>]#Parameter set:
PathRead-OfficePdf
-Document <PdfDocument>
[-Options <PdfReadOptions>]
[-PageRange <String>]
[-Profile <Fast| Structured>]
[<CommonParameters>]#Parameter set:
DocumentExamples
Read paragraphs and tables from a PDF.
$logical = Read-OfficePdf -Path .\Examples\Documents\Report.pdf -Profile Structured
foreach ($page in $logical.Pages) {
$page.Paragraphs | ForEach-Object { $_.Text }
$page.Tables | Select-Object @{ Name = 'Page'; Expression = { $page.PageNumber } }, @{ Name = 'Rows'; Expression = { $_.Rows.Count } }
}Returns the canonical OfficeIMO.Pdf result, including typed pages, paragraphs, tables, images, and diagnostics.
Parameters
- -IgnorePermissionRestrictions SwitchParameter
- After successful password authentication, explicitly ignore owner-imposed usage restrictions.
- -Options PdfReadOptions
- Advanced structured-read settings. Friendly parameters override the corresponding setting when explicitly supplied.
- -PageRange String
- Optional page ranges such as 1-3,5.
- -Password String
- Password used to open a Standard password-encrypted PDF.
- -Path String
- PDF file path.
- -Profile PdfReadProfile
- Semantic reconstruction profile. Structured is the default; Fast omits optional document-wide enrichment.
- Possible values:
Fast,Structured - -Document PdfDocument
- An existing OfficeIMO.Pdf document, such as output from Get-OfficePdf.
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.