-
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 extra \x00 and font size #2737
Comments
Thank you very much for looking into this so fast! I see you already saw the next issue, I'm just adding more view points from my machine. The Matrix data does fix the orientation for the field we discussed. But as you noticed the text is mangled because of extra padding \x00 bytes and appears squished. New build code from pypdf import PdfReader, PdfWriter
reader = PdfReader("template.pdf")
writer = PdfWriter()
writer.append(reader)
writer.update_page_form_field_values(
writer.pages[0],
{
"Stellenbezeichnung_1": "some filled in text",
"Tag-Monat 1": "03.07"
},
auto_regenerate=False
)
with open("filled-out.pdf", "wb") as output_stream:
writer.write(output_stream) Now when I open this date field in some softwares it says theres a template that requires it to be in the format of "D D M M " notice the double space in the middle, I don't think orientation is related to that and I couldn't parse out anything about the pdf with PyPDF that would say thats needed but maybe it helps you. I attached pictures from different viewers (evince, firefox, chromium) with the latest nightly version and with your even newer 2731 patch. Issue with the date happens in both versions. Your 2731 Patchevince: firefox (again the orientations are correct here but you can see the \x00): chromium: I also attached the documents generated on my machine. Thanks again, it feels like Adobe tailored the PDF specification to be a messy pain in the ass on purpose... |
@orgmast5 created:
Originally posted by @pubpub-zz in #2731 (comment)
The text was updated successfully, but these errors were encountered: