Skip to content

Commit

Permalink
Fix library to work with updated pdf.js - mozilla/pdf.js#10377
Browse files Browse the repository at this point in the history
  • Loading branch information
RobKraft committed Jul 3, 2020
1 parent 937d81c commit fabd35e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion static/pdfThumbnails.js
Expand Up @@ -20,7 +20,7 @@ var createPDFThumbnails = function(){
var imgWidth = element.getAttribute('data-pdf-thumbnail-width');
var imgHeight = element.getAttribute('data-pdf-thumbnail-height');

pdfjsLib.getDocument(filePath).then(function (pdf) {
pdfjsLib.getDocument(filePath).promise.then(function (pdf) {
pdf.getPage(1).then(function (page) {
var canvas = document.createElement("canvas");
var viewport = page.getViewport(1.0);
Expand Down

0 comments on commit fabd35e

Please sign in to comment.