# Read, Extract, and Preflight PDF Files

Inspect PDF metadata, pages, text, images, fonts, forms, annotations, signatures, compliance, and rewrite readiness before changing a file.

PDF transformation should begin with evidence. Read document information, extract only the content the workflow needs, and preflight the source before deciding whether to merge, redact, flatten, optimize, or rewrite it.

## Inspect the source

```powershell
$info = Get-OfficeDocumentInfo -Path '.\Input.pdf' -Detailed
$info.Details
$preflight = Get-OfficePdfDiagnostic -Path '.\Input.pdf' -Type Preflight
$pages = Read-OfficeDocument -Path '.\Input.pdf' -As Text -ByPage
```

Use `Get-OfficePdfDiagnostic -Type LayoutOverlay` when coordinates are needed for layout review and `Get-OfficePdfRedactionPlan -Text` to locate redaction targets. The read family also exposes images, fonts, attachments, form fields, annotations, signatures, interactions, optimization information, compliance, diagnostics, and rewrite-preservation evidence.

The [inspect-and-preflight recipe](https://github.com/EvotecIT/OfficeIMO/blob/3b680b1b6fb15a268ff5525a4ca6cdd70b2f6613/PowerShell/PSWriteOffice/Examples/Pdf/Recipe-Pdf-InspectAndPreflight.ps1) creates a two-page PDF, reads its metadata and text page by page, and runs the PDF preflight command.

Encrypted files require the correct password. `-IgnorePermissionRestrictions` is an explicit post-authentication policy choice; it does not discover or bypass a missing password.

<!-- PowerForge markdown source sha256:84C596405C98B8DFC438E699A14C0CF22B51233094278DB9BD5FFC62ADE0863A; title=True -->

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