zippy1978 / ghost4j

Java wrapper for Ghostscript C API + PS/PDF document handling API
http://www.ghost4j.org
GNU Lesser General Public License v3.0
64 stars 39 forks source link

Switch from IText to OpenPDF fork #66

Open mandrean opened 5 years ago

mandrean commented 5 years ago

ghost4j uses a ~10 year old dependency of itext with a kinda corrupt dependency declaration on some bouncy castle stuff in its POM file. (It should have been org.bouncycastle:bctsp-jdk14:1.38 instead of bouncycastle:bctsp-jdk14:138 etc.)

This PR bumps the IText dependency (which by the way was renamed to IText PDF and the reverse domain was changed from com.lowagi to com.itextpd).

EDIT Oct-13-2020: Updated PR to use LibrePDF/OpenPDF LGPL fork of IText 4 instead.

Closes #54.

MartinWillkomm commented 5 years ago

AFAIK 2.1.7 is the last iText version under LGPL License (and not AGPL) and the last really "free"version. It changed after that. If you increase the dependency, you might be introducing licensing problems with other project/programs. see here: https://stackoverflow.com/questions/4321207/what-is-latest-version-of-itext-that-is-not-agpl

mandrean commented 5 years ago

Damn.

https://repo1.maven.org/maven2/com/itextpdf/itextpdf/5.5.13.1/itextpdf-5.5.13.1.pom

I fell for the good ol' AGPL trick...

https://media.giphy.com/media/s0FsE5TsEF8g8/giphy.gif

Thanks for pointing it out!

4F2E4A2E commented 4 years ago

@mandrean thanks for this MR, but we can not afford AGPL as you can imagine. Is there any other alternative?

mandrean commented 4 years ago

@MartinWillkomm @4F2E4A2E ~1.5 years later, I have an alternative solution:

There is an actively maintained LGPL fork of IText 4 called LibrePDF/OpenPDF.

And it uses the old package namespaces, so it should work as a drop-in replacement in our case: https://github.com/LibrePDF/OpenPDF/blob/master/pdf-toolbox/src/test/java/com/lowagie/examples/general/HelloWorldPdf.java#L21

I updated this PR to use that instead. 🚀

mandrean commented 3 years ago

Ping @MartinWillkomm @4F2E4A2E

mandrean commented 2 years ago

Ping @4F2E4A2E @MartinWillkomm