-
Notifications
You must be signed in to change notification settings - Fork 458
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Print Preview still does not load for some websites #3768
Comments
The issue is still reproducible with the latest build and it affects websites printing. Do you have any idea how to fix this or is it possible to add a switch to re-enable the old alloy runtime and style to work as it did before 125, at least until the issue is properly fixed in a future version? |
I tried to debug this in a third party application and a difference I could notice between the cases when it works and it not works is that after the browser is stopped while waiting for printing to PDF to finish the following error is thrown: [0818/120745.703:ERROR:print_util.cc(40)] PrintToPDF failed with error: Printing failed The output path is set in code and it actually the same code works for other websites. I don't know why that path is not getting to printing process. |
What should be done to fix this issue? Could you please help? I don't understand how the output path can get empty in printer process. I tried both with sandbox and no-sandbox, debug and release builds. It is not a Chromium issue and only someone with a deep understanding of CEF code and advanced debugging skills could find the root cause of this and provide a fix. I could not find any switch recently added in Chromium which might change the behavior. |
Unfortunately this regresion seems to persist in the latest 129 release. It could be reproduced with the web pages from report and with many other websites I have tried. Off-screen printing to PDF, which should be an important feature from project description, cannot be reliably used after you made the alloy related changes. Do you have any plan to investigate and fix this in 129 or a in a future release of the project? |
Could you please clarify if windowless rendering will be further supported in CEF? Currently the PrintToPDF() calls hangs with many websites as soon as the windowless rendering is enabled. |
@magreenblatt Do you know what the status of this issue is? I assume it is an actual defect and not something that is unsupported. Similar to the initial report, tinkering with 128 and --use-alloy-style, I can print simple sites like google but on large/complex sites PrintToPdf hangs. Not sure it helps at all but if you navigate away from the site being printed, the
|
This issues is still reproducible in the latest build. Almost two months passed since the initial report. |
The same issue occurs when using the 'Page.printToPDF' method from DevTools protocol. The method closure callback is never invoked. If the windowsless rendering is disabled, the callback is invoked. |
I had this issue on linux with PrintToPDF not completing for some sites (specially the ones with google ads). The work around I found is described here: |
That definitely seems to be the issue. I added some logs on the IsReadyToComposite and if that returns false, the print "hangs". Now to decide what to do with this information. |
edgardogho's work around definitely improves the situation (thanks for that) but there are still issues. It seems to consistently create the PDF. The PDF is usually wrong, missing images and such. The completion callback also doesn't always get called. In the case of the print preview, it shows an error saying the preview failed. |
Yes, I can also confirm the workaround allows the print to PDF to finish even if with missing elements. Thanks @edgardogho for this. It is not clear yet why it works (without any change) when the windowsless rendering is disabled. It seems that Alloy style still plays a role in this issue and it needs further investigation for a complete fix. |
Print preview does not work in cefclient 127 and the ''Loading preview.." message never disappears when trying to print https://www.corriere.it/ website but it works for other websites.
Programmatically, in custom windowsless applications calling the PrintToPDF() function, the OnPdfPrintFinished() callback is never called and the printer process never finishes.
To Reproduce
Steps to reproduce the behavior:
Versions (please complete the following information):
Additional context
In the case of some other websites, like www.gsp.ro, when trying to print to pdf in custom windows-less applications, setting the browser window rectangle to a quite large height, like 25,000 pixels, also makes the printer process to hang. Not sure if the issues are related. Setting a large browser window for such websites is necessary if the resources loading is triggered only for elements inside the viewport.
The issue does not reproduce with Chrome 127.0.6533.99
The text was updated successfully, but these errors were encountered: