convert twips->CSS pixels
This commit is contained in:
parent
3683fc67fb
commit
376224bc99
Binary file not shown.
@ -103,8 +103,10 @@ function nextPage() {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
// using mediaBox for the canvas size
|
// using mediaBox for the canvas size
|
||||||
canvas.width = currentPage.mediaBox[2];
|
var wTwips = (currentPage.mediaBox[2] - currentPage.mediaBox[0]);
|
||||||
canvas.height = currentPage.mediaBox[3];
|
var hTwips = (currentPage.mediaBox[3] - currentPage.mediaBox[1]);
|
||||||
|
canvas.width = wTwips * 96.0 / 72.0;
|
||||||
|
canvas.height = hTwips * 96.0 / 72.0;
|
||||||
clear(ctx);
|
clear(ctx);
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
failure = 'page setup: '+ e.toString();
|
failure = 'page setup: '+ e.toString();
|
||||||
|
Loading…
Reference in New Issue
Block a user