- Java Library for PDF Documents Management
- Open Source Java API to Create, Edit & Manipulate PDF Files from your own applications.
- At A Glance
- Platform Independence
- Getting Started with OpenPDF
- OpenPDF Maven Dependency
- Create & Edit PDF Files via Java API
- Create PDF document — Java
- Insert Images to PDF Documents via Java
- Add Image in PDF — Java
- Add Lists to PDF Documents
- Add Bookmarks to List in PDF via Java
- Adding Header and Footer to PDF Documents via Java
- Apache PDFBox ® — A Java PDF Library
- Apache PDFBox 3.0.0-beta1 released 2023-07-14
- Getting Help
- Features
- Reading PDF File Using Java
Java Library for PDF Documents Management
Open Source Java API to Create, Edit & Manipulate PDF Files from your own applications.
OpenPDF is an open-source PDF library for Java developers. It allows creating & modifying PDF files from Java apps without any external dependencies. OpenPDF is licensed with an LGPL and MPL license & is a fork of iText version 4.
PDF is one of the World’s favorite document formats and still very useful. OpenPDF API support several important features, such as creation and modification of PDF documents, the addition of images to PDF, insertion of new pages to an existing PDF file, creation of paragraphs, the addition of header and footers, creation of TOC, content editing and more.
At A Glance
An overview of OpenPDF features.
- Generate PDFs
- Add paragraph
- Create table
- Edit content
- Insert image
- PDF header
- PDF footer
- Manipulate PDF
- Data Extraction
- Add contents
- Merge PDFs
- Encrypt PDF
- Search PDF
- PDF form
OpenPDF supports PDF file format as well as industry-standard formats for export.
Platform Independence
OpenPDF only requires Java runtime.
Getting Started with OpenPDF
Java 8 or later is required to use the OpenPDF library. All Java versions from 8 to Java 12 have been tested to work. It will compile the Java sources and package the binary classes into jar packages by default.
OpenPDF Maven Dependency
com.github.librepdf openpdf 1.3.11
Create & Edit PDF Files via Java API
OpenPDF provides the functionality for PDF document creation as well as modifications from Java applications. Software developers can easily create PDF documents with content & images. In order to create a new document, first of all, you need to create a document object and then create a writer that listens to the document and directs a PDF stream to the file. Once the document is created you can easily add paragraphs, add new pages, and insert images with ease.
Create PDF document — Java
Insert Images to PDF Documents via Java
OpenPDF allows Java programmers to insert images into PDF documents inside their own Java applications. Images always add more value to the piece of content. To insert an image, you need to provide an image name and location, then by calling the document object you can open the document and add the image on the desired page or location. Once done you just need to close the document in order to commit changes.
Add Image in PDF — Java
Add Lists to PDF Documents
OpenPDF API facilitates Java developers to add lists to PDF documents. You can create a list and then add list items to PDF with ease. You can also pass a symbol for marking the list items (Unicode character). You can also select a numbered or lettered list. There are also specialized classes for Roman letters and Greek letters.
Add Bookmarks to List in PDF via Java
Adding Header and Footer to PDF Documents via Java
Headers and footers can hold important information about a document or data to help keep longer documents organized and make them easier to read. Headers and footers normally include additional information such as page numbers, dates, an author’s name, and footnotes and so on. OpenPDF API enables Java developers to add header and footer to their PDF documents with just a couple of lines of code.
Apache PDFBox ® — A Java PDF Library
The Apache PDFBox ® library is an open source Java tool for working with PDF documents. This project allows creation of new PDF documents, manipulation of existing documents and the ability to extract content from documents. Apache PDFBox also includes several command-line utilities. Apache PDFBox is published under the Apache License v2.0.
Apache PDFBox 3.0.0-beta1 released
2023-07-14
The Apache PDFBox community is pleased to announce the first beta release of Apache PDFBox version 3.0.0. It is available for download at:
See the full release notes for details about this release.
The Migration Guide shall give users coming from PDFBox 2.0.x an overview about things to look at when switching over. More details to come.
Getting Help
To get help on using PDFBox, please Subscribe to the Users Mailing List and post your questions there. We’re happy to help.
The project is a volunteer effort and we’re always looking for interested people to help us improve PDFBox. There are a multitude of ways that you can help us depending on your skills. Subscribe to the Mailing Lists and find out how you can help.
Features
Extract Unicode text from PDF files.
Split a single PDF into many files or merge multiple PDF files.
Extract data from PDF forms or fill a PDF form.
Validate PDF files against the PDF/A-1b standard.
Print a PDF file using the standard Java printing API.
Save PDFs as image files, such as PNG or JPEG.
Create a PDF from scratch, with embedded fonts and images.
Reading PDF File Using Java
As always, the writeup is super practical and based on a simple application that can work with documents with a mix of encrypted and unencrypted fields.
We rely on other people’s code in our own work. Every day.
It might be the language you’re writing in, the framework you’re building on, or some esoteric piece of software that does one thing so well you never found the need to implement it yourself.
The problem is, of course, when things fall apart in production — debugging the implementation of a 3rd party library you have no intimate knowledge of is, to say the least, tricky.
Lightrun is a new kind of debugger.
It’s one geared specifically towards real-life production environments. Using Lightrun, you can drill down into running applications, including 3rd party dependencies, with real-time logs, snapshots, and metrics.
Learn more in this quick, 5-minute Lightrun tutorial:
Slow MySQL query performance is all too common. Of course it is. A good way to go is, naturally, a dedicated profiler that actually understands the ins and outs of MySQL.
The Jet Profiler was built for MySQL only, so it can do things like real-time query performance, focus on most used tables or most frequent queries, quickly identify performance issues and basically help you optimize your queries.
Critically, it has very minimal impact on your server’s performance, with most of the profiling work done separately — so it needs no server changes, agents or separate services.
Basically, you install the desktop application, connect to your MySQL server, hit the record button, and you’ll have results within minutes:
DbSchema is a super-flexible database designer, which can take you from designing the DB with your team all the way to safely deploying the schema.
The way it does all of that is by using a design model, a database-independent image of the schema, which can be shared in a team using GIT and compared or deployed on to any database.
And, of course, it can be heavily visual, allowing you to interact with the database using diagrams, visually compose queries, explore the data, generate random data, import data or build HTML5 database reports.