Setting PDF fonts to the same size as Windows fonts #2972
Replies: 1 comment 2 replies
-
There is a Have you considered to use redaction annotations for text replacement? If I not missing something crucial in your description, this should be much easier ... |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to hack a script to write to those PDFs that look like forms, but aren't. Since I can't find a way to edit PDF text, I write each page to a pixmap, use tkinter to display text on it, and when it's right, use insert_text to write it to the pdf. My problem is to ensure that the PDF fonts are the same size as Windows fonts. It turns out that fontsize is not points as I would have expected, or exactly pixels, e.g. to get the same size as Windows Arial 11, I have to set the font size in insert_text to 15.215 after using insert_font to load it. Is there a formula for the equivalent size in a PDF to a Windows font?
Beta Was this translation helpful? Give feedback.
All reactions