Thursday 15 January 2015

android - Stuck on creating pdf file with iText -



android - Stuck on creating pdf file with iText -

i trying create pdf files using itext.

i included itextpdf-5.5.3.jar project , next steps in tutorial:

http://blog.mettletech.co/wp/blog/generate-pdf-file-in-android/

but when code getting next errors:

10-30 16:52:57.163: e/dalvikvm(28969): not find class 'com.itextpdf.awt.pdfprintergraphics2d', referenced method com.itextpdf.text.pdf.pdfcontentbyte.createprintergraphicsshapes 10-30 16:52:57.213: e/dalvikvm(28969): not find class 'java.awt.image.pixelgrabber', referenced method com.itextpdf.text.image.getinstance 10-30 16:52:57.223: e/dalvikvm(28969): not find class 'java.awt.image.bufferedimage', referenced method com.itextpdf.text.image.getinstance

i dont errors on simplier pdf getting thesee errors while creating more complex pdfs including tables etc.

can give me lead on this?

the problem experiencing isn't caused itext, specific design selection made people created android. if @ official page itext android (better known itextg), larn classes forbidden on android. that's why it's of import utilize itextg jar , not ordinary itext jar:

references of classes not on google app engine whitelist have been removed.

as know android lessons, classes in awt packages (and in nio packages, etc...) can not used on android. hence can not utilize classes such pdfgraphics2d because class implementation of abstract java.awt.graphics2d class not on google's white list android , gae.

so either making error of introducing awt-related functionality, or not using android port of itext.

android pdf pdf-generation itext

No comments:

Post a Comment