diff --git a/src/display/api.js b/src/display/api.js index 944d3fe69..5d7f8093b 100644 --- a/src/display/api.js +++ b/src/display/api.js @@ -295,6 +295,8 @@ PDFJS.getDocument = function getDocument(src, } else if (typeof pdfBytes === 'object' && pdfBytes !== null && !isNaN(pdfBytes.length)) { params[key] = new Uint8Array(pdfBytes); + } else if (isArrayBuffer(pdfBytes)) { + params[key] = new Uint8Array(pdfBytes); } else { error('Invalid PDF binary data: either typed array, string or ' + 'array-like object is expected in the data property.');