Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.
Hi all, please see this major site announcement: https://www.boards.ie/discussion/2058427594/boards-ie-2026

Editing PDF's in Python

  • 09-04-2014 10:32PM
    #1
    Registered Users, Registered Users 2 Posts: 109 ✭✭


    Is there an alternate way of doing this in Python than using ReportLab to create a new PDF from an already existing one? I am trying to insert some text onto a PDF similar to a certificate. Any help or information on the matter will be greatly appreciated.


Comments

  • Technology & Internet Moderators Posts: 28,863 Mod ✭✭✭✭oscarBravo


    Not fully Pythonic, but if I was doing something like that I'd generate a PDF with just the text to be overlaid in the appropriate position, and then use the command-line pdftk tool (via subprocess) to combine it with the template PDF into the final one:
    pdftk inserted-text.pdf background template.pdf output certificate.pdf
    


Advertisement