From 76f12912849cc58118450aab76c45bff259f4c51 Mon Sep 17 00:00:00 2001 From: Chris Jones Date: Mon, 27 Jun 2011 20:18:40 -0700 Subject: [PATCH] convert twips->CSS pixels --- test/test_slave.html | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/test_slave.html b/test/test_slave.html index b87af8364..c64c6a390 100644 --- a/test/test_slave.html +++ b/test/test_slave.html @@ -103,8 +103,10 @@ function nextPage() { try { // using mediaBox for the canvas size - canvas.width = currentPage.mediaBox[2]; - canvas.height = currentPage.mediaBox[3]; + var wTwips = (currentPage.mediaBox[2] - currentPage.mediaBox[0]); + var hTwips = (currentPage.mediaBox[3] - currentPage.mediaBox[1]); + canvas.width = wTwips * 96.0 / 72.0; + canvas.height = hTwips * 96.0 / 72.0; clear(ctx); } catch(e) { failure = 'page setup: '+ e.toString();