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

Printing HTML Elements with RGBA does not work #341

Closed
magreenblatt opened this issue Jul 12, 2019 · 3 comments
Closed

Printing HTML Elements with RGBA does not work #341

magreenblatt opened this issue Jul 12, 2019 · 3 comments
Labels
bug Bug report

Comments

@magreenblatt
Copy link
Collaborator

Original report by Johann Scheiterbauer (Bitbucket: Phylanx, GitHub: Phylanx).


  1. What steps will reproduce the problem?

    1. Open default.MainFrame sample application.
    2. Load attached “svgRGBA.html” (either from file system via file:// or hosted by a webserver, it doesn’t matter)
    3. Print the HTML content (Menu File → Print…). Use either a physical printer or a PDF printer (e.g. Microsoft PDF Printer).
  2. What is the expected output? What do you see instead?

    1. Expected: The HTML document is printed as it is seen.
    2. Instead: 2 of the three SVG graphics are printed, one is missing.
      The missing one is printed on the upper left side and smaller, as if it was not upscaled or shrinked.
  3. What version of the product are you using? On what operating system?
    We have the problems on following systems:

    1. Windows 10 64 bit
    2. JCEF 32 bit
    3. JCEF versions 2704, 3325, 3683 and newest (3770)
  4. Does the problem reproduce with the JCEF simple or detailed sample application at the same version? How about with a newer or older version?

    1. Problem could be reproduced with Simple and Detailed MainFrame.
    2. newer/older version: see Version info of point 3
  5. Does the problem reproduce with the cefclient or cefsimple application at the same version? How about with a newer or older version?

    1. The problem could NOT be reproduced with the cefclient.exe of version 3325.

A forum topic was already created, see https://magpcss.org/ceforum/viewtopic.php?f=17&t=16664

Current analysis status:

The problem seems to be somehow in the JCEF implementation.
It could only be reproduced in the JCEF sample implementation (simple and detailed) and in our program using JCEF.
The PrintToPDF action works (e.g. in detailed.MainFrame Menu File → Print to PDF).
cefclient.exe also prints correctly.
Also all common browsers (chrome, firefox, chromium) are printing correctly.

The problem seems to be caused by the style function rgba() which sets the alpha value in the 4th parameter (see first graphic in attached svgRGBA.html).
Using rgb() instead and setting additionally the opacity property works (see second graphic in attached svgRGBA.html).
Also using rgba() with an additional opacity works (see third graphic in attached svgRGBA.html).

@magreenblatt
Copy link
Collaborator Author

I can't think of anything in JCEF that could cause this. Maybe the JVM is configuring something globally that interferes with Chromium printing?

If you're able to identify a fix and it seems reasonable to include with JCEF then we can re-open this issue.

@magreenblatt
Copy link
Collaborator Author

  • changed state from "new" to "wontfix"

@magreenblatt
Copy link
Collaborator Author

Original comment by Johann Scheiterbauer (Bitbucket: Phylanx, GitHub: Phylanx).


OK, got it.
Our customer didn’t urge this issue any further and we had other more urgent stuff to do, so nothing happened on this.

If the customer urges to this, we’ll try with a newer version first and have a deeper look then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug report
Projects
None yet
Development

No branches or pull requests

1 participant