1
0
mirror of https://github.com/pdf2htmlEX/pdf2htmlEX.git synced 2024-12-22 04:50:09 +00:00
This commit is contained in:
Lu Wang 2013-11-12 16:02:11 +08:00
parent 932e21cc0f
commit 292b2d4eed
2 changed files with 44 additions and 44 deletions

1
TODO
View File

@ -1,3 +1,4 @@
built in support for ttfautohint
beforeprint/afterprint beforeprint/afterprint
more information on demo page: more information on demo page:

View File

@ -194,7 +194,7 @@ Page.prototype = {
} }
// scale the content box // scale the content box
{ if (this.loaded) {
var cbs = this.content_box.style; var cbs = this.content_box.style;
cbs.msTransform = cbs.webkitTransform = cbs.transform = 'scale('+this.cur_scale.toFixed(3)+')'; cbs.msTransform = cbs.webkitTransform = cbs.transform = 'scale('+this.cur_scale.toFixed(3)+')';
} }
@ -597,13 +597,12 @@ Viewer.prototype = {
*/ */
rescale : function (ratio, is_relative, offsetX, offsetY) { rescale : function (ratio, is_relative, offsetX, offsetY) {
var old_scale = this.scale; var old_scale = this.scale;
var new_scale = 1.0; var new_scale = old_scale;
// set new scale // set new scale
if (ratio == 0) { if (ratio == 0) {
new_scale = 1; new_scale = 1;
is_relative = false; is_relative = false;
} } else if (is_relative)
else if (is_relative)
new_scale *= ratio; new_scale *= ratio;
else else
new_scale = ratio; new_scale = ratio;
@ -619,7 +618,7 @@ Viewer.prototype = {
var active_page = this.pages[this.cur_page_idx]; var active_page = this.pages[this.cur_page_idx];
if (!active_page) return; if (!active_page) return;
var active_page_ele = active_page.p; var active_page_ele = active_page.page;
var prev_offset = [ active_page_ele.offsetLeft, active_page_ele.offsetTop ]; var prev_offset = [ active_page_ele.offsetLeft, active_page_ele.offsetTop ];
// Rescale pages // Rescale pages