Building pdfs from html files


#1

I have some html files in my /public directory, that I want to build pdf files from. So far so good I am looking for a way to pass those html files some data and generate the pdfs, is it possible to do that without using templates ? Something like Blaze.toHTML but with the option to pass the html file ?


#2

There are two packages that might be helpful (beware, I haven’t done this myself yet):

Let me know how that works out for you.


#3

Yeah there are plenty of options for the generating part.

My problem is that I want to bypass the template, I want to use an html file (directly from public folder) and pass it some data. Maybe I don’t understand how the blaze work but I was able to generate some html using a template and passing data to it using

Blaze.toHTML(Blaze.With(this.data, function() { return Template.name;}));

I want to skip the Template.name and return something like return ‘/public/page.html’