Project

PSWriteOffice

PowerShell document automation across OfficeIMO's document, spreadsheet, presentation, PDF, Project, Access, EPUB, invoicing, and conversion engines.

Stars 654
Forks 82
Open issues 1
Total downloads 4,320,051
Release OfficeIMO-v3.5.3
Language: C# Updated: 2026-11-03
Cmdlet

ConvertTo-OfficePdfSearchable

Module
PSWriteOffice
Inputs
System.String
Outputs
System.IO.FileInfo OfficeIMO.Pdf.Ocr.PdfSearchableOcrResult

Creates a searchable PDF by adding invisible text from a discovered local OCR runtime.

Syntax

ConvertTo-OfficePdfSearchable
[-Force]
[-IgnorePermissionRestrictions]
[-Language <TesseractOcrLanguage[]>]
[-MinimumConfidence <Double>]
[-NoLanguageDownload]
[-Options <TesseractOcrSessionOptions>]
[-OutputPath] <String>
[-PassThru]
[-Password <String>]
[-Path] <String>
[-PdfOptions <PdfOcrMergeOptions>]
[-ReadOptions <PdfLoadOptions>]
[-RenderDpi <Double>]
[-TessdataDirectory <String>]
[-TesseractLanguageExpression <String>]
[-TesseractPath <String>]
[<CommonParameters>]
#
Parameter set: All Parameter Sets

Examples

Make a scanned PDF searchable.

ConvertTo-OfficePdfSearchable -Path .\Scan.pdf -OutputPath .\Scan-Searchable.pdf

Preserves visible page content and writes geometry-aligned invisible English text.

Recognize an English and Polish document and inspect the OCR evidence.

ConvertTo-OfficePdfSearchable -Path .\Scan.pdf -OutputPath .\Searchable.pdf -Language English, Polish -PassThru

Returns recognition, filtering, page, provider, and model evidence instead of the output file.

Parameters

-Force SwitchParameter optional
Overwrite an existing destination file.
-IgnorePermissionRestrictions SwitchParameter optional
After successful password authentication, explicitly ignore owner-imposed extraction restrictions.
-Language TesseractOcrLanguage[] optional
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 optional
Minimum normalized confidence accepted for searchable text.
-NoLanguageDownload SwitchParameter optional
Do not download checksum-pinned curated language data when a requested language is missing.
-Options TesseractOcrSessionOptions optional
Advanced OfficeIMO OCR options. Convenience parameters override matching values.
-OutputPath String requiredposition: 1
Destination PDF path.
-PassThru SwitchParameter optional
Return the complete searchable-PDF OCR result instead of the output file.
-Password String optional
Password used to authenticate an encrypted PDF.
-Path String requiredposition: 0pipeline: True (ByValue)aliases: FilePath
Source PDF path.
-PdfOptions PdfOcrMergeOptions optional
Advanced PDF page selection, rendering, confidence, overlap, and resource limits.
-ReadOptions PdfLoadOptions optional
Optional bounded PDF parsing settings.
-RenderDpi Double optional
PDF page render resolution used for recognition.
-TessdataDirectory String optional
Explicit directory containing Tesseract trained-data files.
-TesseractLanguageExpression String optional
Advanced raw Tesseract expression for caller-installed custom trained-data models.
-TesseractPath String optional
Explicit Tesseract executable path. By default OfficeIMO securely discovers an installed runtime.

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.