# Automate PDF Workflows

Automate PDF Workflows on Evotec with installation guidance, setup notes, reference details, and project documentation.

Project

PSWriteOffice

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

[View on GitHub](https://github.com/EvotecIT/OfficeIMO/tree/master/PowerShell/PSWriteOffice) [Visit Website](#) [Releases](https://github.com/EvotecIT/PSWriteOffice/releases/tag/v3.0.5) [Changelog](#) [Get package](https://www.powershellgallery.com/packages/PSWriteOffice)

Stars**722**

Forks**84**

Open issues**2**

PowerShell Gallery downloads**5165548**

Release**v3.6.2**

Language: C# Updated: 2026-11-21

Documentation

Author, inspect, combine, annotate, sign, preflight, optimize, redact, and extract PDF files. Includes examples and cmdlet links.

The PDF family exports 82 commands over the first-party OfficeIMO.Pdf engine. It includes document composition, metadata, pages, text, images, tables, lists, headings, panels, headers and footers, backgrounds, watermarks, forms, annotations, attachments, bookmarks, signatures, compliance, extraction, merge/split, redaction, optimization, and diagnostics.

## Compose a fixed-layout document

Use `New-OfficePdf` with the `Add-OfficePdf*` commands when the script owns the PDF. Apply page setup and a theme once, then add semantic headings, paragraphs, lists, tables, images, panels, stamps, and page breaks. Canvas and page-overlay commands cover fixed-position drawing, while typed text-run, image, form-field, and check-box table cells keep richer layouts inside the same PDF DSL.

## Copy complete DSL recipes

- [Service invoice](https://github.com/EvotecIT/PSWriteOffice/blob/main/Examples/Pdf/Recipe-Pdf-ServiceInvoice.ps1): metadata, invoice lines, totals, payment terms, headers, footers, and contact link.
- [Access audit report](https://github.com/EvotecIT/PSWriteOffice/blob/main/Examples/Pdf/Recipe-Pdf-AuditReport.ps1): findings, bookmarks, page breaks, remediation sections, and form fields.
- [Composed service report](https://github.com/EvotecIT/PSWriteOffice/blob/main/Examples/Pdf/Example-PdfReportDsl.ps1): themes, backgrounds, borders, rich text, columns, links, bookmarks, tables, and attachments.

## Other PDF workflows

- [Attach supporting evidence](https://github.com/EvotecIT/PSWriteOffice/blob/main/Examples/Pdf/Recipe-Pdf-AttachEvidence.ps1): embed a source file in the delivered report.
- [Exchange form data](https://github.com/EvotecIT/PSWriteOffice/blob/main/Examples/Pdf/Recipe-Pdf-FormDataExchange.ps1): export and import interactive form values.
- [Extract text](https://github.com/EvotecIT/PSWriteOffice/blob/main/Examples/Pdf/Recipe-Pdf-ExtractText.ps1): feed PDF content into search or review workflows.
- [Reorder pages](https://github.com/EvotecIT/PSWriteOffice/blob/main/Examples/Pdf/Recipe-Pdf-ReorderPages.ps1): fix the delivery order without recomposing the report.

The [DSL cookbook](/projects/pswriteoffice/docs/dsl-cookbook/) compares fixed-layout PDF composition with the editable Office and Markdown outputs.

## Task guides

- [Read, extract, and preflight](/projects/pswriteoffice/docs/pdf-read-preflight/)
- [Merge, split, and reorder pages](/projects/pswriteoffice/docs/pdf-merge-split-pages/)
- [Position text and graphics](/projects/pswriteoffice/docs/pdf-positioned-content/)
- [Redact, sanitize, and optimize](/projects/pswriteoffice/docs/pdf-redact-sanitize/)
- [Create and process forms and annotations](/projects/pswriteoffice/docs/pdf-forms-annotations/)
- [Inspect signatures and compliance](/projects/pswriteoffice/docs/pdf-signatures-compliance/)

## Inspect before transforming

Read-only commands expose document information, text, images, fonts, attachments, form fields, annotations, signatures, compliance, interactions, optimization data, preflight results, append-only mutation state, redaction plans, and text/layout diagnostics.

Encrypted inputs accept a password through the commands that open an existing PDF. Owner-imposed restrictions remain enforced unless the caller explicitly uses the corresponding `IgnorePermissionRestrictions` switch after successful authentication; the switch does not discover, bypass, or crack a missing password.

This enables a safer pipeline:

1. preflight the source;
2. collect compliance and signature evidence;
3. plan redaction, flattening, optimization, or page changes;
4. write to a new artifact;
5. reopen and test the result.

## Document operations

- combine and separate files with `Join-OfficePdf` and `Split-OfficePdf`;
- copy, move, and remove pages;
- import and export XFDF annotations;
- flatten annotations or forms deliberately;
- sanitize, optimize, or redact with explicit conversion commands;
- add or update metadata, forms, annotations, signatures, compliance, electronic invoice data, page appearance, and themes;
- extract images, text, and layout overlays for downstream review.

PDF features vary by document structure and preservation requirement. Use `Test-OfficePdfRewrite`, diagnostics, and preflight evidence for complex inputs instead of assuming every rewrite is lossless.

See the [PDF examples](https://github.com/EvotecIT/PSWriteOffice/tree/main/Examples/Pdf) and search the [command reference](/projects/pswriteoffice/api/) for `OfficePdf`.

<!-- PowerForge markdown artifact sha256:A4D23EB8FD9484B5AD880F17F653EF6E701917FEB5081C7AC22A1D36AFCB52A7 -->
