Page 1 of 1
How to print WebGadget in Linux?
Posted: Fri Dec 23, 2011 5:25 pm
by Kukulkan
Hi,
I'm looking for a way to let the WebGadget print it's content to the current default printer on Linux?
I found
webkit-web-frame-print-full() in WebGKitGtk developer documentation, but I don't know how to activate?
http://webkitgtk.org/reference/WebKitWe ... print-full
Any tips?
Kukulkan
Re: How to print WebGadget in Linux?
Posted: Sat Dec 24, 2011 10:47 am
by IdeasVacuum
...something I have done on Windows is to create a printable file by screen-capturing the page of interest.
Re: How to print WebGadget in Linux?
Posted: Sat Dec 24, 2011 11:30 am
by Kukulkan
Hello IdeasVacuum,
This, sadly, is not sufficient for me. The Browser-Window is resizable and I can not assume that everybody has the window big enough. At least as I'm displaying user-content that may have a length of several pages...
I currently solved it that way:
1) use body-text to replace "</html>" with "<script>window.print();</script></html>"
2) save the message body again (same filename)
3) force the webgadget to reload using SetGadgetText(webMessageID, "file:///" + strBodyFile.s)
The javascript code is executed on load and starts printing. Uncommon, but it works so far.
Best,
Kukulkan
Re: How to print WebGadget in Linux?
Posted: Sat Dec 24, 2011 1:25 pm
by IdeasVacuum
...that sounds like a nifty solution to me, sure to be useful to other folk too.
Re: How to print WebGadget in Linux?
Posted: Sat Dec 24, 2011 1:56 pm
by MachineCode
Do you need to force it to reload? It auto-reloads here for me when I set the new gadget text.