mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-10-25 18:47:22 -06:00
Page::rotation rounded a /Rotate that isn't a multiple of 90 down to a quarter turn (135 became 90), while the renderer draws such a page upright. Display size and the display-to-user-space matrix (header and footer, watermarks, measuring, printing, image signatures) then disagreed with the page on screen. ISO 32000-2 §7.7.3.3 requires a multiple of 90; read any other value as 0, as the renderer does. Page import and image stamps, which read /Rotate themselves, already treat such a value as 0. Test: rotate_off_a_quarter_turn_counts_as_upright (/Rotate 135, 30, -45, 359).