Graph displays correctly but does not print correctly

Issue #3269 wontfix
JohnnyP created an issue

I’ve searched to see if this has been reported but it’s difficult to search for. I’ll attach an HTML which is just a wrapper fro an SVG.

  1. Load the html file view it and print it.
  2. Expect to see what is displayed on the print. Instead the lines on the graph are very tiny and in the upper left corner of the print.
  3. I’m using the latest version but this has been a problem for all versions. I’m using WPF on windows 10 CEFSharp.
  4. Yes
  5. No

Comments (9)

  1. Marshall Greenblatt

    What CEF version? How are you printing, what are you printing to? Did you test in the same version of Google Chrome?

  2. JohnnyP reporter

    Marshall

    Thanks for getting back to me. I’m just upgraded my CEF version to 98.1.21 but the problem has been there a long time. I’m pretty sure it worked when I first wrote it. That would have been like 8 years back?? It’s a report not many customers use and I don’t print stuff normally so it went unnoticed for a while. Of course, as I’m trying to collect info, my printer stopped working. If I export to PDF, it exports correctly so last week I thought I could maybe create a PDF, load that into the browser and print that, but it didn’t work. If I tell it to print and tell windows to print to PDF, the bug shows up so you don’t actually have to make a print to see it and it’s not related to the printer model or anything like that. I have tried various versions of Google Chrome and they did not exhibit the bug, but I just went to verify that and realized my super cheap printer stopped working. The jets are clogged. I print by setting an isPrinting boolean, reload the page at 100% (cause I have some HTML wrappers that zoom it), then in OnLoadingStateChanged if isPrinting is true I call browser.Print(). I have a bunch of bar graphs that print correctly, it’s just the graph with lines that doesn’t work. Also everything else looks correct. It’s only the lines that are tiny and in the upper left. Thanks for looking into this.

  3. Marshall Greenblatt

    I think Alex is suggesting that you run Chrome with --no-sandbox to match the behavior of CEFSharp.

  4. Marshall Greenblatt

    Were you able to reproduce the problem in cefclient with or without the --no-sandbox flag?

  5. JohnnyP reporter

    Okay, I misunderstood. I started chrome (the app) with the --no-sandbox flag but told it to print to pdf and didn’t see the problem. I’m gonna run out and buy a new printer tonight if I can’t get the heads unclogged. I should have verified the printer was working before reporting the bug. I apologize.

  6. JohnnyP reporter

    Wow, I fixed the printer, loaded the file into Chrome which I started with the --no-sandbox arg and sure enough when I printed it, the error showed up. I don’t know a lot about sandboxing but what I do know leaves me confused as to how it could affect the geometry of a SVG file.

  7. Log in to comment