<dependency>
    <groupId>com.groupdocs</groupId>
    <artifactId>groupdocs-assembly-cloud</artifactId>
    <version>21.1.0</version>
</dependency>
copied!  
compile(group: 'com.groupdocs', name: 'groupdocs-assembly-cloud', version: '21.1.0')
copied!  
<dependency org="com.groupdocs" name="groupdocs-assembly-cloud" rev="21.1.0">
    <artifact name="groupdocs-assembly-cloud" ext="jar"/>
</dependency>
copied!  
libraryDependencies += "com.groupdocs" % "groupdocs-assembly-cloud" % "21.1.0"
copied!  

Document Assembler Java Cloud REST API

banner

Docs | Live Demos | Swagger UI | Code Samples | Free Support | Free Trial

GroupDocs.Assembly Cloud SDK for Java helps you build cloud Document Assembling & Reporting Java Apps that work without installing any 3rd party software. It is a wrapper around GroupDocs.Assembly Cloud REST APIs.

Cloud Document Automation & Assembly SDK Features

Supported Document Assembling File Formats

Microsoft Word®: DOC, DOCX, DOT, DOTX, DOT, DOTM, RTF
OpenOffice Writer®: ODT, OTT
Microsoft Excel®: XLS, XLSX, XLT, XLTX, XLTM, XLS, XLSM
OpenOffice Calc®: ODS
Microsoft PowerPoint®: PPT, PPTX, PPS, PPSX, PPTM, PPSM, POT, POTX, POTM
OpenOffice Impress®: ODP, OTP
Microsoft Outlook®: EML, MSG
Apple® Email: EMLX
Markup: HTML, MHT, HTML
Other: TXT, MD (Markdown)

Supported Data Sources

  • XML
  • JSON

Requirements

Building the API client library requires:

  1. Java 1.7+
  2. Maven / Gradle

Prerequisites

To use GroupDocs.Assembly Cloud SDK for Java you need to register an account with GroupDocs Cloud and lookup/create Client ID and Client Secret at Cloud Dashboard. There is free quota available. For more details, see GroupDocs Cloud Pricing.

Install GroupDocs.Assembly-Cloud from Maven

Add GroupDocs Cloud repository to your application pom.xml

<repository>
    <id>repository.groupdocs.cloud</id>
    <name>repository.groupdocs.cloud</name>
    <url>https://releases.groupdocs.cloud/java/repo/</url>
</repository>

Install from source

To install the API client library to your local Maven repository, simply execute:

mvn clean install

To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:

mvn clean deploy

Refer to the OSSRH Guide for more information.

Maven users

Add this dependency to your project’s POM:

<dependency>
    <groupId>com.groupdocs</groupId>
    <artifactId>groupdocs-assembly-cloud</artifactId>
    <version>21.1.0</version>
    <type>pom</type>
</dependency>

Gradle users

Add this dependency to your project’s build file:

compile "com.groupdocs:GroupDocsAssemblyCloud:21.1.0"

Others

At first generate the JAR by executing:

mvn clean package

Then manually install the following JARs:

  • target/groupdocs-assembly-cloud-21.1.0.jar
  • target/lib/*.jar

Get Started

Please follow the Quick Start instructions.

Sample Java Code for Document Assembly

import com.groupdocs.assembly.*;
import com.groupdocs.assembly.auth.*;
import com.groupdocs.assembly.model.*;
import com.groupdocs.assembly.api.AssemblyApi;

import java.io.File;
import java.util.*;

public class AssemblyApiExample {

    public static void main(String[] args) {
        
        AssemblyApi apiInstance = new AssemblyApi();
        AssembleOptions saveOptions = new AssembleOptions();
        saveOptions.setTemplateFileInfo(new TemplateFileInfo().filePath(Paths.get(pathtoFile).toString()));
        saveOptions.setSaveFormat("pdf");
        saveOptions.setReportData(new String(Files.readAllBytes(Paths.get(pathToData))));
        try {
            AssembleDocumentRequest request = new AssembleDocumentRequest(saveOptions);
            File response = TestInitializer.assemblyApi.assembleDocument(request);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AssemblyApi#postAssembleDocument");
            e.printStackTrace();
        }
    }
}

Authorization & Authentication

Authentication schemes defined for the API is as follows:

JWT

Docs | Live Demos | Swagger UI | Code Samples | Free Support | Free Trial

VersionRelease Date
20.6.0January 25, 2022
21.1.0January 25, 2022
 
 English