Exported SVG image is blank when windowless

Having problems with building or using the JCEF Java binding? Ask your questions here.

Exported SVG image is blank when windowless

Postby rossj » Sat Jan 16, 2021 1:34 pm

Hello,

I have a JCEF application based on amCharts (a javascript library), running in a Java AWT window. This has been working fine.

I am now turning my attention to running the same application in the background (ultimately as a Windows service). When windowless (CefSettings.windowless_rendering_enabled=true), the web page/javascript appears to run as expected with the correct network requests and responses from JavaScript. However, when I export an SVG image (using an amCharts export function), I get the SVG file but it displays as a blank white page. The SVG file contains around 45KB of content, but it should be 3 times that size.

I am not totally clear whether I should use the isOffscreenRendered option when creating the browser instance. The demo files appear to indicate that it should be true. When enabled however, I receive a pop-up dialog titled 'OpenGL ES Error' and the statement 'can't find the intel graphics'. It seems likely this is related to me problem. I'm just not clear how to proceed. Or perhaps my problem is completely unrelated to this error. Can anyone point me in the right direction?

I'm running the JCEF build from https://github.com/jcefbuild/jcefbuild...
JCEF Version: 87.1.12.276+g304f3e3
CEF Version: 87.1.12+g03f9336+chromium-87.0.4280.88
Chromium Verison: 87.0.4280.88
and AdoptOpenJDK 11

Cheers, Ross
rossj
Newbie
 
Posts: 2
Joined: Sat Jan 16, 2021 1:00 pm

Re: Exported SVG image is blank when windowless

Postby rossj » Sat Jan 16, 2021 7:20 pm

I should have slept on it before posting!

It occurred to me that the div holding the amchart might not have a dimension sufficient to render anything, resulting in a blank page. Sure enough, when using a GUI, the JFrame sets an appropriate size and the CSS was set to use 100% (width) and 100vh (height) of it. However, there was no minimum set anywhere except in the JFrame (not used for the windowless case). Setting a minimum anywhere has solved this problem.

Regarding 'isOffscreenRendered'... it doesn't appear to matter if this is true of false for the windowless situation. However, I do still get the 'OpenGL ES Error' pop-up when isOffscreenRendered=true. So I will run with isOffscreenRendered=false. If anyone can shed light on this, I'm still interested to know.

Cheers, Ross
rossj
Newbie
 
Posts: 2
Joined: Sat Jan 16, 2021 1:00 pm


Return to JCEF Forum

Who is online

Users browsing this forum: No registered users and 3 guests