Web Page Print

I am trying to print a Web page using GotoURL(“javascript:print();”) or Right mouse click in the browser and selecting Print. The page prints OK, but it will not print an Image (the company logo) which is on the page. How do I get it to print the image as well?

Thanks for any help.
Graeme

I haven’t tried printing myself, but I would assume that doing this would work if you haven’t tried?

YourWebPageObj.ExecuteJavaScript("window.print()")

This does print the page, but it doesn’t print the image. The image is set in an ImageViewer control - is there another way to place an image on the page?

Isn’t printing images or not a browser setting? If I go to print this page in Firefox, I don’t see any images either (Xojo logo, profile pictures).

Actually, i just realized that if I run a project with ImageViewers and right click → print, they don’t show on the print preview either… however WebSDKUIControl’s do

So how do I get an image on the web page using the WebSDKUIControl?

You’ll have to be using 2021 r3.1 and you’ll find the examples and documentation in the extras folder inside of your Xojo folder.

It’ll involve some javascript and a bit of setup to make it work… quite an annoying workaround for something that should be so simple