I lost the background colors (htmlviewer printing…)

The screen shot below says all:

Look the print preview (front) and the document preview (behind) for what is missing.

The generated pdf is awful.

Last released Monterey / M1 MacBook Pro / Xojo 21r2.1.

You would get exactly the same result from a browser, unless you tick “print background graphics” in More Settings in Chrome, for instance.

In Safari, the option is not available. And since HTMLViewer seems to use the same engine, you are probably out of luck.

C’est ce que je pensais. En revanche, la fenêtre de Firefox est… magnifique !

Print under Firefox:

La CheckBox manquante est “Imprimer les arrière-plans” (print backgrounds)

That document have been generated with Xojo Desktop.

I downloaded the Safari Technology Preview and… there is a change; the Print background checkbox exists there (running on last Monterey). Watch for yourself:

But this is “only” inside the browser; no change (yet ?) when trying to print from Xojo 21r2.1 / Project running in the IDE.

I don’t know what Xojo embeds exactly. It may be as simple as exposing a boolean.

Won’t you try to file a feature request ?

There may be another way to get the background, if the content does not exceed one page: grab the content of the window on the screen, for instance with an MBS plugin.

Thank you Michel.

I may be dead before the feature will be added, debugged and released…

The actual way to get the background is to save the generated html file, then load it with Firefox and generate the pdf. Works fine.

I am tired to fall into all kinds of traps and reporting them.

The last to date (I reported) is a reliable crash with the File Type (drop an image above the Icon area; not above the Icon Editor, the File Type Area).
From time to time, I forget and report something :face_with_symbols_over_mouth:

Nota: I always take time to check with the last to date (now Xojo 21.r3.1) version while I develop with 2015r1 (on a MacBook Pro i5 whose monitor is crashed).

My current motto is “if the feature do not works, trash it”.

You cannot expect the user to have installed Firefox.

You are correct, I do not.