Python Forum
Recommended way to read/create PDF file?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Recommended way to read/create PDF file?
#1
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,
#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).
Reply


Messages In This Thread
Recommended way to read/create PDF file? - by Winfried - Mar-17-2020, 02:24 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to read a file as binary or hex "string" so that I can do regex search? tatahuft 3 1,127 Dec-19-2024, 11:57 AM
Last Post: snippsat
  Read TXT file in Pandas and save to Parquet zinho 2 1,266 Sep-15-2024, 06:14 PM
Last Post: zinho
  Pycharm can't read file Genericgamemaker 5 1,597 Jul-24-2024, 08:10 PM
Last Post: deanhystad
  Python is unable to read file Genericgamemaker 13 3,782 Jul-19-2024, 06:42 PM
Last Post: snippsat
  I dont understand on how to create a Bot that can read info on the screen aloud RaySuS777 0 651 Jun-19-2024, 10:02 AM
Last Post: RaySuS777
  Connecting to Remote Server to read contents of a file ChaitanyaSharma 1 3,327 May-03-2024, 07:23 AM
Last Post: Pedroski55
  Create Choices from .ods file columns cspower 3 1,765 Dec-28-2023, 09:59 PM
Last Post: deanhystad
  Use PM4PY and create working file thomaskissas33 0 1,933 Nov-14-2023, 06:53 AM
Last Post: thomaskissas33
  python Read each xlsx file and write it into csv with pipe delimiter mg24 4 3,876 Nov-09-2023, 10:56 AM
Last Post: mg24
  Create csv file with 4 columns for process mining thomaskissas33 3 1,812 Nov-06-2023, 09:36 PM
Last Post: deanhystad

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020