is there any way to create create PDF Files from an android application? So far I've found nothing short of writing all the code from scratch.
Is there any API I can use, that works on android?
Thanks in advance.
Source: Tips4all
Cisco Certified Network Associate Exam,640-802 CCNA All Answers ~100/100. Daily update
is there any way to create create PDF Files from an android application? So far I've found nothing short of writing all the code from scratch.
Is there any API I can use, that works on android?
Thanks in advance.
I love when you guys respond with fancy paragraph that boils down to "No, that's COMPLETELY impossible... and you sir are an idiot for asking. Instead, you should change architecture of your application, just so my answer can be relevant".
ReplyDeleteEspecially in situations when there is a simple answer to what person is asking - if anyone wants to generate PDFs on Android device, here is how to do it:
http://sourceforge.net/projects/itext/ (library)
http://www.vogella.de/articles/JavaPDF/article.html (tutorial)
http://tutorials.jenkov.com/java-itext/image.html (images tutorial)
I would recommend you set up a Web service and have the device use the Web service to generate the PDF. PDF creation is going to be very slow on a device, even if you can find a Java library for it that works on Android. You also then have greater flexibility in terms of languages and libraries for the PDF creation (e.g., use Prawn for Ruby), since you're doing the PDF creation on a server.
ReplyDeleteI recently faced a similar issue and decided to port an older version of iText (http://sourceforge.net/projects/itext/) to be able to create pdf's. I successfully ported the core of the last LGPL version of iText with some code from bouncycastle and Apache Harmony to Android.
ReplyDeleteI released a first alpha of the project at http://code.google.com/p/droidtext/. It is available under LGPL like the projects it is based on.
I am already using it in on of my projects and it works very well so far.
Check it out. Any feedback is welcome
Late, but relevant to request and hopefully helpful. If using an external service (as suggested in the reply by CommonsWare) then Docmosis has a cloud service that might help - offloading processing to a cloud service that does the heavy processing. That approach is ideal in some circumstances but of course relies on being net-connected.
ReplyDelete