API Reference
Cmdlet
Read-OfficePdf
Reads a PDF into OfficeIMO.Pdf's canonical structured document model.
Remarks
Reads a PDF into OfficeIMO.Pdf's canonical structured document model.
Examples
Read paragraphs and tables from a PDF.
PS>
$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.
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
Read-OfficePdf [-IgnorePermissionRestrictions] [-Options <PdfReadOptions>] [-PageRange <String>] [-Password <String>] -Path <String> [-Profile <Fast|Structured>] [<CommonParameters>]#Parameter set:
PathParameters
- 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
Outputs
OfficeIMO.Pdf.PdfDocumentReadResult
Read-OfficePdf -Document <PdfDocument> [-Options <PdfReadOptions>] [-PageRange <String>] [-Profile <Fast|Structured>] [<CommonParameters>]#Parameter set:
DocumentParameters
- Document PdfDocument
- An existing OfficeIMO.Pdf document, such as output from Get-OfficePdf.
- 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.
- Profile PdfReadProfile
- Semantic reconstruction profile. Structured is the default; Fast omits optional document-wide enrichment.
- Possible values:
Fast,Structured
Outputs
OfficeIMO.Pdf.PdfDocumentReadResult