OpenPDFSaucer is an open source Java library for creating, editing and rendering PDF files in Java:
- OpenPDF: creating and editing PDF files.
- FlyingSaucer: rendering arbitrary well-formed XML (or XHTML) using CSS 2.1 for layout and formatting, output to Swing panels, PDF, and images.
- PDFrenderer: rendering PDF documents to the screen using Java2D as images.
OpenPDFSaucer is a combined fork of OpenPDF version 2.0.3 (forked from iText), FlyingSaucer v9.11.0 and PDFRenderer.
Some of the features of OpenPDFSaucer include:
- Creating PDFs: You can use OpenPDF to create new PDF documents from scratch.
- Manipulating Existing PDFs: OpenPDF allows you to modify existing PDF documents by adding or removing pages, modifying text, and more.
- Text and Font Support: You can add text to PDF documents using various fonts and styles, and extract text from PDF files.
- Graphics and Images: OpenPDF supports the addition of images and graphics to PDF files.
- Table Support: The library facilitates the creation of tables in PDF documents.
- Encryption: You can encrypt PDF documents for security purposes.
- Page Layout: OpenPDF allows you to set the page size, orientation, and other layout properties.
- Rendering arbitrary well-formed XML (or XHTML) using CSS 2.1 for layout and formatting, output to Swing panels, PDF, and images, using Flying Saucer.
- Render PDF files as images using PDFrenderer.
Get OpenPDFSaucer here: https://github.com/openpdfsaucer/openpdfsaucer/releases/tag/2.0.0
It is also available as a Maven module dependency: https://github.com/orgs/openpdfsaucer/packages?repo_name=openpdfsaucer
- Openpdf OpenPDF is a free Java library for creating and editing PDF files.
- Flying-saucer-core Flying Saucer is a Java library for rendering arbitrary well-formed XML (or XHTML) using CSS 2.1 for layout and formatting, output to Swing panels, PDF, and images.
- Flying-saucer-pdf Flying Saucer PDF rendering of HTML.
- Flying-saucer-browser - a web browser in Java.
- PDFrenderer Java library for rendering PDF documents to the screen using Java2D.
- Openpdf-fonts-extra Fonts for OpenPDF
OpenPDFSaucer is licended with GNU Lesser General Public License (LGPL), Version 2.1. This is the same license as the source code it is forked from: OpenPDF, Flying Saucer and PDFrenderer.
GNU Lesser General Public License (LGPL), Version 2.1
For a short explanation see https://en.wikipedia.org/wiki/GNU_Lesser_General_Public_License
We want OpenPDFSaucer to consist of source code which is consistently licensed with the LGPL licences only. This also means that any new contributions to the project must have a LGPL license only. OpenPDF had a dual LGPL / MPL license, this fork will use the LGPL license specifically.
Please send all pull requests. Make sure that your contributions can be released with a LGPL license. In particular, pull requests to the OpenPDF project must only contain code that you have written yourself. GPL or AGPL licensed code will not be acceptable.
To contribute code to the OpenPDFSaucer project, your GitHub account must contain your real name, so that we can verify your identity. This is to ensure the trust, security and integrity of the OpenPDFSaucer project, and to prevent security incidents such as the "XZ Utils backdoor". Knowning the real name of the contributors will also identify and prevent conflict of interests.
More details: Contributing
- Code indentation style is 4 spaces. Maximum line length is 120 characters.
- Generally try to preserve the coding style in the file you are modifying.
We have now different versions of OpenPDFSaucer, and they require different versions of Java:
- OpenPDFSaucer requires Java 21. This project is focusing on modernization and using modern technologies and APIs.
OpenPDF supports glyph substitution which is required for correct rendering of fonts ligature substitution requirements. FOP dependency is required to enable this feature. Refer following wiki for details: wiki
OpenPDF supports OpenType layout, glyph positioning, reordering and substitution which is e.g. required for correct positioning of accents, the rendering of non-Latin and right-to-left scripts. OpenPDF supports DIN 91379. See: wiki
- BouncyCastle (BouncyCastle is used to sign PDF files, so it's a recommended
dependency)
- Provider (
org.bouncycastle:bcprov-jdk18on
ororg.bouncycastle:bcprov-ext-jdk18on
depending on which algorithm you are using) - PKIX/CMS (
org.bouncycastle:bcpkix-jdk18on
)
- Provider (
- Apache FOP (
org.apache.xmlgraphics:fop
) - Please refer to our pom.xml to see what version is needed.
- OpenPDF, FlyingSaucer and PDF renderer contributors.
- Please see Contributors.md.