OpenPDF

OpenPDF 是一个用于创建和编辑 PDF 文件的免费 Java 库,采用 LGPL 和 MPL 开源许可证。OpenPDF 基于 iText 的一个分叉。「OpenPDF is a free Java library for creating and editing PDF files with a LGPL and MPL open source license. OpenPDF is based on a fork of iText. 」

Github星跟蹤圖

OpenPDF is an open source Java library for PDF files

OpenPDF is a Java library for creating and editing PDF files with a LGPL and MPL open source
license. OpenPDF is the LGPL/MPL open source successor of iText, and is based on some forks of iText
4 svn tag. We welcome contributions from other developers. Please feel free to submit pull-requests
and bugreports to this GitHub repository.

CI
Maven Central
License (LGPL version 3.0)
License (MPL)

Join the chat at https://gitter.im/LibrePDF/OpenPDF

OpenPDF version 1.3.32 released 2023-11-02

Get version 1.3.32 here - https://github.com/LibrePDF/OpenPDF/releases/tag/1.3.32

Use OpenPDF as Maven dependency

Add this to your pom.xml file to use the latest version of OpenPDF:


<dependency>
  <groupId>com.github.librepdf</groupId>
  <artifactId>openpdf</artifactId>
  <version>1.3.32</version>
</dependency>

License

GNU Lesser General Public License (LGPL), Version 2.1

For a short explanation see https://en.wikipedia.org/wiki/GNU_Lesser_General_Public_License

Mozilla Public License Version 2.0

For a short explanation see https://en.wikipedia.org/wiki/Mozilla_Public_License

You can find also a nice explanation of these licenses under https://itsfoss.com/open-source-licenses-explained/

We want OpenPDF to consist of source code which is consistently licensed with the LGPL and MPL
licences only. This also means that any new contributions to the project must have a dual LGPL and
MPL license only.

Documentation

Background

OpenPDF is open source software with a LGPL and MPL license. It is a fork of iText version 4, more
specifically iText svn tag 4.2.0, which was hosted publicly on sourceforge with LGPL and MPL license
headers in the source code, and LGPL and MPL license documents in the svn repository. Beginning with
version 5.0 of iText, the developers have moved to the AGPL to improve their ability to sell
commercial licenses.

OpenPDF ancestors in GitHub (in fork order):

  1. @rtfarte / OpenPDF - parent
    of LibrePDF/OpenPDF
  2. @kulatamicuda
    / iText-4.2.0
  3. @daviddurand
    / iText-4.2.0
  4. @ymasory / iText-4.2.0 -
    original parent on GitHub

Projects using OpenPDF

Android

OpenPDF can be used with Android, more info
here: Android-support

Contributing

Release the hounds! Please send all pull requests. Make sure that your contributions can be
released with a dual LGPL and MPL 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.

Coding Style

  • Code indentation style is 4 spaces.
  • Generally try to preserve the coding style in the file you are modifying.

Dependencies

Required Dependencies:

  • Java 8 or later is required to use OpenPDF. All versions Java 8 to Java OpenJDK 15 have been
    tested to work.

UTF-8 Fonts:

As of 1.3.21 the UTF-8 Liberation fonts moved to its own module, to reduce the size of the OpenPDF
jar. If you want to use the bundled UTF-8 fonts, please add the following dependency to your project
and use the class org.librepdf.openpdf.fonts.Liberation.

<dependency>
  <groupId>com.github.librepdf</groupId>
  <artifactId>openpdf-fonts-extra</artifactId>
  <version>${openpdf.version}</version>
</dependency>

Supporting complex glyph substitution/ Ligature substitution:

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

Supporting OpenType layout, glyph positioning, reordering and substitution:

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

Optional:

  • BouncyCastle (BouncyCastle is used to sign PDF files, so it's a recommended
    dependency)
    • Provider (org.bouncycastle:bcprov-jdk18on or org.bouncycastle:bcprov-ext-jdk18on depending
      on which algorithm you are using)
    • PKIX/CMS (org.bouncycastle:bcpkix-jdk18on)
  • Apache FOP (org.apache.xmlgraphics:fop)
  • Tiff support: Java versions prior to 9 require an additional library in the classpath to handle tiff images. Options are:
  • Please refer to our pom.xml to see what version is needed.

Credits

Please see Contributors.md.

主要指標

概覽
名稱與所有者LibrePDF/OpenPDF
主編程語言Java
編程語言Java (語言數: 7)
平台
許可證Other
所有者活动
創建於2016-07-11 15:50:34
推送於2025-07-11 09:04:33
最后一次提交2025-07-11 11:04:32
發布數88
最新版本名稱2.2.4 (發布於 )
第一版名稱1.0 (發布於 )
用户参与
星數3.9k
關注者數76
派生數653
提交數1.8k
已啟用問題?
問題數548
打開的問題數141
拉請求數660
打開的拉請求數0
關閉的拉請求數105
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?