Mar-17-2020, 02:24 PM
Hello,
I need to either read/fill/sign an existing PDF file, or build one from scratch.
Using this code, the existing PDF file uses fonts that aren't listed in c:\windows\fonts, so I assume they are embedded in the PDF.
I know nothing about working with PDFs, and would like to have your advice about how to proceed.
Should I somehow fill the existing file with my own text + signature PNG, and merge those into a new PDF, or should I create a new PDF from scratch using either the embedded fonts that I'll export somehow or use a close-enough font?
FWIW, I'm using Python 3.7.0 on 32-bit Windows 7.
Thank you.
PS: Incidently,
Edit: Found the error: I didn't know you couldn't name a Python script the same name used by a Python module (pdfrw.py, here).
I need to either read/fill/sign an existing PDF file, or build one from scratch.
Using this code, the existing PDF file uses fonts that aren't listed in c:\windows\fonts, so I assume they are embedded in the PDF.
I know nothing about working with PDFs, and would like to have your advice about how to proceed.
Should I somehow fill the existing file with my own text + signature PNG, and merge those into a new PDF, or should I create a new PDF from scratch using either the embedded fonts that I'll export somehow or use a close-enough font?
FWIW, I'm using Python 3.7.0 on 32-bit Windows 7.
Thank you.
PS: Incidently,
#python -m pip install pdfrw from pdfrw import PdfReader → ImportError: cannot import name 'PdfReader' from 'pdfrw'--
Edit: Found the error: I didn't know you couldn't name a Python script the same name used by a Python module (pdfrw.py, here).