Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Java component PDF library for integrating with the ComPDF API to create a PDF viewer and editor.

License

NotificationsYou must be signed in to change notification settings

ComPDFKit/compdfkit-api-java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

ComPDFKit offers powerful and steady PDF libraries and complete PDF functions to build PDF viewer and editor, which allows to preview, edit, annotate, sign, encrypt and decrypt PDF files.

ComPDFKit API provides a variety of Java API tools that allow you to create an efficient document processing workflow in a single API call.

ComPDFKit API allows you to get 1000 files processing monthly now! Justsign up for a free trial and enjoy comprehensive PDF functions.

Related

Requirements

Programming Environment: Java JDK 1.8 and higher.

Dependencies: Maven.

Installation

You can installthe Maven Repository of ComPDFKit API Library directly using the Maven Repository. Alternatively, you can include the following dependency in your"pom.xml" file:

<dependency>    <groupId>com.compdf</groupId>    <artifactId>compdfkit-api-java</artifactId>    <version>1.4.1</version></dependency>

Usage

Create API Client

First of all, please create an API client to complete the authentication. You need tosign in your ComPDFKit API account to get yourpublicKey andsecretKey at thedashboard. If you are new to ComPDFKit, click here tosign up for a free trial to process 1,000 documents per month for free.

  • Project public Key: You can find the public key in theAPI Keys section of your ComPDFKit API account.
  • Project secret Key: You can find the secret Key in theAPI Keys section of your ComPDFKit API account.
CPDFClientclient =newCPDFClient(<publicKey>, <secretKey>);

Create A Task

A task ID is automatically generated for you based on the type of PDF tool you choose. You can provide the callback notification URL. After the task processing is completed, we will notify you of the task result through the callback interface. You can perform other operations according to the request result, such as checking the status of the task, uploading files, starting the task, or downloading the result file.

// Create a clientCPDFClientclient =newCPDFClient(<publicKey>, <secretKey>);// Create a task// Create an example of a PDF TO WORD taskCPDFCreateTaskResultresult =client.createTask(CPDFConversionEnum.PDF_TO_WORD.getValue());// Get a task idStringtaskId =result.getTaskId();

Upload Files

Upload the original file and bind the file to the task ID. The field parameter is used to pass the JSON string to set the processing parameters for the file. Each file will generate automatically a uniquefilekey. Please note that a maximum of five files can be uploaded for a task ID and no files can be uploaded for that task after it has started.

// Create a clientCPDFClientclient =newCPDFClient(<publicKey>, <secretKey>);// Create a task// Create an example of a PDF TO WORD taskCPDFCreateTaskResultresult =client.createTask(CPDFConversionEnum.PDF_TO_WORD.getValue());// Get a task idStringtaskId =result.getTaskId();// Upload filesclient.uploadFile(<convertFile>,taskId);

Execute the task

After the file upload is completed, call this interface with the task ID to process the files.

// Create a clientCPDFClientclient =newCPDFClient(<publicKey>, <secretKey>);// Create a task// Create an example of a PDF TO WORD taskCPDFCreateTaskResultresult =client.createTask(CPDFConversionEnum.PDF_TO_WORD.getValue());// Get a task idStringtaskId =result.getTaskId();// Upload filesclient.uploadFile(<convertFile>,taskId);// execute Taskclient.executeTask(taskId,CPDFLanguageConstant.English);

Get The Task Info

Request task status and file-related meta data based on the task ID.

// Create a clientCPDFClientclient =newCPDFClient(<publicKey>, <secretKey>);// Create a task// Create an example of a PDF TO WORD taskCPDFCreateTaskResultresult =client.createTask(CPDFConversionEnum.PDF_TO_WORD.getValue());// Get a task idStringtaskId =result.getTaskId();// Upload filesclient.uploadFile(<convertFile>,taskId);// Execute Taskclient.executeTask(taskId,CPDFLanguageConstant.English);// Query TaskInfoCPDFTaskInfoResulttaskInfo =client.getTaskInfo(taskId);

Examples

There are many examples in thesamples folder, which show the main features of the ComPDFKit API and how to use them, such as watermarking PDFs, converting PDF to Word, Excel, JPG, PNG, etc. You can copy the code to your project and run it directly. To learn more about the ComPDFKit API, please visit ourAPI Reference.

Free Trial

ComPDFKit API is a powerful API that can be used to create an efficient document processing workflow in a single API call.

If you do not have a ComPDFKit API account, you cansign up for a free trial to process 1,000 documents per month for free.

Once you have a ComPDFKit API account, you can obtain yourpublicKey andsecretKey in thedashboard.

Support

ComPDFKit has a professional R&D team that produces comprehensive technical documentation and guides to help developers. Also, you can get an immediate response when reporting your problems to our support team.

For detailed information, please visit ourGuides page.

Stay updated with the latest improvements through ourChangelog.

For technical assistance, please reach out to ourTechnical Support.

To get more details and an accurate quote, please contact ourSales Team.

License

The code is available as open source under the terms of theApache-2.0 License.

About

Java component PDF library for integrating with the ComPDF API to create a PDF viewer and editor.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors3

  •  
  •  
  •  

Languages


[8]ページ先頭

©2009-2025 Movatter.jp