Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Editing PDF's in Python

Options
  • 09-04-2014 11:32pm
    #1
    Registered Users 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,791 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