Inspect document layout (dry run)
inspect_layoutPreview page count and block placement before generating a PDF. Pass the same title, blocks, and layout settings to get total pages plus each block's page and coordinates.
Instructions
Pagination preview WITHOUT generating a PDF: page count and where every block lands (page, x, top, width, height in points). Same blocks as generate_basic_pdf plus every input that moves a block (title, footerText, pdfA, normalize, embedFonts, pageSize, margins, headerTemplate, footerTemplate): pass what you will give generate_basic_pdf and the page count matches. Known engine gap: a 'toc' block is measured as 0 pt here (its real height depends on the headings), so documents with a toc may paginate one page later. Read-only, deterministic. Token-frugal: verbosity:'summary', fields:['totalPages'].
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pdfA | No | Tagged (PDF/A) layout mode, as you would pass it to generate_basic_pdf. PDF/A level: pdfa1b (simple text+images), pdfa2b/pdfa2u (richer; 2u = Unicode mapping), pdfa3b (attachments / Factur-X). Pair with embedFonts=true for a valid claim. Exclusive with encryption. See docs/guides/PDFA.md. | |
| title | Yes | Document title — reserves the title band on page 1 exactly as generate_basic_pdf does. | |
| blocks | Yes | Ordered list of content blocks composing the document body. | |
| fields | No | Optional dot-path projection applied to the structured result (e.g. ['totalPages'] or ['pages.blocks.type']). Composes after verbosity. Unknown paths are omitted. | |
| margins | No | Margins in points, all four required (0–200). Default 45 / 36 / 35 / 36. | |
| pageSize | No | Portrait page preset (points): A4 595.28×841.89 (default), Letter 612×792, Legal 612×1008, A3 841.89×1190.55, Tabloid 792×1224. print.* boxes must fit it. | |
| normalize | No | Unicode normalization before shaping ('NFC' recommended for glyph coverage; NFD/NFKC/NFKD accepted). Omit = none. | |
| verbosity | No | 'full' (default) or 'summary' (scalars only: pageWidth, pageHeight, totalPages, blockCount; pages[] and margins dropped). | full |
| embedFonts | No | Measure with the embedded Noto Sans Latin metrics instead of Helvetica — pass the same value you will give generate_basic_pdf. (Embed Noto Sans Latin instead of the viewer base-14 Helvetica. REQUIRED for a valid PDF/A claim (ISO 19005 §6.2.11.4.1) and for strict=true; adds ~0.3 MiB.) | |
| footerText | No | Footer text as you would pass it to generate_basic_pdf (reserves the footer band). | |
| footerTemplate | No | Running footer on every page. Replaces the default footer: footerText is then ignored and page numbers appear only via {page}/{pages}. | |
| headerTemplate | No | Running header on every page (left / center / right zones); reserves 15 pt. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pages | No | Per-page block placement, in render order. A table that spans pages appears once per slice. | |
| margins | No | Page margins { top, right, bottom, left } in points. | |
| pageWidth | No | Page width in points (595.28 = A4). | |
| blockCount | No | summary only: number of placed blocks (table slices count once each). | |
| pageHeight | No | Page height in points (841.89 = A4). | |
| totalPages | No | Number of pages the blocks paginate into. |