Hi,
I am using a JWebBrowser in a Swing application on Windows 10 x64 bit version 1809 machine. I get a black rectangle when making a screen capture in JWebBrowser. I tried several latest versions of DJNativeSwing, including the latest '1.0.3 preview'. The print screen feature used to work on this same machine before. Also, there is another Windows 10 machine where this feature still works without problems, and some other machines where it does not.
To reproduce the problem I execute DemoExampleDefinitionLoader demo available at
/DJNativeSwing-SWTDemo/src/chrriis/dj/nativeswing/swtimpl/demo/examples/webbrowser/FullPageCaptureExample.java
As a result I get a black rectangle (see attached).
I also tried this sample - https://bugs.eclipse.org/bugs/attachment.cgi?id=93220
The result is similar - two black rectangles.
What do you think can be a problem ?
Thank you very much for your time!
C
I forgot to mention that I tested it with SWT versions 4.5 and 4.12. Both versions behave the same.
Hi,
I am not sure what the reason could be. Maybe the graphics driver is important and in your case got updated. Or maybe the web browser got updated and the SWT printing feature does not work with that version. You could try to alter your graphics driver and see if that makes a difference...
In any case, I am not sure how I could help you further as it seems the problem is in SWT itself...
Hope this helps,
-Christopher
Thank you for your help! I will try to update the drivers. By the way I also noticed the same issue on bootcamp Windows 10 on MacBook Pro 2017.
I created an SWT sample that captures an image from SWT Browser using 'browser.print()' method. It works fine. I guess it means there is no issue with SWT. Here is the sample:
I also have the same problem, I think something in control.print (gc), but I can't find any correction