问题
I am trying to create PDF through my Android app using PDFBox
api, but getting the following error:
java.lang.NoClassDefFoundError: org.apache.pdfbox.pdmodel.PDDocument
I have already included the following jar files in the classpath
of the project:-
- pdfbox-1.8.4
- fontbox-1.8.4
In some posts I read that it is not possible to use pdfbox to create PDFs in Android since it uses awt and swing components which are not available in Android.
If PDFBox
is not right choice for creating PDFs through Android application then are there any other open source libraries available for performing the same task.Any help would be greatly appreciated.
Thanks in advance.
来源:https://stackoverflow.com/questions/23290698/creating-pdf-in-android-using-pdfbox