Printing in Cloud with PDF Generator

by Giuseppe Lanzi on 06/14/2018

Since the beginning of the mobile revolution, one of the things that’s been talked about the most is printing directly from the app. In 2013, we provided you with the reporting engine for mobile apps developed with Instant Developer Foundation. Now it’s time to provide a solution for Instant Developer Cloud as well.

As you know, Cloud is oriented for an entirely HTML and CSS front end and requires direct use of these languages to design your application. This differs from Foundation, which reduces this complexity thanks to its own library objects model. The difference is similar for the PDF generator: you start directly from HTML.

Your launchers now have available the new PDF Generator plugin, which makes it possible to create a PDF working from an HTML code passed as a parameter.

The two methods provided are very simple: fromURL() and fromData(). They’re clear and simple to use: they both create a PDF file working from HTML code (passed as a parameter or retrieved via URL), and return the result to the caller. It’s also possible to send the result directly to a printer known to the operating system, or to manage the PDF manually and send it to a print app specific for the printer being used.

To activate the plugin on your launchers, simply use a 2.04.01+ release and activate the PDF Generator plugin from the Plugins page of your launcher. No additional settings are needed.

For more information about the plugin, have a look at the repository on github. To try it out, check out the Plugin Design Patterns  example, and as I always say, “we’re always available for clarifications and support”.

Happy PDF to everyone!

P.S.
Some of you know that this isn’t the only way to get PDFs with Instant Developer Cloud. There’s also a way that entails using Google Documents. If you’re curious, stay tuned!

Leave a Comment

Previous post:

Next post: