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