can i use the prawn lib to generate the PDF in rhodes 4.0.0

// Expert user has replied.
s shivratan gupta 3 years 6 months ago
1 2 0

HI,

can i use the prawn lib to generate the PDF in rhodes 4.0.0

thanks

Please Register or Login to post a reply

2 Replies

B Bhakta Ranjan Satapathy

Hello Shivratan,

Rhodes support pdf-writer extension for pdf related operations.
If you want to add any other ruby library, make sure that does not use any native code. And follow the steps available at Rhomobile | Ruby Native Extensions for adding pure ruby extensions.

Thanks
Bhakta

J Jon Tara

Actually, you CAN import Ruby libraries that use native code, as well.

Two things (unrelated to native code) to watch out for:

- Ruby threads (not fully supported on Android)
- dependencies (you can find yourself in a big hall of mirrors, with an endless task of porting library after library...)

I wouldn't advise trying to import a big Ruby library with a lot of dependences when there is a ready alternative! But, when needed, it can be done, I adapted XMPP4R some time ago.

If you do, considering sharing it on GitHub or other open-source code-sharing site.

CONTACT
Can’t find what you’re looking for?