Is it possible to use the Mozilla pdf.js in Servoy for showing PDF files? If yes, what is the best way to integrate it in Servoy?
web or smart-client?
mboegem:
web or smart-client?
Smart Client, but in Web Client it should also work.
PDF.js works in svyJFXWebView, albeit slowly. I guess the WebKit version underlying the JavaFX WebView component that is wrapped in svyJFXWebView doesn’t have the JavaScript performance optimizations yet to make it fast (same issue as when using PDF.js in some (somewhat) older browsers)
Wrapping PDF.js in such a way that you can easily use it in both the Smart and Web Client is exactly what svyComponent was created for. Better to wait a couple of weeks before digging into that through, because the documentation for svyComponent is not yet available.
Paul
deezzub:
Smart Client, but in Web Client it should also work.
pdf.js is using a HTML5 canvas to draw the pdf.
Because by default Java is not capable of showing this kind of advanced HTML, the smart-client is not able to do this when running with Java 6 .
In that case you need to use the jPedal bean which can preview PDF’s.
Smart-clients using Java 7 can benefit of the recently exposed open source module ‘svyJFXWebView’. (viewtopic.php?f=68&t=20132),
but will also be able to use the jPedal bean
In web client it should be possible to use the pdf.js by injecting the code.
The only restriction you’ll have is the browser, which should be capable of displaying this kind of HTML5 content.
Using the jPedal bean is not possible here.
Thanks Paul and Marc, for your informations. I try it. We are looking for a jPedal alternative, because of the error: java.lang.ClassNotFoundException.