Forum How do I...?

Offline client-side Javascript generation

matthieu
Hi,

I'm looking for a client-side web PDF generation library. It needs to be client-side because the use case is that PDFs will be generated and printed from mobile devices that must support offline mode (eg. there often isn't any available network). Note that this is an existing HTML5 application running on Android and that file generation and printing wasn't originally considered.

Is there a way we could use PrinceXML from the client-side javascript while offline? I've read that version 8.0 adds Javascript support. However, my understanding is that Javascript is used to extend generation capabilities and that the engine isn't actually written in Javascript, thus cannot be run from offline client-side javascript. Am I correct?

I found a library that generates PDFs from Javascript (jsPDF), but as the feature set is minimal I'd rather use a more complete product.

Also, I've had a read through the following threads but would like to be 100% sure:
http://princexml.com/bb/viewtopic.php?f=4&t=3732&hilit=client+javascript
http://princexml.com/bb/viewtopic.php?f=3&t=3692

Thanks,
Matthieu
mikeday
Is there a way we could use PrinceXML from the client-side javascript while offline? I've read that version 8.0 adds Javascript support. However, my understanding is that Javascript is used to extend generation capabilities and that the engine isn't actually written in Javascript, thus cannot be run from offline client-side javascript. Am I correct?

Yes this is correct, Prince runs JavaScript, but can't be run in JavaScript. At the moment there probably isn't a practical way to smuggle Prince onto an Android phone and run it there.
matthieu
Thanks for the clarification :)

Matthieu
manju
Is Princexml available Xamarin platform ?
mikeday
No, Prince does not run on Xamarin.