Activate PrintSetting fitInPage per default

Having problems with building or using the JCEF Java binding? Ask your questions here.

Activate PrintSetting fitInPage per default

Postby Phylanx » Thu Aug 26, 2021 4:53 am

Hi!

Upon upgrading JCEF to version 4147 I activated the chromium print dialog per default.
Now the customers asked if the "fit in page" setting can be applied automatically.

Following soluations are OK:

1. Always activate the fit in page per default (if available)
2. if 1. is not possible remember the setting like in Chrome.

Ad 1.:
Is there a setting/code place somewhere deep down in the chromium printing dialog where I can set this setting this by default?

Ad 2.:
We already had a discussion about that, see viewtopic.php?f=17&t=18036
The problem was that the UserPrefs.json is not written/used correctly in JCEF (didn't verify on CEF alone).
Has something changed with the implementation of the Chrome Runtime instead of the Alloy Runtime?
Are there other news you are aware of on this?
Phylanx
Expert
 
Posts: 201
Joined: Thu Aug 11, 2016 8:17 am

Re: Activate PrintSetting fitInPage per default

Postby magreenblatt » Thu Aug 26, 2021 8:50 am

The comments in the thread you link still seem relevant.
magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm

Re: Activate PrintSetting fitInPage per default

Postby Phylanx » Fri Aug 27, 2021 12:46 am

That is - I guess - for the UserPrefs topic.

More important for me is the possibility to automatically or programatically set the "fit in page" in the print dialog without prefs.
Do you know a code place where I can start searching?
Phylanx
Expert
 
Posts: 201
Joined: Thu Aug 11, 2016 8:17 am

Re: Activate PrintSetting fitInPage per default

Postby magreenblatt » Fri Aug 27, 2021 9:49 am

CefPrintViewManager::GetDefaultPrintSettings is likely a good starting point.
magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm


Return to JCEF Forum

Who is online

Users browsing this forum: No registered users and 22 guests