mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-10-03 01:04:13 +02:00
0b4fc8beb0
setFolioBorder(folio, "preset", "tabloid-landscape") picks the column and row counts and whole-number sizes that fill the sheet best without going over it, as one ChangeBorderCommand. The title block and headers are measured from the folio, so it holds for any template on either edge. Sizes stay whole because the folio properties panel edits them in whole pixels. Among fills within 1.5 pt of the sheet, the size nearest the current one wins: from a new folio tabloid landscape is 23 x 70 by 12 x 82, not 9 x 179 by 5 x 197. A0-A5, letter, legal, tabloid/ledger, each -portrait or -landscape; folioPresets() lists them, and folioBorder() reads "width" and "height" of the frame and title block. Every preset exports on its sheet; landscape ones rely on the previous commit, which turns a wide page before matching it to a sheet. The MCP server checks the name up front, probes for folioPresets(), and the op's note says what was chosen and the frame's size in points. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>