mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-10-27 03:27:21 -06:00
M9: visible signatures read upright on rotated pages (#4067)
* 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>
This commit is contained in:
co-authored by
Claude Opus 5.5
vjeko2404
Brandon Thomas
parent
9206254142
commit
f46268fbe4
@@ -6001,8 +6001,8 @@ milestone = "M9"
|
||||
status = "shipped"
|
||||
commands = ["sign.digital"]
|
||||
tools = ["sign_document"]
|
||||
evidence = ["crates/ui-egui/tests/it/signing.rs::drawing_a_signature_creating_an_id_signing_and_trusting", "crates/automation/tests/it/automation.rs::digital_ids_signing_and_validation_through_tools"]
|
||||
notes = "drag a rectangle; Acrobat's name-and-details appearance"
|
||||
evidence = ["crates/ui-egui/tests/it/signing.rs::drawing_a_signature_creating_an_id_signing_and_trusting", "crates/automation/tests/it/automation.rs::digital_ids_signing_and_validation_through_tools", "crates/sign/tests/it/pdf.rs::visible_signatures_read_upright_on_rotated_pages", "crates/engine/src/tests.rs::visible_signatures_keep_displayed_orientation_on_rotated_pages"]
|
||||
notes = "drag a rectangle; Acrobat's name-and-details appearance; reads upright on rotated pages (/MK /R)"
|
||||
|
||||
[[feature]]
|
||||
id = "sign.sign-existing-field"
|
||||
|
||||
Reference in New Issue
Block a user