can CEF print with background color & image?

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

can CEF print with background color & image?

Postby ynvince » Thu Apr 03, 2014 1:11 am

Hi,
can CEF print with background color & image? How should I do?, thanks
ynvince
Newbie
 
Posts: 1
Joined: Thu Apr 03, 2014 1:01 am

Re: can CEF print with background color & image?

Postby magreenblatt » Thu Apr 03, 2014 12:18 pm

It does not appear to be supported by Chromium.
magreenblatt
Site Admin
 
Posts: 12383
Joined: Fri May 29, 2009 6:57 pm

Re: can CEF print with background color & image?

Postby chowey » Fri Jul 11, 2014 1:08 am

It is supported in Chromium using css:

Code: Select all
body {
    -webkit-print-color-adjust: exact;
}


This works on CEF 2078 (Trunk as of this writing) but not on CEF 1916.
chowey
Techie
 
Posts: 20
Joined: Fri Oct 25, 2013 3:13 pm

Re: can CEF print with background color & image?

Postby cbreemer » Thu Sep 23, 2021 4:51 pm

chowey wrote:It is supported in Chromium using css:

Code: Select all
body {
    -webkit-print-color-adjust: exact;
}


This works on CEF 2078 (Trunk as of this writing) but not on CEF 1916.

Thanks for that, worked like a charm !!!
Isn't it strange though that it's fine in the cefBrowser but you need an arcane setting to get it to print correctly ?
cbreemer
Newbie
 
Posts: 7
Joined: Thu Sep 23, 2021 12:47 pm


Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 55 guests