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.
duyansoft-pdfjs-dist
Advanced tools
This is a mirror of pdfjs-dist, bundled and exposed as an ES module
npm install duyansoft-pdfjs-dist
import pdfjs from "duyansoft-pdfjs-dist/build/pdf";
import viewer from "duyansoft-pdfjs-dist/web/pdf_viewer";
pdfjs.GlobalWorkerOptions.workerSrc =
"duyansoft-pdfjs-dist/pdf.worker.js";
var url = "basicapi.pdf";
var loadingTask = pdfjs.getDocument(url);
//...
Important: Unlike in the original build, the pdfjs.GlobalWorkerOptions.workerSrc
is mandatory. We recommend supplying the worker via CDN.
├── build/
│ ├── pdf.js - display layer
│ └── pdf.worker.js - core layer
└── web/
├── pdf_viewer.js - top-level viewer import, containing all necessary setup
├── module.js - pdf-viewer module, transformed from UMD to ESM
└── util.js - utility module for setup
PDFJS is a library by Mozilla, created to facillitate client-side rendering of PDF documents.
Currently, the primary build for this project is provided as UMD-style modules at pdfjs/pdfjs-dist.
Support for es modules in the main project has been requested here (#10317)
# https://github.com/FredKSchott/rollup-plugin-polyfill-node/issues/61
npm i --legacy-peer-deps
npm run build
FAQs
mirror of pdfjs-dist, bundled and exposed as ES module
The npm package duyansoft-pdfjs-dist receives a total of 20 weekly downloads. As such, duyansoft-pdfjs-dist popularity was classified as not popular.
We found that duyansoft-pdfjs-dist 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.