Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ember-js-pdf

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ember-js-pdf

Client-side JavaScript PDF generation for Embereños.

  • 0.3.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
38
increased by15.15%
Maintainers
1
Weekly downloads
 
Created
Source

Build Status Ember Observer Score

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}}

Rendering from a URL:

{{js-pdf src="https://bitcoin.org/bitcoin.pdf"}}

Misc Options

PropertyTypeDefaultAvailable
orientationStringpportrait, landscape, p, l
unitStringmmpt, mm, cm, in
formatStringa4a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, b0, b1, b2, b3, b4, b5, b6, b7, b8, b9, b10, c0, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, dl, letter, government-letter, legal, junior-legal, ledger, tabloid, credit-card
compressPdfBooleanfalsetrue, false

Contributing

  • git clone <repository-url> this repository
  • cd 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

  • ember build

For more information on using ember-cli, visit https://ember-cli.com/.

Keywords

FAQs

Package last updated on 26 Jul 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc