Text replacement with font copying not working correctly #3480
Unanswered
boris-lok-pentadoc
asked this question in
Looking for help
Replies: 1 comment
-
I have no time to look at details of that large code segment, but one thing is obvious: Another potential issue is that fonts in (practically) all PDFs are subsets of their original full font. So they may not contain the characters of the intended replacement text. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello there!
I've got a script running to edit a pdf and replace some values on a page while extracting font information. I've followed the overall script structure described in from #3396 (comment)

Everything works fine and the font is being chosen correctly + it has a bytes buffer. The problem arises when I try and edit a pdf
like this one Hackathon.pdf
Some characters just get replaced with crossed out boxes or sometimes the text is correctly inserted, but is somehow not visible, like here:
Could you maybe point me towards a direction of where to look for a possible solution? is it a classical pdf font problem or am I doing something wrong while inserting/scaling/ in other places?
Any help would be greatly appreciated!
Reproduction script/code:
Beta Was this translation helpful? Give feedback.
All reactions