Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
ember-js-pdf
Advanced tools
Generate, render, and save PDF files in the browser with jsPDF. See examples of jsPDF.
ember install ember-js-pdf
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"}}
Toggling PDF visibility:
{{#js-pdf showPdf=false as |pdf|}}
<h1>{{pdf.filename}} is visible</h1>
{{!-- PDF Not visible --}}
{{/js-pdf}}
Property | Type | Default | Available |
---|---|---|---|
orientation | String | p | portrait, landscape, p, l |
unit | String | mm | pt, mm, cm, in |
format | String | a4 | a0, 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 |
compressPdf | Boolean | false | true, false |
git clone <repository-url>
this repositorycd ember-js-pdf
yarn
ember serve
npm test
(Runs ember try:each
to test your addon against multiple Ember versions)ember test
ember test --server
ember build
For more information on using ember-cli, visit https://ember-cli.com/.
FAQs
Client-side JavaScript PDF generation for Embereños.
We found that ember-js-pdf demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.