Report Generator for Java

Java library to build highly customized reports using REST API

  • GroupDocs.Assembly Cloud SDK for cURL
  • GroupDocs.Assembly Cloud SDK for .NET
  • GroupDocs.Assembly Cloud SDK for Java
  • GroupDocs.Assembly Cloud SDK for C++
  • GroupDocs.Assembly Cloud SDK for Go
  • GroupDocs.Assembly Cloud SDK for Node.js
  • GroupDocs.Assembly Cloud SDK for PHP
  • GroupDocs.Assembly Cloud SDK for Python
  • GroupDocs.Assembly Cloud SDK for Ruby
  • GroupDocs.Assembly Cloud SDK for Swift
Start Free Trial

GroupDocs.Assembly Cloud is a fully managed, REST‑based service that enables Java developers to create highly‑customized documents, reports, contracts, invoices, and mail‑merge letters directly from the cloud. The solution works with a wide set of input and output formats, allowing you to store template files in GroupDocs Cloud Storage, bind them to XML or JSON data sources, and receive the assembled document in the format of your choice – DOCX, PDF, HTML, PPTX, XLSX, etc. Because all processing happens on the server side, there is no need to install any third‑party software or libraries on the client machine; the only requirement is a Java runtime and the Assembly Cloud SDK, which provides thin wrappers around the API endpoints.

Typical Java workflow consists of three simple steps. First, add the Assembly Cloud SDK dependency to your Maven or Gradle project and initialise the ApiClient with your personal App SID and App Key. Second, upload the template file to GroupDocs Cloud Storage using the uploadFile method. Third, create an AssembleOptions object, specify the path of the template, the data file (XML or JSON), the desired output format, and invoke assembleDocument. The service returns the assembled document as a stream that can be saved locally or further processed. The SDK also exposes helper methods for previewing templates, retrieving supported formats, and handling errors. This straightforward approach lets you integrate document generation into web applications, batch processing jobs, or micro‑services with minimal code.

All communications are encrypted with SSL/TLS, and access is controlled by personal keys. The platform automatically scales to handle large volumes of requests and supports batch mail‑merge operations where a single API call can generate thousands of personalized letters. Additionally, the SDK supports embedding images, charts, barcodes and applying conditional logic directly within the template using LINQ‑style expressions, giving you full control over the final document layout.

Document Assembly REST API Features

Generate documents from Word, PDF, HTML and other templates

LINQ‑style data binding for XML and JSON sources

Dynamic tables and lists from array data

Insert images, charts and barcodes directly

Conditional content blocks using expressions

Apply formulas and sequential data operations

Mail‑merge for batch personalized letters

Secure SSL/TLS transmission with personal keys

Upload templates to GroupDocs Cloud Storage

Download assembled documents via REST response

Generate a document in Java

The snippet below demonstrates how to upload a template, set the data source and generate a DOCX report using the Assembly Cloud API.
Steps

  1. Initialise the API client with your App SID and App Key.
  2. Upload the template file to cloud storage.
  3. Configure AssembleOptions – template path, output format and data file.
  4. Call assembleDocument to produce the result.
import com.groupdocs.assembly.*;

AssemblyApi assemblyApi = new AssemblyApi(new ApiClient());
ApiClient client = assemblyApi.getApiClient();
client.setAppKey("####################").setAppSid("####-####-####-####-####");

String fileName = "Input1.docx";
String dataFile = "Input2.docx";

File requestFileContent = new File(fileName);
UploadFileRequest uploadDocumentRequest = 
    new UploadFileRequest(requestFileContent, fileName, null);
assemblyApi.uploadFile(uploadDocumentRequest);

AssembleOptions assembleOptions = new AssembleOptions();
assembleOptions.setTemplateFileInfo(new TemplateFileInfo().filePath(fileName));
assembleOptions.setSaveFormat("docx");
assembleOptions.setReportData(Paths.get(dataFile).toString());

AssembleDocumentRequest request = new AssembleDocumentRequest(assembleOptions);
assemblyApi.assembleDocument(request);

Support and Learning Resources

GroupDocs.Assembly Cloud also offers individual SDKs for other languages as listed below:

  English
5f5c5ef