![Ember Observer Score](http://emberobserver.com/badges/ember-js-pdf.svg)
ember-js-pdf
Generate, render, and save PDF files in the browser with jsPDF. See examples of jsPDF.
Installation
ember install ember-js-pdf
Usage
Render a PDF from an Array of steps:
{{js-pdf steps filename="tomster-facts"}}
Where:
export Default Controller.extend({
steps: [
{setFontSize: 40},
{text: [35, 25, 'Tomsters loves jsPDF']}
]
});
Steps are arrays of PDF rendering commands with an array of arguments. All PDF rendering commands are listed here, with additional documentation of their arguments here.
Saving PDFs:
{{#js-pdf steps as |pdf|}}
<button {{action pdf.save}}>Download PDF</button>
{{/js-pdf}}
Contributing
git clone <repository-url>
this repositorycd ember-js-pdf
npm install
Running
Running Tests
npm test
(Runs ember try:each
to test your addon against multiple Ember versions)ember test
ember test --server
Building
For more information on using ember-cli, visit https://ember-cli.com/.