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
How to print WebGadget in Linux?
-
- Always Here
- Posts: 6425
- Joined: Fri Oct 23, 2009 2:33 am
- Location: Wales, UK
- Contact:
Re: How to print WebGadget in Linux?
...something I have done on Windows is to create a printable file by screen-capturing the page of interest.
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
If it sounds simple, you have not grasped the complexity.
Re: How to print WebGadget in Linux?
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
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
-
- Always Here
- Posts: 6425
- Joined: Fri Oct 23, 2009 2:33 am
- Location: Wales, UK
- Contact:
Re: How to print WebGadget in Linux?
...that sounds like a nifty solution to me, sure to be useful to other folk too.
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
If it sounds simple, you have not grasped the complexity.
-
- Addict
- Posts: 1482
- Joined: Tue Feb 22, 2011 1:16 pm
Re: How to print WebGadget in Linux?
Do you need to force it to reload? It auto-reloads here for me when I set the new gadget text.
Microsoft Visual Basic only lasted 7 short years: 1991 to 1998.
PureBasic: Born in 1998 and still going strong to this very day!
PureBasic: Born in 1998 and still going strong to this very day!