mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-10-25 10:17:02 -06:00
A PDF page's UserUnit (PDF 1.6) sets the size of its user space unit in multiples of 1/72 inch. The PDF reader has applied it since #1894, so a page with /UserUnit 10 and a 36 × 50.4 media box opens at 360 × 504 pt. A .ai whose editing data has its artboards in the page's own units then no longer matched its PDF part. It opened from the PDF part, without its layers, its hidden objects and the art outside its artboards, and with its artboards in a row instead of where the editing data puts them. document.pdfInfo gave such a page's size in points and its boxes in the file's numbers. Editing data whose first artboard has the page's size in the page's units, and not in points, is now compared with the PDF part scaled down by the UserUnit. The document read from it is then scaled up by the UserUnit, with its stroke weights, dashes, effects and pattern tiles. When the layers can't be read, the artboard layout taken from the editing data is scaled the same way. document.pdfInfo gives the boxes in points, as it gives the size. Docs: docs/mcp.md, docs/target-app-parity.md.