Examples of Client side applications that can do this are MS Word via Mail Merge, Adobe InDesign, and Adobe Acrobat with Evermap.

I'm looking for a solution that I can host in my web application, this implies an api or sdk to develop against, that will take a data set, and a pdf template, perform the merge, and serve up the completed document. I would prefer a rich template language, with formatting, conditions, and iterations over simple token replacement.

1 Answer 1



LibreOffice app provides an API available in multiple programming languages such as Java. For access to the API, see the LibreOffice SDK (software development kit).

This gives you programmatic ability to call on LibreOffice as a headless service rather as a GUI app. You can command LibreOffice to open template documents and perform a mail-merge operation.

So, for example you could build a web app in Vaadin using pure Java executing on the server side to call on LibreOffice running behind the scene to build your documents.

[web browser] - [web server] - [Java Servlet container] - [Vaadin web app] - [Java library for LibreOffice API] - [LibreOffice app engine] -[your documents & mail-merge]

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.