pdfcraft/apps/pdfcraft-cli/tests
cyfung1031 306bbcedf9
M3: harden render and CLI failure surfaces (#669)
* M3: harden render and CLI failure surfaces

Make content truncation observable, reject unknown CLI options, expose deterministic render work counters, and scope render failures to exact requests. Refuse silently reduced whole-page export rasters while preserving tiled rendering, and add heavy-vector and CLI regression coverage.

Co-authored-by: Codex <noreply@openai.com>

* Render: remember a failed render by page and kind again

A key with scale and tag made every zoom level and tile a new key: a
pathological page tied up a worker for the watchdog limit per request
(exhausting worker replacements) and was re-parsed each time. The
repeated-parsing check asks for a new generation and scale again.

* Export: pages too large at the chosen dpi export at the most the renderer allows, and say so

#669 made every Exporter refuse oversized whole-page renders, which
reached File > Export to image, doc_export_* and OCR: at 600 dpi any page
side over 13.65 in (Legal, A3, Tabloid) failed instead of exporting. The
exporter clamps again; Exporter::dpi_used reports the resolution a page
is drawn at, which the Export dialog's message and doc_export_png's
lower_dpi list mention. A source with reject_oversize still refuses
(CLI render keeps its strict config).

* doc_export_images: describe lower_dpi

* Render: ContentTruncated is reported once per page; the hayro-interpret patch is recorded

Nested forms, Type 3 glyphs and patterns are interpreted again and each
reported the exhausted budget; pdfcraft-render now keeps one. The warning
is part of hayro-interpret patch (18) (the page content budget): marked
in the code and described in vendor/README.md.

* CLI render: print render warnings (skipped content) to stderr

* CLI: the option check refuses unknown options only; commands report missing values themselves

text's own --page parsing (and its test on main) says what a page value
must be; the generic "needs a value" pre-empted it.

---------

Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Brandon Thomas <echelon@gmail.com>
2026-10-09 22:32:48 -04:00
..
edit.rs fix(cli): validate page positions and preserve command results (M13) (#391) 2026-10-08 21:37:09 -04:00
help.rs pdfcraft-cli --help lists `mcp` only when the build has it (#574) 2026-10-09 14:44:11 -04:00
mcp_compact.rs MCP: common command tools, session resources and client hints (#451) 2026-10-09 14:46:24 -04:00
options.rs M3: harden render and CLI failure surfaces (#669) 2026-10-09 22:32:48 -04:00
render.rs Issue #248: pdfcraft-cli render writes the format its --out name says (.png, .jpg, .tif or .pam) (#255) 2026-10-08 07:25:43 -04:00
run_root.rs Security: create save staging files with create_new (follow-up to #164) (#319) 2026-10-08 15:19:16 -04:00
split.rs Issue #249: pdfcraft-cli split creates --out-dir when it does not exist (#256) 2026-10-08 07:26:03 -04:00
stderr.rs fix(cli): validate page positions and preserve command results (M13) (#391) 2026-10-08 21:37:09 -04:00
stdout.rs Restore #196, #202, #203 and the macOS release-runner change, reverted by the i18n chain (#229) 2026-10-08 03:33:35 -04:00
text.rs fix(cli): validate page positions and preserve command results (M13) (#391) 2026-10-08 21:37:09 -04:00
ui_control.rs CLI: pdfcraft-cli ui refuses a control file another user could plant (#597) 2026-10-09 19:01:05 -04:00
version_resource.rs CLI: pdfcraft-cli.exe carries a Windows version resource (#598) 2026-10-09 19:09:23 -04:00