Git Product home page Git Product logo

adegtiarev / openpdf Goto Github PK

View Code? Open in Web Editor NEW

This project forked from librepdf/openpdf

0.0 0.0 0.0 37.81 MB

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. We welcome contributions from other developers. Please feel free to submit pull-requests and bugreports to this GitHub repository.

License: Other

Shell 0.03% Java 99.79% HTML 0.18%

openpdf's Introduction

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.

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

Codacy Badge Codacy Badge CodeQL Quality Gate Status CodeFactor

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

OpenPDF version 2.0.1 released 2024-03-03

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

Please note: Repositories like Maven Central and others may take a few days to update.

Features

Some of the features of OpenPDF 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.

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>2.0.1</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.

More details: Contributing

Coding Style

  • 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.

Dependencies

Required Dependencies:

We have now different versions of OpenPDF, and they require different versions of Java:

  • The 2.0.x Branch requires Java 17 or later.
  • The 1.4.x Branch requires Java 11 or later.
  • The 1.3.x Branch requires Java 8 or later.
  • Some versions of 1.3 where release with Java 11 as minimum requirement, but we have reverted this to Java 8 as minimum requirement.
  • OpenPDF versions 2.0.x: We are working on modernizing the OpenPDF library for Java 17+.

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)
  • Please refer to our pom.xml to see what version is needed.

Credits

Please see Contributors.md.

openpdf's People

Contributors

andreasrosdal avatar asturio avatar dependabot[bot] avatar wugengxian avatar daviddurand avatar sixdouglas avatar codecracker2014 avatar albfernandez avatar tlxtellef avatar lapo-luchini avatar bsanchezb avatar ymasory avatar bengolder avatar noavarice avatar epic0000 avatar mluppi avatar v-f avatar mrestivill avatar obsismc avatar kindrat avatar lonzak avatar chappyer avatar vk-github18 avatar syakovyn avatar prashantbhat avatar fellmann avatar brooklyn-0 avatar roschdahl avatar rosdal avatar ubermichael avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.