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:
parent
7c7fb4bcee
commit
2094c29169
4 changed files with 5 additions and 4 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue