Use task.pageLimit properly.

This commit is contained in:
Kalervo Kujala 2011-10-18 20:32:33 +03:00
parent 31cb9b49d5
commit ecf831b44b

View File

@ -87,7 +87,11 @@ function nextTask() {
}
function isLastPage(task) {
return task.pageNum > (task.pageLimit || task.pdfDoc.numPages);
var limit = task.pageLimit || 0;
if (!limit || limit > task.pdfDoc.numPages)
limit = task.pdfDoc.numPages;
return task.pageNum > limit;
}
function canvasToDataURL() {