chromiumembedded / cef

Chromium Embedded Framework (CEF). A simple framework for embedding Chromium-based browsers in other applications.
https://bitbucket.org/chromiumembedded/cef/
Other
3.09k stars 450 forks source link

PrintToPDF() silently fails on Windows starting in CEF 125 #3725

Open binarynate opened 3 days ago

binarynate commented 3 days ago

Describe the bug

First, I want to say that I love CEF and hugely appreciate your immense amount of work on it. Thank you! I recently upgraded from CEF 111 to 125 and discovered that CefBrowserHost::PrintToPDF() now silently fails on Windows (it works correctly on macOS). By silently fails, I mean that the PDF is not created and the CefPdfPrintCallback isn't invoked. I then tested the Windows 64-bit builds of the cefclient application and found that starting with CEF 125, the "Print to PDF" option from the Tests dropdown fails silently, too (i.e. the PDF is not created and it doesn't show a UI dialog indicating that the PDF was created). Here are are findings testing with different versions of cefclient:

Do you have any ideas for how I can resolve this issue? The debug.log file for cefclient 125 doesn't appear to have any details about the error: debug.log

To Reproduce Steps to reproduce the behavior:

  1. Download and run the cefclient sample app for CEF 125 or newer.
  2. Click Tests -> "Print to PDF"
  3. Observe that the PDF is not created and there is no UI dialog indicating that the PDF was created.

Expected behavior The PDF is created and cefclient displays a UI dialog confirming that the PDF was created.

Versions (please complete the following information):