- // ----------------- JPEG
- // resize the window...
- // window.document.documentElement.scrollHeight
- 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) {
- _this.scrolled_window.el.set_size_request(1200, int.min(scroll_height, 6000));
- print("Resize to %d\n", scroll_height);
- }
+ GLib.Timeout.add_seconds(webkitpdf.opt_delay, () => {
+
+
+ // ----------------- JPEG
+ // resize the window...
+ // window.document.documentElement.scrollHeight
+ 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) {
+ _this.scrolled_window.el.set_size_request(1200, int.min(scroll_height, 6000));
+ print("Resize to %d\n", scroll_height);
+ GLib.Timeout.add_seconds(webkitpdf.opt_delay, () => {
+ this.printjpg();
+ return false;
+ });
+ }
+ this.printjpg();
+ return false;
+ });
//var filename = "/tmp/test.pdf";
//print("load_changed %d ?= %d\n", le, LoadEvent.FINISHED);