-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Open
Labels
workflow-formsFrom a users perspective, forms is the affected feature/workflowFrom a users perspective, forms is the affected feature/workflow
Description
While testing PDF form filling with the latest version of pypdf, I noticed that Arabic text is not displayed correctly in the generated PDF.
However, when I downgrade to version 3.9.1, Arabic text renders properly.
The issue seems to have been introduced after that version.
Unfortunately, version 3.9.1 does not support filling dropdown fields, so I can’t use it as a workaround for all cases.
Environment
python 3.13.1
$ python -m platform
Windows-11-10.0.26100-SP0
$ python -c "import pypdf;print(pypdf._debug_versions)"
pypdf==6.1.3, crypt_provider=('cryptography', '46.0.3'), PIL=12.0.0Code + PDF
This is a minimal, complete example that shows the issue:
from pypdf import PdfReader, PdfWriter
reader = PdfReader("input.pdf")
writer = PdfWriter()
writer.append(reader)
writer.update_page_form_field_values(
writer.pages[0], {
"Defendant full name":"احمد الموسى",
"Defendant_email": "test@gmail.com",
"Place": "Al Ain العين"
}
)
with open("output.pdf", "wb") as output_stream:
writer.write(output_stream)input pdf:
output images:
Traceback
This is the complete traceback I see:
no error just not support
Metadata
Metadata
Assignees
Labels
workflow-formsFrom a users perspective, forms is the affected feature/workflowFrom a users perspective, forms is the affected feature/workflow