var scroll_height = (int) _this.view.el.get_dom_document().document_element.scroll_height;
print("Scroll height %d\n", scroll_height);
if (scroll_height> 1024 || webkitpdf.opt_width > 0 || webkitpdf.opt_height > 0 ) {
-
- _this.scrolled_window.el.set_size_request(
- webkitpdf.opt_width > 0 ? webkitpdf.opt_width : 1200,
- webkitpdf.opt_height > 0 ? webkitpdf.opt_height : int.min(scroll_height, 6000)
- );
- print("Resize to %d\n", scroll_height);
+ var w = webkitpdf.opt_width > 0 ? webkitpdf.opt_width : 1200;
+ var h = webkitpdf.opt_height > 0 ? webkitpdf.opt_height : int.min(scroll_height, 6000);
+ _this.scrolled_window.el.set_size_request( w, h);
+ print("Resize to %d, %d\n", w,h);
GLib.Timeout.add_seconds(webkitpdf.opt_delay, () => {
this.printpng();
return false;