Unfortunately, the 'display a PDF inside a browser
widget' is a hack which only works on Windows. (at that, only some of
the time) To do it on windows, simply instantiate your browser and
then set the url to the PDF:
Browser browser = new Browser(composite, SWT.BORDER);
browser.setUrl("C:\\somedocument.pdf");
Like so...
Daniel
Scheidecker Antunes wrote:
Hello,
By looking at older posts I understand that it is possible to display a
PDF inside a browser widget of an SWT app.
For that I assume that the browser widget calls the underlining browser
from the hosting OS to diplay the PDF as the browser has the acrobat
plugin.
I am new to SWT so I need some help. I need to have this code tested on
Mac, Linux and Windows.
What I need to write is a very basic application to display a PDF file
inside a SWT browser widget.
First, besides the swt.jar what order jars do I need in order to deploy
it? I understand that I will need swt-mozilla.jar for linux, is it
correct? How about Mac and Windows?
Does anyone has a simple code snipet to display a PDF file inside a
browser widget? I need this for my school.
Thank you in advance,
C.F.
|