qq1057119720 / android-awt

Combination of code from Apache Harmony and Apache Commons Imaging to replace classes in java.awt for Android.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

android-awt

This is a fork of windwardadmin/android-awt

This project provides java.awt and javax.imagio since we can't use these classes on Android. Code is took from Apache Harmony, Apache Commons Imaging and witwall/appengine-awt.

Disclaimer: This library is HACKISH and experimental. You should NOT use this in production. Only critical issues will be fixed.

It started as a proof-of-concept to make OpenPDF work on Android. I never used it in production.

To generate PDF files locally on an Android Device, there are a lot of commercial and open source options:

  • Apache PdfBox (open source), although it's a bit difficult to use
  • iText 7 (commercial), it's expensive because it offers pay-per-device licensing model, the more users, the more pricier
  • PSPDFKit, Foxit and other commercial libraries with Android in mind. They are expensive as iText and not so fully featured (some of them just converts html to pdf)
  • UniDoc UniPDF Go library (commercial) + gomobile. I use this in production, it's the cheapest, it is full featured like iText, it offers single license per unlimited devices and technical support is great.
  • (free solution) You can also generate html then convert it to pdf via webview. See this.

Import

repositories {
    maven { url "https://maven.andob.info/repository/open_source" }
}
dependencies {
	implementation 'ro.andob.androidawt:androidawt:1.0.4'
}

Proguard

-dontwarn org.bouncycastle.**
-dontwarn java.lang.invoke.**

Licensed under Apache License

About

Combination of code from Apache Harmony and Apache Commons Imaging to replace classes in java.awt for Android.

License:Apache License 2.0


Languages

Language:Java 84.0%Language:C 15.9%Language:Kotlin 0.1%Language:CMake 0.0%Language:Shell 0.0%