Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
@doctolib/pdf-to-png
Advanced tools
Configure the worker by adding this to your Webpack configuration:
// webpack.config.js
{
module: {
rules: [
{
test: /pdf\.worker\.js$/,
use: { loader: 'worker-loader', options: { inline: true } }
}
]
}
}
The inline
option is not strictly necessary per se but highly advised to play well with Cross-Origin Policy.
import pdfToPng from "pdf-to-png";
// [...]
const pngBlob = await pdfToPng(pdfBlob);
Take a Blob as its unique mandatory argument and returns another Blob.
Most of the time, the entry will be a very specific type of Blob, the File.
See here for a simple and self-contained implementation example (in a React context).
Implicit dependency to Webpack at the moment, due to the way workers are handled.
yarn prepublish
git add lib/ && git commit -m "<version>"
git push origin master
git tag <version>
git push origin <version>
Process inspired by this comment.
FAQs
Browser-side PDF to PNG conversion
The npm package @doctolib/pdf-to-png receives a total of 4 weekly downloads. As such, @doctolib/pdf-to-png popularity was classified as not popular.
We found that @doctolib/pdf-to-png demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 open source maintainers 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 researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.