-
-
Notifications
You must be signed in to change notification settings - Fork 706
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
PDFForm.flatten() does not handle rotated fields correctly #733
Comments
@btecu Think it would be fairly straightforward to use |
Hi @Hopding , Thanks for this wonderful lib. I just saw documentation related rotateInPlace but I am not able to understand how to use it. should be used with PngImage? |
PDF form fields can be rotated. However, the rotation logic for form field widgets should be "in-place" (see
rotateInPlace
), as opposed to the more common (at least in PDF land) logic of "about-the-origin" rotation. The current logic used inPDFForm.flatten()
appears to be using "about-the-origin" logic, which leads to incorrect results after flattening a rotated field. See below for examples clarifying this:✅ Correct Rendering of Rotated Fields
You can generate this document yourself by running
yarn apps:node 17
and looking at the first page of the resulting document.❌ Incorrect Rendering of Rotated Fields
You can generate this document yourself by running
yarn apps:node 18
and looking at the fifth page of the resulting document.The text was updated successfully, but these errors were encountered: