To start with, kudos to the Ionic team and the framework you have put together. I was working on a project last spring that started off as a native iOS app. But to reach a larger audience, I looked into hybrid options and stumbled across Ionic. And am I ever glad I did! Your framework is nothing short of amazing. There are times that I get frustrated with the learning curve as I try to work w/ the HTML5/CSS to get my app looking the way I want. But the fundamental base upon which things are built is great.
So, as I get more comfortable I am trying to answer more question an participate in the forum. This post is a demo of the work I did to incorporate generating pdf’s into my app. I had a design requirement to provide output of user data in PDF reports that could be previewed and then emailed as attachments. I found the javascript pdfMake.org library that is a wrapper for pdfKit.js and provides declarative pdf docs as JSON objects. I wrote a builderSvc to generate the JSON objects and a reportSvc to generate and save the pdf. I pulled out this part of my app and published it to a github repo:
that also has an online demo shared as a github.io project page:
I hope it will help anyone looking to incorporate a feature like this. And, I would appreciate a look and any comments from folks that are interested and could help me to clean things up even more. My todo list includes switching all plugin calls to ngCordova and publishing as a module/package that can be easily added to ionic projects. This would free developers up to focus on defining their pdf document declarations w/out spending time on the generation/saving.