mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-19 22:58:07 +02:00
don't let getPage() errors break the test slave
This commit is contained in:
parent
6c31e56448
commit
f151a8d630
2 changed files with 2 additions and 3 deletions
2
test.py
2
test.py
|
@ -87,7 +87,7 @@ class PDFTestHandler(BaseHTTPRequestHandler):
|
|||
State.remaining -= 1
|
||||
|
||||
State.done = (0 == State.remaining)
|
||||
|
||||
|
||||
|
||||
def set_up(manifestFile):
|
||||
# Only serve files from a pdf.js clone
|
||||
|
|
|
@ -83,14 +83,13 @@ function nextPage() {
|
|||
failure = '';
|
||||
log(" drawing page "+ currentTask.pageNum +"...");
|
||||
|
||||
currentPage = pdfDoc.getPage(currentTask.pageNum);
|
||||
|
||||
var ctx = canvas.getContext("2d");
|
||||
clear(ctx);
|
||||
|
||||
var fonts = [];
|
||||
var gfx = new CanvasGraphics(ctx);
|
||||
try {
|
||||
currentPage = pdfDoc.getPage(currentTask.pageNum);
|
||||
currentPage.compile(gfx, fonts);
|
||||
} catch(e) {
|
||||
failure = 'compile: '+ e.toString();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue