By shifting document layout and formatting concerns from code to templates, the Java application now focuses on data provision and managing the docgen process.
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 docgen 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.