Skip to content
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

alloy: Print preview fails to load PDF renderer (M124) #3686

Closed
magreenblatt opened this issue Apr 22, 2024 · 6 comments
Closed

alloy: Print preview fails to load PDF renderer (M124) #3686

magreenblatt opened this issue Apr 22, 2024 · 6 comments
Labels
alloy Related to the Alloy runtime bug Bug report help wanted Issue resolution will likely require community contributions pending WontFix Will be closed as WontFix in the near future

Comments

@magreenblatt
Copy link
Collaborator

To Reproduce
Steps to reproduce the behavior:

  1. Run cefclient --enable-print-preview
  2. Select Tests > Print from the top menu.

Expected behavior
The preview frame should load successfully. Instead, it shows "Loading preview..." until the dialog is canceled.

Versions (please complete the following information):

  • OS: All platforms
  • CEF Version: M124

Additional context
Does not reproduce with Chrome runtime (Chrome or Alloy style). Does not reproduce with M123.

@magreenblatt magreenblatt added bug Bug report alloy Related to the Alloy runtime labels Apr 22, 2024
@magreenblatt
Copy link
Collaborator Author

Alloy bootstrap is deprecated (see #3685). Issues that only reproduce with Alloy bootstrap are being closed as WontFix.

@magreenblatt magreenblatt closed this as not planned Won't fix, can't repro, duplicate, stale Apr 25, 2024
HashidaTKS added a commit to HashidaTKS/Chronos that referenced this issue Jun 21, 2024
CEF plan to drop Alloy bootstrap mode support since CEF127+.

chromiumembedded/cef#3685

This decision is affect to Chronos.
E.g. An issue for print preview on Alloy bootstrap mode is decided to not fixed.

chromiumembedded/cef#3686

So we should use Chrome bootstrap mode since CEF127+.
Chrome bootstrap + Alloy runtime style is already supported from CEF125+.
So we use Chrome bootstrap + Alloy runtime style in advance before CEF127 is released.

If we don't use Alloy runtime style, at least the following issues have been confirmed:

* Download popup like Chrome is displayed on right top corner.
  * Sometimes Chronos craches by clicking "oepn file" of the popup.
* Context menus on right clicking are modified.
  * This is because menu item IDs are different between Alloy runtime mode and Chrome runtime mode.
  * We should modify Chronos in order to follow to the IDs of Chrome runtime mode.

They are don't occur when we use Alloy runtime style.
So we adopt Alloy runtime style.
HashidaTKS added a commit to HashidaTKS/Chronos that referenced this issue Jun 21, 2024
CEF plan to drop Alloy bootstrap mode support since CEF127+.

chromiumembedded/cef#3685

This decision is affect to Chronos.
E.g. An issue for print preview on Alloy bootstrap mode is decided to not fixed.

chromiumembedded/cef#3686

So we should use Chrome bootstrap mode since CEF127+.
Chrome bootstrap + Alloy runtime style is already supported from CEF125+.
So we use Chrome bootstrap + Alloy runtime style in advance before CEF127 is released.

If we don't use Alloy runtime style, at least the following issues have been confirmed:

* Download popup like Chrome is displayed on right top corner.
  * Sometimes Chronos craches by clicking "oepn file" of the popup.
* Context menus on right clicking are modified.
  * This is because menu item IDs are different between Alloy runtime mode and Chrome runtime mode.
  * We should modify Chronos in order to follow to the IDs of Chrome runtime mode.

They are don't occur when we use Alloy runtime style.
So we adopt Alloy runtime style.
HashidaTKS added a commit to HashidaTKS/Chronos that referenced this issue Jun 21, 2024
CEF plan to drop Alloy bootstrap mode support since CEF127+.

chromiumembedded/cef#3685

This decision affects to Chronos.
E.g. An issue for print preview on Alloy bootstrap mode is decided to not fixed.

chromiumembedded/cef#3686

So we should use Chrome bootstrap mode since CEF127+.
Chrome bootstrap + Alloy runtime style is already supported from CEF125+.
So we use Chrome bootstrap + Alloy runtime style in advance before CEF127 is released.

If we don't use Alloy runtime style, at least the following issues have been confirmed:

* Download popup like Chrome is displayed on right top corner.
  * Sometimes Chronos craches by clicking "oepn file" of the popup.
* Context menus on right clicking are modified.
  * This is because menu item IDs are different between Alloy runtime mode and Chrome runtime mode.
  * We should modify Chronos in order to follow to the IDs of Chrome runtime mode.

They are don't occur when we use Alloy runtime style.
So we adopt Alloy runtime style.
@magreenblatt
Copy link
Collaborator Author

Reopening due to reports of this not working with Chrome runtime + Alloy style. https://magpcss.org/ceforum/viewtopic.php?f=6&t=19806

@magreenblatt magreenblatt reopened this Jul 2, 2024
@magreenblatt
Copy link
Collaborator Author

See also #3725 which can cause "Print preview failed" in M125+.

@magreenblatt
Copy link
Collaborator Author

Chrome bootstrap + Alloy style works for me using CEF official build 126.2.10 (64-bit on Windows 11):

  1. Run cefclient.exe --use-alloy-style --enable-print-preview --disable-features=PrintCompositorLPAC
  2. Select Tests > Print
  3. Print preview loads successfully

Alloy bootstrap still has issues with the same build:

  1. Run cefclient.exe --disable-chrome-runtime --enable-print-preview --disable-features=PrintCompositorLPAC
  2. Select Tests > Print
  3. Print preview gets stuck as "Loading preview..."

@magreenblatt
Copy link
Collaborator Author

Contributions to debug/fix the remaining Alloy bootstrap issue are welcome. Otherwise, this issue will be closed as WontFix once M128 (Alloy bootstrap deletion) reaches beta channel.

@magreenblatt magreenblatt added help wanted Issue resolution will likely require community contributions pending WontFix Will be closed as WontFix in the near future labels Jul 8, 2024
@magreenblatt magreenblatt closed this as not planned Won't fix, can't repro, duplicate, stale Aug 5, 2024
@jasminjasmin2
Copy link

Hello,

There are still issues with some websites when using print preview feature from cefclient. The ''Loading preview.." message never disappears. The issue reproduces with the latest 127 release for https://www.corriere.it/ website.

Programmatically, in custom windowsless applications calling the PrintToPDF() function, the OnPdfPrintFinished() callback is never called and the printer process never finishes.

I launched cefclient --use-alloy-style --enable-print-preview --disable-features=PrintCompositorLPAC as recommended and the print preview works for some websites, but not for https://www.corriere.it/ .

For other websites, in custom windows less applications, when setting a viewer rectangle with a quite large height, like 25,000 pixels, makes the printer process to hang. Not sure if the issues are related.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
alloy Related to the Alloy runtime bug Bug report help wanted Issue resolution will likely require community contributions pending WontFix Will be closed as WontFix in the near future
Projects
None yet
Development

No branches or pull requests

2 participants