mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-10-24 10:08:00 -06:00
* M9: visible signatures read upright on rotated pages A visible digital signature placed on a page with /Rotate was drawn in user space, so its graphic and details turned with the page: on scans stored landscape with /Rotate 270 the signature came out sideways. Stamps (#1398) and Fill & Sign marks (#2392) were already corrected; signatures were not. A new signature widget on a turned page gets /MK /R equal to the page rotation (inherited rotation included, via pdfcraft_model::pages), and its appearance is laid out in the box as displayed (sides swapped for a quarter turn) with a /Matrix from pdfcraft_model::view_matrix_for that maps it exactly onto /Rect. Signing an existing field follows that field's own /MK /R, so a field without one is drawn as before. Pages that are not turned produce the same bytes as before. Tests: sign crate (layout equals the upright box's, /MK /R, /Matrix, inherited /Rotate, existing fields with and without /MK /R, malformed /MK /R) and an engine render test on 0/90/180/270 pages with the quadrant image. Both fail with the fix reverted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Keep one evidence/notes pair in the sign.digital parity entry --------- Co-authored-by: vjeko2404 <vjekoslav@outlook.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Brandon Thomas <echelon@gmail.com>