Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
@pdftron/pdfjs-express-viewer
Advanced tools
[PDFJS Express](https://pdfjs.express) is a powerful JavaScript-based PDF Library that wraps [PDF.js](https://mozilla.github.io/pdf.js/). It provides a slick out-of-the-box responsive UI that interacts with the core library to view, annotate and manipulat
PDFJS Express is a powerful JavaScript-based PDF Library that wraps PDF.js. It provides a slick out-of-the-box responsive UI that interacts with the core library to view, annotate and manipulate PDFs that can be embedded into any web project.
This version of the product is a PDF Viewer (no annotations) and is available to use for free. Get your free license on your PDF.js Express Dashboard.
1) Install PDFJS Express
npm i @pdftron/pdfjs-express-viewer --save
This will also download all the assets that need to be included for PDFJS Express to work.
2) Copy assets and resources to your public/static folder
These assets need to be served with your application. For example, if your project is built into a dist
folder, you could copy these assets into dist/public
.
The folder you need to copy is node_modules/@pdftron/pdfjs-express-viewer/public
.
cp -R ./node_modules/@pdftron/pdfjs-express-viewer/public ./dist
We recommend using a module bundler like Webpack to automatically do this for you. There is a nice plugin called copy-webpack-plugin that does just this.
3) Import and instantiate WebViewer
import WebViewer from '@pdftron/pdfjs-express-viewer'
const element = document.getElementById('viewer');
WebViewer({
path: '/public', // point to where the files you copied are served from
initialDoc: 'https://pdftron.s3.amazonaws.com/downloads/pl/PDFTRON_about.pdf' // path to your document
}, element).then((instance) => {
// Call APIs here
})
Full documentation for PDFJS Express can be found here.
FAQs
[PDFJS Express](https://pdfjs.express) is a powerful JavaScript-based PDF Library that wraps [PDF.js](https://mozilla.github.io/pdf.js/). It provides a slick out-of-the-box responsive UI that interacts with the core library to view, annotate and manipulat
The npm package @pdftron/pdfjs-express-viewer receives a total of 6,818 weekly downloads. As such, @pdftron/pdfjs-express-viewer popularity was classified as popular.
We found that @pdftron/pdfjs-express-viewer demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.