Forcing render with print media styling

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.

Forcing render with print media styling

Postby abueno » Mon Aug 22, 2016 2:34 pm

Hello CEF forum,

I need to take a CEF application and force pages to render with print media type css instead of screen media type. This would achieve the same effect as checking "Emulate CSS Media" in Chrome developer tools as pictured below: Image.

As I'm not familiar with CEF, I'm wondering if this is possible. If so, can you point me towards what functions I should call or flags I should set?

Cheers everyone!
abueno
Newbie
 
Posts: 2
Joined: Mon Aug 22, 2016 1:27 pm

Re: Forcing render with print media styling

Postby magreenblatt » Tue Aug 23, 2016 7:13 am

There does not appear to be a way to configure it outside of inspector. See usage of setMediaTypeOverride in Chromium: https://cs.chromium.org/search/?q=setMe ... um&type=cs
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 95 guests