Project

PSWriteOffice

PowerShell document automation across Word, Excel, PowerPoint, PDF, Reader, Confluence, Visio, and open text formats.

Stars 165
Forks 15
PowerShell Gallery downloads 158,661
Release v3.0.8
Language: C# Updated: 2026-10-12

API Reference

Cmdlet

Get-OfficeImageDocument

Namespace PSWriteOffice
Inputs
System.String
Outputs
OfficeIMO.Pdf.Ocr.PdfSearchableOcrReview

Recognizes an image as editable text, reading order and detected tables, with review evidence.

Remarks

Uses the original image resolution and the shared OfficeIMO layout engine. Animated and multi-page images are rejected.

Examples

Authored help example

Recognize a ledger once and export its reviewed table.

PS>


$image = Get-OfficeImageDocument -Path .\Ledger.png
            $image | ConvertFrom-OfficeImage -OutputPath .\Ledger.xlsx -FirstRowIsHeader
        

Inspect $image.Ocr.Document.Tables and $image.Ocr.Pages before confirming the first row as headers.

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

Get-OfficeImageDocument [-Language <English>] [-MinimumConfidence <Double>] [-NoLanguageDownload] [-Options <TesseractOcrSessionOptions>] -Path <String> [-Provider <IOcrEngine>] [-RecognitionOptions <PdfOcrMergeOptions>] [-TessdataDirectory <String>] [-TesseractLanguageExpression <String>] [-TesseractPath <String>] [<CommonParameters>]
#
Parameter set: All Parameter Sets

Parameters

Language TesseractOcrLanguage[] optionalposition: namedpipeline: Falsevalues: 28
Friendly OCR languages. Supply more than one value to recognize multilingual content.
Possible values: English, Polish, Arabic, ChineseSimplified, ChineseTraditional, Czech, Danish, Dutch, Finnish, French, German, Greek, Hebrew, Hindi, Hungarian, Italian, Japanese, Korean, Norwegian, Portuguese, Romanian, Russian, Slovak, Spanish, Swedish, Turkish, Ukrainian, Vietnamese
MinimumConfidence Double optionalposition: namedpipeline: False
Minimum normalized confidence accepted into the editable document.
NoLanguageDownload SwitchParameter optionalposition: namedpipeline: False
Do not download checksum-pinned curated language data when a requested language is missing.
Options TesseractOcrSessionOptions optionalposition: namedpipeline: False
Advanced OfficeIMO OCR options. Convenience parameters override matching values.
Path String requiredposition: 0pipeline: True (ByValue)aliases: FilePath
Path to a supported single-frame raster image.
Provider IOcrEngine optionalposition: namedpipeline: False
Optional engine-neutral OCR provider. When omitted, uses the configured local Tesseract session.
RecognitionOptions PdfOcrMergeOptions optionalposition: namedpipeline: False
Advanced layout, confidence, orientation, scan preparation and resource limits.
TessdataDirectory String optionalposition: namedpipeline: False
Explicit directory containing Tesseract trained-data files.
TesseractLanguageExpression String optionalposition: namedpipeline: False
Advanced raw Tesseract expression for caller-installed custom trained-data models.
TesseractPath String optionalposition: namedpipeline: False
Explicit Tesseract executable path. By default OfficeIMO securely discovers an installed runtime.

Outputs

OfficeIMO.Pdf.Ocr.PdfSearchableOcrReview