LibrePDF / OpenPDF

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.
Other
3.63k stars 598 forks source link

Is OpenPDB library is fully supported on Android? #1173

Open ctoabidmaqbool1 opened 6 months ago

ctoabidmaqbool1 commented 6 months ago

Hi! Devs, Is OpenPDF library is fully supported on Android too?

Before choosing OpenPDF I was using iText PDF 5.x without any issue on Android, e.g. Java, Javafx 1.8 Project with old Gluon Mobile plugin project

But OpenPDF is not be used on Andoird becasue it's dependent upon java.awt package e.g. java.awt.Color.

ctoabidmaqbool1 commented 6 months ago

Okey, I think, OpenPdf have alrady provided the solution here too! https://github.com/LibrePDF/OpenPDF/wiki/Android-support

let me check it!

lukaskris commented 5 months ago

I using at android its work well at debug application butt at release application i facing error

Caused by java.lang.NullPointerException: Attempt to invoke virtual method 'java.util.Iterator java.util.HashSet.iterator()' on a null object reference at javax.imageio.spi.ServiceRegistry$LookupProvidersIterator.<init>(ServiceRegistry.java:595) at javax.imageio.spi.ServiceRegistry.lookupProviders(ServiceRegistry.java:54) at javax.imageio.spi.ServiceRegistry.lookupProviders(ServiceRegistry.java:58) at javax.imageio.spi.IIORegistry$1.run(IIORegistry.java:94) at java.security.AccessController.doPrivileged(AccessController.java:46) at javax.imageio.spi.IIORegistry.registerApplicationClasspathSpis(IIORegistry.java:90) at javax.imageio.spi.IIORegistry.<init>(IIORegistry.java:57) at javax.imageio.spi.IIORegistry.getDefaultInstance(IIORegistry.java:80) at javax.imageio.ImageIO.<clinit>(ImageIO.java:50) at com.lowagie.text.ImageLoader.getPngImage(ImageLoader.java:75)

until now i not have the solution

ctoabidmaqbool commented 4 months ago

Please note that, https://github.com/andob/android-awt is now not active one repo, It's not working in latest Android / Java! Like in Graalvm native-image feature it's not working at all!

Still itext pdf 5 can be used in Android too, (it generated many error / warning in Android but still it's working in Android). OpenPdf must support all major platform e.g. Android!

A single library is best which is working on all major platform as Javafx is now complely cross-pltform!