- Notifications
You must be signed in to change notification settings - Fork4
Java component PDF library for integrating with the ComPDF API to create a PDF viewer and editor.
License
ComPDFKit/compdfkit-api-java
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
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.
- ComPDFKit API - PHP Library:ComPDFKit API - PHP Library
- ComPDFKit API - C#.NET Library:ComPDFKit API - C#.NET Library
- ComPDFKit API - Swift Library:ComPDFKit API - Swift Library
- ComPDFKit API - Python Library:ComPDFKit API - Python Library
- How to Build an Android PDF Viewer or Editor in Java
Programming Environment: Java JDK 1.8 and higher.
Dependencies: Maven.
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>
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>);
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 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);
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);
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);
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.
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.
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.
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
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors3
Uh oh!
There was an error while loading.Please reload this page.