On this page
Guides
How to Use ComPDFKit PDF SDK for Java in Java Applications
This section will help you to quickly get started with ComPDFKit PDF SDK to make a Java application with step-by-step instructions.
Create a New Project
- Create a Java application using the IDE. Here we create a new Java project.
Add the Package of ComPDFKit PDF SDK for Java
- The first thing we need to do is to import ComPDFKit PDF SDK for Java. Copy "lib" to the project.
Right click on the SDK and select Add as Library....
Add the following code to Main.java:
javastatic{ try { NativeKMPDFKit.initialize("your license", "your deviceId", "", Constants.LIB_DIR_NAME); } catch (FileNotFoundException e) { throw new RuntimeException(e); } }
Start the
main
method to print out the information of your computer's system version. If the information is printed successfully, you have integrated ComPDFKit PDF SDK for Java successfully!
Troubleshooting
Problems
If you meet some other problems when integrating our ComPDFKit PDF SDK for Java, feel free to contact ComPDFKit team.