0

I have created a really nice looking invitation letter in word (.doc/.docx). Now, I need to personalize it for 1,000 people with their names and associated QR codes.

I tried working with pyfpdf and reportlab but it seems like in order to use these packages I have to re-generate the whole invitation letter along with text and graphics. I'm not sure if I will be able to generate an equally visually appealing letter as I have now in word (at least not without a lot of effort).

Is there a better way, where I use word template as input, fill-in the name and QR code and generate PDF?

4
  • You should use LibreOffice for these tasks, there is an excellent Python binding to LibreOffice. Commented Sep 4, 2015 at 13:21
  • Why was this downvoted :-O Commented Sep 4, 2015 at 13:23
  • Thanks dotancohen, I will try to look into this.. Commented Sep 4, 2015 at 13:24
  • 2
    Word itself also supports that. It's called mail merge. Commented Sep 4, 2015 at 13:39

2 Answers 2

1

If you are prepared to do the QR code and personalization in reportlab, then pdfrw (disclaimer: I am the author) will let you either merge the PDFs after the fact (similar to a watermarking operation), or can bring the PDF you generate from word in to reportlab a form XObject (similar to an image). You can use it for a background.

Sign up to request clarification or add additional context in comments.

Comments

0

You should try using the Microsoft Word MailMerge feature which will probably do exactly what you want from within Word itself.

PDF editing is a very complex beast, as is docx editing. The majority of companies who offer PDF "support" use PDF APIs, since the software to edit and create PDF documents is so complex it's a retailable product in itself.

You can use MailMerge either to print or to email the PDF to lots of people at once with custom settings for each person.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.