Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
An easy way to generate pdf files from ejs templates or html files
##Install
npm i --save pdf-maker
##Usage
##For generating pdf from ejs templates
var pdfMaker = require('pdf-maker');
var template = 'path/to/ejsTemplate.ejs';
var data = {
name: 'node.js'
};
var pdfPath = '/path/of/pdf/file.pdf';
var option = {
{
paperSize: {
format: 'A4',
orientation: 'portrait',
border: '1.8cm'
}
};
};
pdfMaker(template, data, pdfPath, option);
Here, 'option' parameter is optional. 'data' is the data which will be used in the ejs template. 'pdfPath' is the path with where the pdf file will be saved.
##For generating pdf from html files.
var pdfMaker = require('pdf-maker');
var template = 'path/to/htmlFile.html';
var pdfPath = '/path/of/pdf/file.pdf';
var option = {
{
paperSize: {
format: 'A4',
orientation: 'portrait',
border: '1.8cm'
}
};
};
pdfMaker(template, pdfPath, option);
##Roadmap
Adding test cases. Removing external dependencies.
FAQs
easy pdf generation using phantom.js
The npm package pdf-maker receives a total of 98 weekly downloads. As such, pdf-maker popularity was classified as not popular.
We found that pdf-maker 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.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.