2

What is the best way for generating PDF in MeteorJS project. Is there some example of using classcraft:meteor-wkhtmltopdf smart package for generating PDF ?

Is it possible to generate PDF from template (PDF built out of template) in MeteorJS project ?

1
  • I would actually suggest hosting a PDF generation service in your cluster, running something like godoc.org/github.com/jung-kurt/gofpdf. Then hook it up to meteor as an API. Node is not the best option when you have CPU bound tasks to run. Commented Dec 4, 2015 at 11:55

2 Answers 2

3

Check this package: https://atmospherejs.com/ongoworks/pdf

According to the README file:

A Meteor package that allows you to save a Meteor template as a PDF on the client. This package is simply a nice wrapper around jsPDF.

Sign up to request clarification or add additional context in comments.

2 Comments

I've tried that smart package, but it only renders labels withaout any styling, do not suport letters like čćžšđ. I would be nice to have solution like wkhtmltopdf to render complete page to pdf. Or some example of using PhantomJs with meteorJS.
You can still use wkhtmltopdf with meteor. Simple launch the command and wait for the output. npmjs.com/package/exec
2

You could use a wonderful npm package for this: https://github.com/sgentle/phantomjs-node. Using this package you will be able to generate pdf using any HTML template. This information might be useful for you as well: http://blog.feedhenry.com/server-side-pdf-generation-node-js/

To require npm package from Meter follow this link: https://github.com/meteorhacks/npm#using-packages.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.