By shifting document layout and formatting concerns from code to templates, the Java application now focuses on data provision and managing the underlying processes.
The Docmosis-Java API provides fine-grain control over:
- Initialization – configuration settings and timing of startup.
- Template Management – location and registration of templates.
- Data Provision – data can include any combination of strings, images, lists, arrays of Java objects, Java object hierarchies, database query results and name/value key pairs.
- Document Rendering – specify output formats and destination.
Explore the diagrams on the right to understand key Docmosis-Java concepts and components.
This unique approach allows Docmosis-Java to efficiently perform single transactional requests, or scale to meet large batch processing requirements.
Coding in Java, doesn’t necessarily mean using Docmosis-Java. Java developers, looking for a self-hosted option, should consider Tornado as an alternative. Tornado provides access to the Docmosis engine as a web service and is easy to integrate via a simple REST based API.
// Configuration and initialisation
Configuration config = new Configuration(licenseKey, site, path); SystemManager.initialise(config);// Create a data provider and add some data
DataProviderBuilder dpb = new DataProviderBuilder();
dpb.add(“message”, “This Docmosis engine is working great!”)// Specify template and output files and formats
File templateFile = new File(“myTemplate.docx”);
File outputFile = new File(“result.pdf”);// Generate the document
DocumentProcessor.renderDoc(templateFile, outputFile, dpb.getDataProvider());
Getting Started
Add Docmosis to your application with 7 lines of code.
Start a free trial to receive a Docmosis-Java license key valid for 30 days.
The trial key can be used to run a single converter (D-100 equivalent) with options to trial higher powered editions or extend the trial on request.
- Start with simple Code Samples to understand key concepts
- Download and add the JAR file to your favorite IDE
- Explore the Javadoc or the Java API online
- Add Docmosis-Java to your application and provide template-based document generation to your business teams and end users
Follow the instructions on our Resources Website to help you get started.
FAQs
What is Docmosis-Java, and when is it the right choice?
Docmosis-Java is a template-based document generation library that integrates directly into Java applications.
It is suited to development teams that require native Java API integration and programmatic control over the document generation engine, rather than accessing a service through a REST API.
What distinguishes Docmosis-Java from other Java document generation libraries?
Unlike libraries that rely on code-defined layouts or in-process conversion, Docmosis-Java combines Word or LibreOffice templates with an independent processing architecture.
This simplifies template creation and maintenance, isolates conversion dependencies from the Java application and allows processing capacity to be managed independently.
How does Docmosis-Java work with existing application data?
Docmosis-Java can use existing Java objects, collections, nested object structures and database query results directly.
Developers supply data through the Java API using data providers, which make the information available to templates during generation.
What is involved in embedding Docmosis-Java into an existing Java application?
Integrating Docmosis-Java involves adding its JAR file to a Java application, initializing the Core and configuring templates and converter processes.
Developers then call the Java API with the required data and generation instructions to produce documents.
Does a Docmosis-Java licence limit how many documents can be generated?
No. A Docmosis-Java licence allows unlimited document generation for the licensed application.
Licences are perpetual, with a one-off fee. Editions differ in converter capacity and template limits, and include 12 months of support and updates, with optional annual renewal.

