pdf_page_layout
Measure PDF page sizes, orientation, and rotation, grouping pages by shape to reveal mismatched or sideways pages without reading page content.
Instructions
Measure a PDF's page sizes, orientation and rotation.
Answers "what size is this, is it all the same, and why does one page come out sideways?". Reads page geometry only, so it stays cheap on long documents.
sizes groups the pages by shape, most pages first, each carrying the page
numbers it covers as a range like "1-16,18", so a 300 page document answers in
one entry instead of 300 rows.
Sizes are the page as a reader sees it: CropBox clipped to MediaBox with
/Rotate applied, so a landscape box rotated 90 degrees reports as portrait.
Pages within 3pt of a known paper are grouped and named together, since real A4
varies by a millimetre.
Pass pages for per page rows carrying the raw boxes: "1-20", "3", "1,5,9-12"
or "all", capped at 100 rows.
It does not look at page content; for whether the pages hold readable text use pdf_check_text.
Args: ref: PDF file path, or a workspace artifact id. pages: Optional page range for per page detail. Omit for groups only.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | Yes | ||
| pages | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |