[Pkg-javascript-commits] [pdf.js] 35/109: api/getDocument : handle ArrayBuffer check for PDF binary data (byteLength)
David Prévot
taffit at moszumanska.debian.org
Fri Sep 25 03:04:15 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository pdf.js.
commit 0cd4cc4e80c4c90b2ad1af6c55b65ca504d3d8d6
Author: Vincent Castelain <vincent.castelain at dbit.lu>
Date: Wed Aug 19 17:54:41 2015 +0200
api/getDocument : handle ArrayBuffer check for PDF binary data (byteLength)
---
src/display/api.js | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/display/api.js b/src/display/api.js
index 944d3fe..5d7f809 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.');
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/pdf.js.git
More information about the Pkg-javascript-commits
mailing list