-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Form Fill Font Size and Orientation wrong #2731
Comments
The error of orientation is due to /Matrix entry missing |
new issue created about the problem of extra \x00 due to mix up between utf8 and 8bit only charsets
|
I'm trying to fill a form, I installed the latest build from source main tree (pip install git+https://github.com/py-pdf/pypdf.git@main)
and this form is causing issues with the text being rotated (in some viewers spaced out) and on the wrong side. I think it is related to these recent issues #2636 and #2724
It is fixed when I set auto_regenerate=True and open and save again with Acrobat Reader but that's not what's intended in the docs.(https://pypdf.readthedocs.io/en/stable/user/forms.html#filling-out-forms)
Code + PDF
This is a minimal, complete example that shows the issue:
I attached the template pdf and the filled-out pdf, you are free to use them in your tests.
template.pdf
filled-out.pdf
Chromium screenshot:
Firefox screenshot:
evince pdf reader:
I tried messing with the annotation widgets and setting my own Font and Rect but I couldn't make that work.
I did look at the bit mask and it is a multiline + file select field. When i saw the multiline thing and #2636 code changes adding a "DEFAULT_FONT_HEIGHT_IN_MULTILINE = 12" I thought maybe the nightly version would be better than 4.20 release. The text is indeed smaller but it still is rotated 90 degrees clockwise.
The text was updated successfully, but these errors were encountered: