Use Original Font in new PDF #3957
Unanswered
Mahendranath94
asked this question in
Looking for help
Replies: 1 comment
-
If these squares ("tofus") appear, then the respective font did not find a glyph with the provided Unicode. |
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
-
I am trying to extract text from one PDF and write back to new PDF with same font, as the font won't be available in new_page of new pdf, I am extracting the font in each page in old PDF and saving the font files and using them to insert and use that font in new PDF, as the naming convention of the font in the extracted font(ex: TimesNewRomanPS-BoldItalicMT) is different from the font in text blocks(ex:TimesNewRomanPS-BoldItal), I used get_close_matches to get the font files we saved, which is similar to the font in text blocks. This approach is working for most of the fonts but for some fonts it is inserting some square boxes instead of actual text (Please refer to the Image attached)
Beta Was this translation helpful? Give feedback.
All reactions