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.6k stars 596 forks source link

Please provide Android support for GrallVM native-image feature; #1193

Open ctoabidmaqbool opened 4 months ago

ctoabidmaqbool commented 4 months ago

I know OpenPdf is not officially supported on Android devices.

Still any chances to provide support on Android Device, I am instrusted to make Android App using Gluon's plugins e.g. gluonfx-maven-plugin or gluon-gradle-plugin. which behind the scene liverges the GraalVM native-image featue.

Still itTextPdf 5 can run on Android without any manor issue, but OpenPdf lackes supports on this side!

ctoabidmaqbool commented 3 months ago

https://github.com/LibrePDF/OpenPDF/issues/1173

Gluon are providing Javafx support on Android and IOS too, and also JPro is providing support on Web!

I need single PDF solutions which must works on all major platforms, Windows, Linux, MacOS, Android, IOS, Web, why not OpenPdf be a libray which not which not just focus on Desktop OS but Android in mind too, like iTextPDF is doing so!

The main problem with iText PDF 5 is that is not supported on Java JPMS system, and itext 7.x can't be freely used other languages e.g. Arabic, Urdu, Hindi etc!

melloware commented 1 month ago

I have it working on GraalVM for Quarkus. You can look at my code to see the GraalVM changes necessary: https://github.com/quarkiverse/quarkus-itext

ctoabidmaqbool1 commented 3 weeks ago

@melloware Thanks for giving me help, Note please iText or OpenPdf works with GraalVM native-image in desktop without any issue. But I am trying to use OpenPdf in graalvm native-image for Android (APK).

To make Android Apps, Currently I can use gluonfx-maven-plugin or gluonfx-gradle-plugin with also liverge Graalvm technology.

So how can I test your provided project in Android?

Also I am more instrusted in using OpenPdf in GraalVM native-image for Android without any frameworks e.g. Quarks!

melloware commented 3 weeks ago

Yep you would have to translate what I did for Quarkus to GluonFX as I don't know anything about Gluon. But the secret to GraalVM is right here in this class: https://github.com/quarkiverse/quarkus-itext/blob/main/quarkus-openpdf/deployment/src/main/java/io/quarkiverse/itext/openpdf/deployment/OpenpdfProcessor.java