# Word runtime scripts

PowerShell COM scripts for the Word layer. All scripts read a UTF-8 (BOM) payload file and emit UTF-8 JSON on stdout. Invoke through `WordRuntime` only; never concatenate user input into script text.

- `inspect.ps1` – read-only document and shape inspection.
- `replace-shapes.ps1` – text replacement inside text boxes (complex shapes fail closed).
- `style-editorial.ps1` – applies the pure-white editorial preset, safe heading line heights, headers/footers, and converts any residual tables to paragraphs.
- `convert-pdf.ps1` – DOCX to PDF via Word COM.
- `convert-legacy.ps1` – `.doc` to `.docx` conversion (requires explicit user confirmation upstream).
