Enable Print Preview

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.

Enable Print Preview

Postby fa0110 » Sun Oct 06, 2024 2:30 am

Append argument "--enable-print-preview" in Before Command Line Procesing.
No effect at end of line.
Is it possible to add it at the beginning of the line?
fa0110
Techie
 
Posts: 33
Joined: Tue Aug 06, 2024 12:12 am

Re: Enable Print Preview

Postby fa0110 » Sun Oct 06, 2024 8:39 am

I changed the append_argument command to append_switch and it was resolved.
fa0110
Techie
 
Posts: 33
Joined: Tue Aug 06, 2024 12:12 am

Re: Enable Print Preview

Postby fa0110 » Sun Oct 06, 2024 9:11 am

Print Handler only occurs on Linux? Which event occurs on Windows?
fa0110
Techie
 
Posts: 33
Joined: Tue Aug 06, 2024 12:12 am

Re: Enable Print Preview

Postby magreenblatt » Sun Oct 06, 2024 10:37 am

fa0110 wrote:Print Handler only occurs on Linux?

Yes
fa0110 wrote:Which event occurs on Windows?

Event for what purpose?
magreenblatt
Site Admin
 
Posts: 12966
Joined: Fri May 29, 2009 6:57 pm

Re: Enable Print Preview

Postby fa0110 » Sun Oct 06, 2024 11:06 am

To change settings and preferences.
landscape;
display_header_footer;
header_template;
footer_template;
page_ranges.
fa0110
Techie
 
Posts: 33
Joined: Tue Aug 06, 2024 12:12 am

Re: Enable Print Preview

Postby magreenblatt » Sun Oct 06, 2024 12:35 pm

Use PrintToPdf if you want to configure those settings programmatically. Otherwise, the user can configure them in the Print Preview dialog. You might also be able to configure the Print Preview defaults via the Preferences system, check the Chromium code for that.
magreenblatt
Site Admin
 
Posts: 12966
Joined: Fri May 29, 2009 6:57 pm

Re: Enable Print Preview

Postby fa0110 » Sun Oct 06, 2024 2:35 pm

I would like to open Print Preview with the pre-configured settings.
Example:
Copies 2:
Header: No
Footer: No

cef_print_settings_t?
cef_print_settings_create()?

Example WebView2:
https://learn.microsoft.com/en-us/microsoft-edge/webview2/how-to/print?tabs=dotnetcsharp
fa0110
Techie
 
Posts: 33
Joined: Tue Aug 06, 2024 12:12 am


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 84 guests