
Research
/Security News
Malicious npm Packages Target WhatsApp Developers with Remote Kill Switch
Two npm packages masquerading as WhatsApp developer libraries include a kill switch that deletes all files if the phone number isn’t whitelisted.
generate-pdf-from-react-html
Advanced tools
generate-pdf-from-react-html is a React JS library for converting html to printable pdf with high quality and saving it locally.
📄 generate-pdf-from-react-html is a React JS library for converting html to printable pdf with high quality and saving it locally.
With generate-pdf-from-react-html you can include:
✔️ Images with high quality like logos, barcodes, QR codes, etc.
✔️ Applying external, internal and inline CSS
✔️ Resize PDF on generate
milen-minchev.github.io/generate-pdf-from-react-html-demo
Use the package manager npm to install generate-pdf-from-react-html.
npm i generate-pdf-from-react-html
import { pdfFromReact } from "generate-pdf-from-react-html";
pdfFromReact(element, name, resize, debug);
ℹ️ For best result and preview set width: 600px;
and min-height: 840px
of desired element or set resize
to true
❗ In order CSS to work correctly, targeted element must be selected at top level in your style file, for example:
#CSS
.element-for-print {
width: value;
height: value;
etc...
}
#SCSS
.element-for-print {
width: value;
height: value;
etc...
}
#CSS
.parent-element .element-for-print {
width: value;
height: value;
etc...
}
#SCSS
.parent-element{
.element-for-print {
width: value;
height: value;
etc...
}
}
element: (string)
- Target HTML element based on document.querySelector(CSS selectors)
name: (string)
- Choose name for the filefalse
resize: (boolean)
- If set to true
sets fixed size of A4 (width and min-height) on generate. ❗ Targeted element must be responsive for best result ❗debug: (boolean)
- If set to true
it's open generated PDF in new window for preview without automatically downloading it.FAQs
generate-pdf-from-react-html is a React JS library for converting html to printable pdf with high quality and saving it locally.
The npm package generate-pdf-from-react-html receives a total of 90 weekly downloads. As such, generate-pdf-from-react-html popularity was classified as not popular.
We found that generate-pdf-from-react-html 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
Two npm packages masquerading as WhatsApp developer libraries include a kill switch that deletes all files if the phone number isn’t whitelisted.
Research
/Security News
Socket uncovered 11 malicious Go packages using obfuscated loaders to fetch and execute second-stage payloads via C2 domains.
Security News
TC39 advances 11 JavaScript proposals, with two moving to Stage 4, bringing better math, binary APIs, and more features one step closer to the ECMAScript spec.