Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an ODT certificate template which I need to customize with a few elements (name, surname, date, etc.) before printing it.

So I would be able to fill it with the data provided in an external document (which could be a .txt file containing for example name, surname, etc.). Say I have to print 100 or so of such certificates, and I have already the parameters data in the external file, I would be able to pass the parameters to an headless libreoffice instance and print a customized version for each entry, all this done through a script. The alternative is to fill the data manually in the template for each certificate, which is dumb, boring and error-prone.

I could use LaTeX but I already prepared the certificate in ODT format and I don't know LaTeX/TeX enough to customize it with the same level of control I already got with libreoffice (for example: font family and size of the various paragraphs, exact location of text, etc. etc.).

Do you know some way to achieve this with libreoffice?

Related question: How can I write an .odt programmatically?

Difference in my case is that I only need to fill a few text values.

share|improve this question
up vote 1 down vote accepted

LibreOffice Writer has a mail merge feature to do what you're asking.

Don't be fooled by the name, which is now standard in office application suites. The general task of producing a batch of documents with fields filled in from a data set is still called mail merge, for hysterical raisins (merging one's contact database with a form letter was the first widespread task where this feature was required).

share|improve this answer
The mail merge feature seems indeed very specific for sending mails or e-mails, can't be easily adapted to print generic documents with auto-filled fields. – NoUserFound May 19 '14 at 8:27
I figured out how to use the feature, and looks like what I need. This youtube video: was also useful to see how to use the feature in combination with a datasource. – NoUserFound May 20 '14 at 8:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .