Cmdlet
New-OfficePdfReadOptions
Creates a detached native PDF read policy and optional OCR-review settings.
Syntax
New-OfficePdfReadOptions
[-IgnorePermissionRestrictions]
[-LayoutOptions <PdfTextLayoutOptions>]
[-LoadOptions <PdfLoadOptions>]
[-OcrMergeOptions <PdfOcrMergeOptions>]
[-Page <OfficePageRange>]
[-Password <SecureString>]
[-Profile <Fast| Structured>]
[<CommonParameters>]#Parameter set:
DefaultExamples
Read selected pages with bounded untrusted-input parsing.
$options = New-OfficePdfReadOptions -LoadOptions ([OfficeIMO.Pdf.PdfLoadOptions]::UntrustedDefaults) -Profile Fast -Page '2-4'
Read-OfficeDocument -Path ./Report.pdf -Options $options -As TextLimit rasterization before an explicitly requested OCR review.
$ocr = New-OfficeOcrOptions -NoLanguageDownload
$options = New-OfficePdfReadOptions -OcrMergeOptions @{ MaxPixelsPerPage = 2000000; Dpi = 96 }
Read-OfficeDocument -Path ./Scan.pdf -Options $options -As Ocr -OcrOptions $ocrParameters
- -IgnorePermissionRestrictions SwitchParameter
- Ignore permission restrictions after successful decryption; explicit false restores enforcement.
- -LayoutOptions PdfTextLayoutOptions
- Native layout and reading-order settings.
- -LoadOptions PdfLoadOptions
- Complete base policy, including strict parsing and resource ceilings.
- -OcrMergeOptions PdfOcrMergeOptions
- Native OCR-review settings, used by Read-OfficeDocument -As Ocr.
- -Page OfficePageRange
- Caller-ordered one-based source pages.
- -Password SecureString
- Password used to open encrypted PDFs; omission preserves the base policy.
- -Profile PdfReadProfile
- Semantic reconstruction profile; omission preserves the base policy.
- Possible values:
Fast,Structured
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.
Outputs
PSWriteOffice.Models.Pdf.PdfReadOptions: OCR settings apply to Read-OfficeDocument -As Ocr. The native policies remain available for direct engine calls.