-
Notifications
You must be signed in to change notification settings - Fork 183
Closed
Labels
Milestone
Description
Describe the bug
In our app, we have the functionality of printing images from an internal browser window. We previously used Internet Explorer as an internal browser but we changed it to Edge by default for Windows systems. Previously this functionality correctly created the image of browser composite, but it doesn't work for Edge.
To Reproduce
browser = new Browser(composite, SWT.EDGE);
//any URL
browser.setUrl(file.toURI().toURL().toString())
Image image = new Image(Display.getDefault(), browser.getBounds());
GC gc = new GC(image);
try {
browser.print(gc);
} finally {
gc.dispose();
}
ImageTransfer imageTransfer = ImageTransfer.getInstance();
Clipboard clipboard = new Clipboard(Display.getCurrent());
clipboard.setContents(new Object[] {image.getImageData()}, new Transfer[]{imageTransfer});
Expected behavior
Correct image with browser content shown on it.
Environment:
- Select the platform(s) on which the behavior is seen:
-
- Windows
- Additional OS info (e.g. OS version, Linux Desktop, etc)
Windows 10, Edge installed - JRE/JDK version
java.vendor.version=Temurin-11.0.15+10
java.version=11.0.15 - Version
found on:
org.eclipse.swt.browser.EdgeVersion=105.0.1343.27
Workaround (or) Additional context
Probably screenshots can be done via browser functionality. But I was not able to do that.
E1izabeth and codegoddesskh