Don't display cmds used on the page by default + turn on worker support for now again
This commit is contained in:
parent
2fcc93c751
commit
aa8699a334
@ -152,8 +152,13 @@ var PDFView = {
|
|||||||
while (container.hasChildNodes())
|
while (container.hasChildNodes())
|
||||||
container.removeChild(container.lastChild);
|
container.removeChild(container.lastChild);
|
||||||
|
|
||||||
// var pdf = new WorkerPDFDoc(data);
|
var pdf;
|
||||||
var pdf = new PDFDoc(new Stream(data));
|
if (true /* Use Worker */) {
|
||||||
|
pdf = new WorkerPDFDoc(data);
|
||||||
|
} else {
|
||||||
|
pdf = new PDFDoc(new Stream(data));
|
||||||
|
}
|
||||||
|
|
||||||
var pagesCount = pdf.numPages;
|
var pagesCount = pdf.numPages;
|
||||||
document.getElementById('numPages').innerHTML = pagesCount;
|
document.getElementById('numPages').innerHTML = pagesCount;
|
||||||
|
|
||||||
|
@ -51,18 +51,19 @@ var handler = new MessageHandler("worker", {
|
|||||||
// TODO: Handle images here.
|
// TODO: Handle images here.
|
||||||
|
|
||||||
console.log("about to send page", pageNum);
|
console.log("about to send page", pageNum);
|
||||||
|
|
||||||
// Make a copy of the fnArray and show all cmds it has.
|
if (false /* show used commands */) {
|
||||||
var fnArray = preCompilation.fnArray.slice(0).sort();
|
// Make a copy of the fnArray and show all cmds it has.
|
||||||
for (var i = 0; i < fnArray.length; true) {
|
var fnArray = preCompilation.fnArray.slice(0).sort();
|
||||||
if (fnArray[i] == fnArray[i + 1]) {
|
for (var i = 0; i < fnArray.length; true) {
|
||||||
fnArray.splice(i, 1);
|
if (fnArray[i] == fnArray[i + 1]) {
|
||||||
} else {
|
fnArray.splice(i, 1);
|
||||||
i++;
|
} else {
|
||||||
|
i++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
console.log("cmds", fnArray);
|
||||||
console.log("cmds", fnArray);
|
}
|
||||||
|
|
||||||
|
|
||||||
handler.send("page", {
|
handler.send("page", {
|
||||||
pageNum: pageNum,
|
pageNum: pageNum,
|
||||||
|
Loading…
Reference in New Issue
Block a user