<dependency>
<groupId>com.groupdocs</groupId>
<artifactId>groupdocs-merger-cloud</artifactId>
<version>22.5</version>
</dependency>compile(group: 'com.groupdocs', name: 'groupdocs-merger-cloud', version: '22.5')<dependency org="com.groupdocs" name="groupdocs-merger-cloud" rev="22.5">
<artifact name="groupdocs-merger-cloud" ext="jar"/>
</dependency>libraryDependencies += "com.groupdocs" % "groupdocs-merger-cloud" % "22.5"API REST Java Cloud de fusion de documents
Product Page | Docs | Live Demos | Swagger UI | Code Samples | Blog | Free Support | Free Trial
GroupDocs.Merger Cloud SDK for Java vous aide à créer des applications Java de fusion de documents dans le cloud qui fonctionnent sans installer de logiciel tiers. Il s’agit d’un wrapper autour de GroupDocs.Merger Cloud REST APIs.
Conditions
La création de la bibliothèque cliente de l’API nécessite :
- Java 1.7+
- Maven
Conditions préalables
Pour utiliser GroupDocs.Merger Cloud SDK pour Java, vous devez créer un compte avec GroupDocs Cloud et rechercher/créer l’ID client et le secret client sur Cloud Dashboard. Un quota gratuit est disponible. Pour plus de détails, consultez GroupDocs Cloud Pricing.
Installez GroupDocs.Merger-Cloud depuis Maven
Ajoutez le référentiel GroupDocs Cloud à votre application pom.xml
<repository>
<id>repository.groupdocs.cloud</id>
<name>repository.groupdocs.cloud</name>
<url>https://releases.groupdocs.cloud/java/repo/</url>
</repository>
Installer depuis la source
Pour installer la bibliothèque cliente de l’API dans votre référentiel Maven local, exécutez simplement :
mvn clean install
Pour le déployer sur un référentiel Maven distant à la place, configurez les paramètres du référentiel et exécutez :
mvn clean deploy
Reportez-vous au OSSRH Guide pour plus d’informations.
Utilisateurs Maven
Ajoutez cette dépendance au POM de votre projet :
<dependency>
<groupId>com.groupdocs</groupId>
<artifactId>groupdocs-merger-cloud</artifactId>
<version>22.5</version>
</dependency>
Les autres
Générez d’abord le JAR en exécutant :
mvn clean package
Ensuite, installez manuellement les fichiers JAR suivants :
target/groupdocs-merger-cloud-22.5.jarcible/lib/*.jar
Commencer
Veuillez suivre les instructions Quick Start.
Exemple de code Java pour fusionner des documents Cloud de différents formats
// For complete examples and data files, please go to https://github.com/groupdocs-merger-cloud/groupdocs-merger-cloud-java-samples
String MyClientSecret = ""; // Get ClientId and ClientSecret from https://dashboard.groupdocs.cloud
String MyClientId = ""; // Get ClientId and ClientSecret from https://dashboard.groupdocs.cloud
Configuration configuration = new Configuration(MyClientId, MyClientSecret);
DocumentApi apiInstance = new DocumentApi(configuration);
try {
FileInfo fileInfo1 = new FileInfo();
fileInfo1.setFilePath("Pdf/one-page-password.pdf");
fileInfo1.setPassword("password");
JoinItem item1 = new JoinItem();
item1.setFileInfo(fileInfo1);
FileInfo fileInfo2 = new FileInfo();
fileInfo2.setFilePath("WordProcessing/one-page.docx");
JoinItem item2 = new JoinItem();
item2.setFileInfo(fileInfo2);
JoinOptions options = new JoinOptions();
options.setJoinItems(Arrays.asList(item1, item2));
options.setOutputPath("output/joined.pdf");
JoinRequest request = new JoinRequest(options);
DocumentResult response = apiInstance.join(request);
System.err.println("Output file path: " + response.getPath());
} catch (ApiException e) {
System.err.println("Exception while calling api:");
e.printStackTrace();
}
Autorisation et authentification
Authentication schemes défini pour l’API est le suivant :
JWT
- Type : OAuth 2.0
- Flux : candidature
- URL d’autorisation :https://api.groupdocs.cloud/connect/token
- Token Lifetime : 1 jour (par défaut)
Product Page | Docs | Live Demos | Swagger UI | Code Samples | Blog | Free Support | Free Trial
GroupDocs Java REST API Maven SDK Java SDK Cloud REST REST API Cloud API MIT JWT oauth GroupDocs.Total Cloud GroupDocs.Merger Cloud JAR document automation document automation cloud document merge merger merging join joiner joining combine combiner combining append appender appending split splitter splitting password protection security extract extractor extraction portrait landscape orientation attachment import order swap rotate DOC DOCX DOCM DOT DOTX DOTM RTF TXT ODT OTT XLS XLSX XLSB XLSM XLT XLTX XLTM CSV TSV ODS PPT PPTX PPS PPSX ODP OTP VSDX VSDM VSSX VSSM VSTX VSTM VDX VSX VTX ONE ERR

