Project

PSWriteOffice

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

Stars164
Forks15
Open issues0
PowerShell Gallery downloads158661
Releasev3.0.8
Language: C# Updated: 2026-10-12

Documentation

Choose a conversion route

Inspect format pairs, fidelity limits, owning APIs, and batch PDF support before converting documents.

Use Get-OfficeConversionRoute to inspect the conversion contracts shipped with the installed OfficeIMO engine. A route describes a source and destination pair, its owning package and API, expected fidelity, support evidence, text formatting, and known limitations.

Get-OfficeConversionRoute -SourceExtension docx -TargetExtension pdf |
    Format-List Id, PackageId, Api, Fidelity, SupportLevel,
        SupportEvidence, TextFormattingContract, KnownLimitations,
        PdfBatchSupported, PdfBatchCommand

Extension filters accept docx or .docx and compare without regard to case. Combine them with -Id to select an exact route. Unknown identifiers return no rows.

Choose the PowerShell operation

PdfBatchSupported reports whether a route belongs to Export-OfficeDocumentPdf batch export in the current host. Batch export requires PowerShell 7.4 or newer. Windows PowerShell 5.1 can inspect the catalog and use supported single-file commands.

Get-OfficeConversionRoute -PdfBatch |
    Select-Object Id, SourceExtensions, PackageId, Fidelity, KnownLimitations

A false value can mean that the conversion uses a format-specific cmdlet or a .NET API, or that the current host does not expose batch export. A reverse route such as pdf-docx does not imply PDF export support. Check the owning Api and the command reference for the operation you need.

For example, inspect Word-to-PDF limits, then export one document:

$route = Get-OfficeConversionRoute -Id docx-pdf
$route.KnownLimitations
Export-OfficeDocumentPdf -InputPath ./Review.docx -Path ./Review.pdf

Validate your input and output

The catalog describes the installed engine's contracts. It does not probe optional providers, fonts, credentials, encryption passwords, or an individual input document. Test representative files and inspect the generated output before relying on a conversion workflow. Review conversion warnings when fidelity matters.

For extraction, use Get-OfficeDocumentCapability and the Reader guide. Reader support, conversion support, editable document authoring, and batch export are separate operations.

See PDF automation for export options and automation patterns for repeatable document jobs.