There are lots of Java PDF libraries available. And there are 3 key questions to ask when choosing which Java PDF library is right for you.
1. What functionality do I need?
Very few PDF libraries do everything. Here are some of the things you might want to do with a PDF library on your PDF files:-
- Create a new file
- Edit an existing document
- View
- Extract data from the contents
- Redact confidential information
- Convert into another format
There are a very wide range of correct answers depending on your use case.
2. Do I want an Open Source or a Commercial library?
This is a big dividing line with Java PDF libraries. There are some very good Open Source libraries available such as PDFBox or FOP. There are also a lot of dead, semi-complete ones as well.
iText offers a dual-licensed library for creating and editing. It uses the AGPL license so you will need the commercial version if you want to use it for closed-source applications.
Then there is a wide range of commercial libraries, such as our JPedal library.
The right answer for you is going to depend on:-
- The functionality and performance provided
- Whether the software license matches your usage (this is true for both Open Source and Commercial)
- Your support requirements.
Support is probably the biggest single reason our customers give us for buying JPedal when there are free alternatives. If support is important to you, then you need to weigh up the pros and cons of paying for a supported product versus providing your own support on a free product.
3. Is it a pure Java library?
There are some very good PDF libraries on other platforms and several products are Java wrappers to non-Java libraries. The best example of this is Adobe PDF Library from Datalogics which allows you to access the Adobe SDK from Java.
Other products are written in pure Java (ie PDFBox, iText, JPedal).
As always there are pros and cons to being a pure Java implementation versus providing a Java wrapper on a non-Java library.
Time to choose
Once you have the answers to these 3 key questions, you should find that there is a much smaller selection of Java PDF libraries which will be suited to your exact requirements.
If you want some suggestions, please post your requirements below and I will be happy to make some suggestions for you to try…
Our software libraries allow you to
Convert PDF files to HTML |
Use PDF Forms in a web browser |
Convert PDF Documents to an image |
Work with PDF Documents in Java |
Read and write HEIC and other Image formats in Java |