<dependency>
<groupId>com.groupdocs</groupId>
<artifactId>groupdocs-assembly-cloud</artifactId>
<version>21.1.0</version>
</dependency>
compile(group: 'com.groupdocs', name: 'groupdocs-assembly-cloud', version: '21.1.0')
<dependency org="com.groupdocs" name="groupdocs-assembly-cloud" rev="21.1.0">
<artifact name="groupdocs-assembly-cloud" ext="jar"/>
</dependency>
libraryDependencies += "com.groupdocs" % "groupdocs-assembly-cloud" % "21.1.0"
Document Assembler Java Cloud REST API
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
- Dynamically generate cloud documents & reports based on templates & external data sources.
- Ability to dynamically insert various document elements, such as, data, lists, charts, tables, etc.
- Set alternate template options based on conditional blocks.
- Dynamically build email message attachments by assigning attributes to the email message body.
- Reporting engine provides a LINQ-based model for data processing.
- Filter, sort, group, & format data to generate reports.
- Define & declare custom variables in document template to be used within expressions.
- Use formatting expressions to format data in its string representation.
- Convert expression result to be represented as an
HTML
block. - Several number formats are supported, such as, Alphabetic, Ordinal, Cardinal, Hex, etc.
- Several string formats are supported, such as, Lower, Upper, Caps, FirstCap.
- Various styles of lists are supported, such as, Bulleted, Numbered, In-Paragraph, etc.
- Ability to apply coloring to list items dynamically via conditional expressions.
- Use conditional expressions and data bands to generate tables dynamically.
- Dynamically create various types of charts, such as, Line Graph, Bubble Graph, Scatter Graph, Pie Chart, Bar Chart, etc.
- Ability to dynamically insert bookmarks, hyperlinks, checkboxes, & barcodes within reports.
- Supports 60+ types of barcodes, including, Codabar, QR-Code, Databar, & many more.
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:
- Java 1.7+
- 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://repository.groupdocs.cloud/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
- Type: OAuth 2.0
- Flow: application
- Authorization URL: https://api.groupdocs.cloud/connect/token
- Token Lifetime: 1 day (Default)
Docs | Live Demos | Swagger UI | Code Samples | Free Support | Free Trial