PDFBox on Android

2019-02-23 12:26发布

问题:

I'm trying to read PDF and show the content on Android using PDFbox. I can only read PDF and show it in Android webview. Can anybody tell me how to show the PDF in another way? Or maybe PDFBox is not compatible with Android?

回答1:

PDFBox (lastest release, 1.5) is not compatible with Android.

-- update --

Correct, like @Gili said, because of AWT dependencies. Android has no AWT nor Swing related classes in its Runtime.



回答2:

I recently did a port of PDFBox to Android. This is only for text extraction from PDF documents. You can find it here - https://github.com/RatheeshRavindran/PDFBoxLight Please note it is still a 'Beta' release.



回答3:

PDFs cannot be created using PDFbox in Android