pr
Paginate text into deterministic pages with configurable headers, footers, and page dimensions. Returns JSON or plain text for print-ready output.
Instructions
Paginate text into deterministic pages with configurable headers, footers, and page dimensions. Read-only, no side effects. Returns JSON with paginated output by default; use --raw for plain text. Use for print-ready formatted output. Not for paragraph reflowing — use 'fmt'. Not for line wrapping — use 'fold'. See also 'fmt', 'fold'.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| raw | No | Write paginated text without a JSON envelope. | |
| paths | No | Files to paginate, or '-' for stdin. Defaults to stdin. | |
| width | No | Maximum output line width. | |
| header | No | Optional page header. | |
| encoding | No | Text encoding (default: utf-8). Use 'auto' for BOM/autodetection. | utf-8 |
| max_lines | No | Maximum JSON lines to emit. | |
| page_length | No | Input lines per page. | |
| show_encoding | No | Include encoding detection metadata in JSON result. | |
| encoding_errors | No | How to handle encoding errors (default: replace). | replace |
| encoding_profile | No | Locale-aware encoding fallback profile for auto-detection. |