I'm experiencing a strange issue with the SWT browser widget.
I developed a multipage application using the "transition composite" widget from opal widgets.
In my last window I need to display a pdf.
I've been looking for free open source solutions on the web, and the only one I could fine was IcePdf but the renderization of the page was not great.
Then I found out I could use the browser widget to diplay a pdf.
I created a new project with the following code :
shell = new Shell();
shell.setSize(l, h);
Browser browser = new Browser(shell, SWT.NONE);
browser.setBounds(xb, yb, lb, hb);
browser.setUrl("file://" + pdfPath);
and it worked great.
But then if I run the same code in my actual application, it opens the pdf into adobe reader and not into the application itself.
Has anybody else noticed that issue before? And if yes how can I solve it?
Thanks in advice,
Stefano Franchini
Copyright Notice:Content Author:「Stefano Franchini」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/30661956/swt-browser-diplays-pdf-in-new-window