-
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
In second half of the document special characters š and ž are displayed as a squares. If I click on the data field it comes back to normal, but when I click somewhere else again it is displayed wrong again.
Original document does not have this issue.
Somehow this issue appears only in a lower part of the document, in the upper ports same characters are displayed correctly.
Any ideas how to fix it?
Environment
I am using Adobe Acrobat 2025.001.20531
$ python -m platform
Windows-11-10.0.26100-SP0
$ python -c "import pypdf;print(pypdf._debug_versions)"
pypdf==5.6.0, crypt_provider=('cryptography', '45.0.3'), PIL=11.2.1
Code + PDF
This is a minimal, complete example that shows the issue:
from pypdf import PdfReader, PdfWriter
reader = PdfReader("DPPA-EN.pdf")
writer = PdfWriter()
writer.append(reader)
fields_to_update = {
"KOMENTARAI IR PASTABOS 1": "ąčęėįšųūž. ĄČĘĖĮŠŲŪŽ.",
"NO": "1122",
"VAL. SKAITLIUKAS": "12355",
"IŠKVIETIMO PRIEŽASTIS 1": "ąčęėįšųūž. ĄČĘĖĮŠŲŪŽ.",
"ATLIKTŲ DARBŲ SĄRAŠAS 1": "ąčęėįšųūž. ĄČĘĖĮŠŲŪŽ."
}
writer.update_page_form_field_values(
writer.pages[0],
fields_to_update,
auto_regenerate=True,
)
with open("pypdf-out.pdf", "wb") as output_stream:
writer.write(output_stream)
Original pdf file and output file:
Metadata
Metadata
Assignees
Labels
workflow-formsFrom a users perspective, forms is the affected feature/workflowFrom a users perspective, forms is the affected feature/workflow