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.
meteor-pdfjs
Advanced tools
PDF rendering for your Meteor application (client only). This package use the Mozilla's PDF reader built with HTML5 and JavaScript
If you need server side PDF rendering, please use pdf.js Meteor package from Mitar: https://github.com/peerlibrary/meteor-pdf.js
<!-- In your template -->
<canvas id="pdfcanvas"></canvas>
/* In your Template.xxx.rendered */
import PDFJS from 'meteor/geekho:pdfjs';
// Set worker URL to package assets
PDFJS.GlobalWorkerOptions.workerSrc = '/packages/geekho_pdfjs/build/pdf.worker.js';
// Create PDF
PDFJS.getDocument(url).promise.then(function getPdfHelloWorld(pdf) {
// Fetch the first page
pdf.getPage(1).then(function getPageHelloWorld(page) {
var scale = 1;
var viewport = page.getViewport({ scale });
// Prepare canvas using PDF page dimensions
var canvas = document.getElementById('pdfcanvas');
var context = canvas.getContext('2d');
canvas.height = viewport.height;
canvas.width = viewport.width;
// Render PDF page into canvas context
page.render({canvasContext: context, viewport: viewport}).promise.then(function () {
...
});
});
});
You can find information about pdf.js lib:
MIT
FAQs
npm version of meteor-pdfjs
We found that meteor-pdfjs 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
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.