OpenPDF icon indicating copy to clipboard operation
OpenPDF copied to clipboard

Is OpenPDB library is fully supported on Android?

Open ctoabidmaqbool1 opened this issue 1 year ago • 3 comments

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 avatar May 29 '24 06:05 ctoabidmaqbool1

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

let me check it!

ctoabidmaqbool1 avatar May 29 '24 06:05 ctoabidmaqbool1

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

lukaskris avatar Jun 20 '24 12:06 lukaskris

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!

ctoabidmaqbool avatar Jul 30 '24 12:07 ctoabidmaqbool