
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
ejs-html-to-pdf-lite
Advanced tools
Convert HTML or EJS to PDF using Playwright-core with full CSS and design support.
A fast, lightweight, and production-ready alternative to html-pdf
and puppeteer
for converting HTML or EJS templates into high-quality PDFs using playwright-core
, with full design and CSS support.
playwright-core
+ ejs
.ejs
and .html
– dynamic or static usage<style>
and internal CSS fully supportednpm install ejs-html-to-pdf-lite
npx playwright install chromium
const { generatePdf } = require('ejs-html-to-pdf-lite');
// Basic usage with default A4 size
await generatePdf({
inputPath: './templates/example.ejs',
outputPath: './output.pdf',
data: {
name: 'John Doe',
items: [
{ name: 'Product 1', quantity: 2, price: 10.99 },
{ name: 'Product 2', quantity: 1, price: 24.99 }
]
},
type: 'ejs' // or 'html'
});
// With custom paper size
await generatePdf({
inputPath: './templates/example.ejs',
outputPath: './output-letter.pdf',
data: {
name: 'John Doe',
items: [
{ name: 'Product 1', quantity: 2, price: 10.99 },
{ name: 'Product 2', quantity: 1, price: 24.99 }
]
},
type: 'ejs',
paperSize: 'Letter' // Use standard paper size
});
// With custom dimensions
await generatePdf({
inputPath: './templates/example.ejs',
outputPath: './output-custom.pdf',
data: {
name: 'John Doe',
items: [
{ name: 'Product 1', quantity: 2, price: 10.99 },
{ name: 'Product 2', quantity: 1, price: 24.99 }
]
},
type: 'ejs',
paperSize: { width: '8.5in', height: '11in' } // Custom dimensions
});
A0
, A1
, A2
, A3
, A4
(default), A5
, A6
, Letter
, Legal
, Tabloid
, Ledger
width
and height
properties (e.g., { width: '8.5in', height: '11in' }
)npx playwright install chromium
)FAQs
Convert HTML or EJS to PDF using Playwright-core with full CSS and design support.
The npm package ejs-html-to-pdf-lite receives a total of 6 weekly downloads. As such, ejs-html-to-pdf-lite popularity was classified as not popular.
We found that ejs-html-to-pdf-lite demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.