Add text to Existing PDF using Python -
I need to add some extra text to existing PDFs through Ajithan, what is the best way to go about this And what additional modules would I need to install.
Note: Ideally I want to be able to run it on both Windows and Linux, but only in Linux.
Thanks in advance. Richard
EDIT: PEPDF and ReportLab looks good, but no one will allow me to edit the existing PDF, are there any other options?
I know this is an old post, but I am trying to find a solution. I've just come to a decent person using Report Lab and PAPDF, I thought I share:
- Read your PDF using the PDF file (reader), we'll call it Input
- Create a new PDF to use ReportLab, save it as a string object
- Read the string object using the PDF file (), we Use it by using text
- using PdfFileWriter () Education Create PDF object, but it output
- input and apply. Mergepage ( text .getPage (0)) You want that the text is added to each page, then use output .addPage () to add modified pages. A new document
This simple text works well for joints
packet = string IO.StringIO () can = canvas.Canvas ( Packets, passwords, pages = letters) & lt; Do something with canvas & gt;
From here you can merge the pages of the input file with another document
Comments
Post a Comment