1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-20 15:18:08 +02:00

Use data directly in PDFDoc.

And create the Stream inside the PDFDoc constructor for a cleaner interface.
Also encapsulate unnecessary details from the user.
This commit is contained in:
Kalervo Kujala 2011-09-26 20:58:18 +03:00
parent 7c7fb4bcee
commit 2094c29169
4 changed files with 5 additions and 4 deletions

View file

@ -159,7 +159,7 @@ var PDFView = {
while (container.hasChildNodes())
container.removeChild(container.lastChild);
var pdf = new PDFDoc(new Stream(data));
var pdf = new PDFDoc(data);
var pagesCount = pdf.numPages;
document.getElementById('numPages').innerHTML = pagesCount;