Closed ebrandin closed 1 month ago
I could also reproduce this issue. It seems somehow related to bug #3768 . The behavior is very similar. However, I could not find any evidence of sandbox iframe usage in www.corriere.it website which cannot be printed to PDF .
Should it matter if the application is built with or without sandbox enabled? In my tests reproduces in both situations if did not do anything wrong.
I also could not find any Chromium command line switch to force the allow-scripts and allow-same-origin for sandbox frames.
It seems somewhat related to #3768. In that issue I was able to get a print preview when all iframes were removed (using dev tools). Those removed iframes were not sandboxed, but since they had another origin both issues might be related to site isolation.
In CEF 130.0.3 (beta), the #3768 issue seems to be fixed. However, my issue regarding sandboxed iframes is still reproducible.
Likely fixed with #3768. Please report back if it isn't.
Fix for #3768 does indeed fix the issue, thanks @mbragg12 and @magreenblatt!
Describe the bug Starting from CEF 125, PrintToPDF fails when trying to render sandboxed iframes. It does however work if the sandbox attribute is set to "allow-script allow-same-origin".
The CefPdfPrintCallback is never invoked due to CefPdfPrintCallbackCToCpp::OnPdfPrintFinished being called with empty path, which makes our application hang on export to pdf.
To Reproduce
--gtest_filter=OSRTest.PrintToPdf*
) (may also require--disable-features=PrintCompositorLPAC
)sandbox="allow-scripts"
fails with "Printing failed"Expected behavior All unit tests should pass, rendering all versions of the sandboxed iframes.
Versions (please complete the following information):
Additional context This used to work up to version 124.
Does the problem reproduce with Google Chrome at the same version? No, Chrome is able to export sandboxed iframes to pdf.
Add any other context about the problem here. iframe_to_pdf.patch