mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-10-27 19:48:14 -06:00
M2: pages with /UserUnit are shown at their size in points, as in Acrobat (#722)
* M2: pages with /UserUnit are shown at their size in points, as in Acrobat /UserUnit gives the size of a page's user-space unit in points; PdfCraft ignored it everywhere except the measuring tools, so a /UserUnit 2 page was shown, extracted, printed and edited at half its size, and the measuring tools disagreed with the rest of the app. The value is now read as Acrobat reads it (the page's own entry, a number from 1 up, at most 75,000; anything else counts as 1) in two places: - vendored hayro-syntax Page (patch 13): render_dimensions and initial_transform give the page in points, so rendering, tiles, PageInfo and the text layer follow; a page without it keeps exactly the transform it had. - pdfcraft-model Page: user_unit(), and display_size/view_matrix in points, so print, header/footer, watermark, background, added content and measuring agree with the screen. The measure crate drops its own arithmetic. Added items record the /UserUnit they were written for; items without the record (written before) read back converted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * M2: an added item's recorded /UserUnit is clamped like the page's An infinite or huge recorded /UserUnit made the scale factor 0 and collapsed the item. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Brandon Thomas <echelon@gmail.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
Brandon Thomas
parent
99c7dd9311
commit
d94da2038a
@@ -698,8 +698,8 @@ milestone = "M2"
|
||||
status = "partial"
|
||||
commands = []
|
||||
tools = ["page_render"]
|
||||
evidence = ["crates/render/src/raster.rs::renders_a_blue_rectangle", "crates/automation/tests/automation.rs::open_inspect_render_and_find"]
|
||||
notes = "hayro bootstrap renderer; own DisplayList devices in M2.6"
|
||||
evidence = ["crates/render/src/raster.rs::renders_a_blue_rectangle", "crates/automation/tests/automation.rs::open_inspect_render_and_find", "crates/render/src/raster.rs::user_unit_scales_the_page_and_everything_on_it"]
|
||||
notes = "hayro bootstrap renderer; own DisplayList devices in M2.6. Pages with /UserUnit are shown at their size in points, as Acrobat reads the value"
|
||||
|
||||
[[feature]]
|
||||
id = "view.render-shadings-patterns"
|
||||
|
||||
Reference in New Issue
Block a user