Today I checked the Mozilla PDFJS version. PDFJS is used to have a full featured and fast PDF viewer in the DMS. PDFJS is JavaScript based and is intergrated via org.swt.Broswer.
I had to use the SWT.MOZILLA flag with the browser since PDFJS did not run with GTK webkit (Linux native) and Internet Explorer (Windows native).
The application has to be shipped with XulRunner 24.0 which is compatible with the SWT library.
With the old PDFJS version 1.2.109 this worked fine.
For testing I switched to current stable PDFJS 1.4.20. Unfortunately lots of images are not rendered anymore.
I believe that the outdated XulRunner version is the reason. I tried to find out if there is support for a newer one in the Eclipse Neon platform.
The result:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=474625
The XulRunner project is deprecated and there is no effort in the Eclipse team to get the latest version working with SWT. This is bad news.
Compatibiliy table
For now XulRunner has to be used and shipped with the SWT application to get a stable PDFJS integration.
The follwing table summarized the test results.
Date: 07-28-2016
Eclipse: Neon 4.6, Build I20160606-1100
SWT: I found two jars in the plugins folder:
swt_3.105.0.v20160127-0039.jar
swt_3.105.0.v20160603-0902.jar
SWT.getVersion() returns 4623
OS | SWT Browser flag | Browser | PDFJS | Result |
---|---|---|---|---|
Windows 7 | SWT.NONE | IE 11 | All versions | PDF is not rendered In standalone IE 11 PDF 1.5.188 works but not embedded in SWT |
SWT.MOZILLA | XulRunner 24 | 1.2.109 | OK | |
1.4.20 | Not tested | |||
1.5.188 | Not tested | |||
XulRunner 31 | 1.2.109 | Not tested | ||
1.4.20 | OK | |||
1.5.188 | OK | |||
Ubuntu 14.04.1 | SWT.NONE | GTK WebKit | 1.2.109 | PDF is not rendered |
GTK WebKit | 1.4.20, 1.5.188 | PDF rendered but VM crashes when resizing browser widget | ||
SWT.MOZILLA | XulRunner 24 | 1.2.109, 1.5.188 | OK | |
1.4.20 | Rendered but images missing | |||
XulRunner 31 | All versions | Browser widget cannot be created. Known bug. | ||
Windows 10 | Not systematically tested yet. SWT.MOZILLA + XulRunner 24 + PDFJS 1.2.109 works |