Cmdlet
New-OfficeDocumentReader
Creates an immutable document reader with common policies, format options and optional OCR.
Syntax
New-OfficeDocumentReader
[-MaximumConcurrentReads <Int32>]
[-MaximumStoreItems <Int32>]
[-Ocr]
[-OcrOptions <OfficeOcrOptions>]
[-Options <Object[]>]
[-Processor <IOfficeDocumentProcessor[]>]
[-ProcessorFailureBehavior <Throw| ContinueWithDiagnostic| StopWithDiagnostic>]
[<CommonParameters>]#Parameter set:
DefaultExamples
Reuse one configured reader across a report folder.
$options = New-OfficeDocumentReaderOptions -Projection TextAndMetadata
$reader = New-OfficeDocumentReader -Options $options -MaximumConcurrentReads 4
Read-OfficeDocument ./Reports -Recurse -Reader $reader -As TextConfigure optional OCR with one settings object.
$ocr = New-OfficeOcrOptions -Language English,Polish -NoLanguageDownload
$reader = New-OfficeDocumentReader -OcrOptions $ocr
Read-OfficeDocument ./Scans -Reader $readerParameters
- -MaximumConcurrentReads Int32
- Maximum concurrent native document reads.
- -MaximumStoreItems Int32
- Maximum items projected from each mail store; zero means all.
- -Ocr SwitchParameter
- Enable the default local OCR provider.
- -OcrOptions OfficeOcrOptions
- Optional OCR provider and execution settings. Implies Ocr.
- -Options Object[]
- Typed common and format options, or common/format-keyed hashtables.
- -Processor IOfficeDocumentProcessor[]
- Ordered processors applied after native extraction.
- -ProcessorFailureBehavior OfficeDocumentProcessorFailureBehavior
- How ordinary processor failures affect the operation. Safety limits remain terminal.
- Possible values:
Throw,ContinueWithDiagnostic,StopWithDiagnostic
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.