Printing vs PrintToPDF

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.

Printing vs PrintToPDF

Postby Peter » Tue Oct 27, 2020 5:54 am

Hello,

I'm trying to replace the usual printing with PrintToPDF (and failing to see any paper size/orientation to work except A4/vertical, but that's another question), and currently I'm doing this by returning false from ClientPrintHandlerGtk::OnPrintDialog(), and then calling PrintToPDF. However, sometimes I notice a delay before ClientPrintHandlerGtk::OnPrintDialog() is called, and it looks like the document is being internally rendered into PDF - which is then discarded, and re-rendered again, but this time by my PrintToPDF call.
This all happens on Linux/GTK and the code is based on the CefClient example.
Not sure how much sense this all makes, but I'm looking for a way to not waste time re-generating the printed document twice... and maybe even find a way to print in landscape orientation and other paper sizes than A4.
Peter
Techie
 
Posts: 38
Joined: Thu Mar 05, 2020 9:41 am

Return to Support Forum

Who is online

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