How to run PDF Viewer in a browser
Technology moves on as ever at a breakneck pace. One of the advantages of using Java in the early days was that it provided a safe and platform-independent way to provide graphical program functionality, both on the desktop and also in the browser via applet technology. As with Flash, though, the complex security issues surrounding applets eventually proved too difficult for browser manufacturers and developers to keep up with and they became obsolete.
For some time now many of our clients using the BFO PDF Viewer have run it exclusively on the desktop or via Java Web Start, which mandates a Java Virtual Machine on the client machine to run it in, and having to manage different versions of both the PDF Viewer and the JVM deployed around the enterprise creates additional work for system administrators. In this article we look at how you can use Webswing to run a set of instances of the PDF Viewer application on a server, and have clients use the program exclusively via a standard browser, negating all the client software deployment issues and bringing back the advantages of applet technology without the security concerns.
What is Webswing?
As such, a Java virtual machine is certainly required on the server, and only certain Java versions and implementations are supported. In addition a windowing environment, even if headless, is also required to manage certain AWT details such as fonts. However the complexity of managing the software installed on just this one machine is massively simplified in comparison to having to manage that for an arbitrary number of client machines which can all use standard modern browsers. In addition to the flexibility of client devices (which can now of course include mobile devices such as smartphones and tablets as well as desktops), given that the server component is 100% Java the server can run a wide choice of operating systems as well.
What does PDF Viewer in the browser look like?
You can explore the look, feel, and functionality of PDF Viewer in the browser via Webswing in our online demo. Essentially it looks exactly the same and has all the same functionality as the desktop version. You can choose to limit the available documents programmatically, or allow your users to open and save their own documents in the own client filesystems.
How can I run PDF Viewer using Webswing?
For the most part it is as easy as following the Webswing installation documentation and adding PDF Viewer as an app. We do have a number of useful tips for deployment however, so if you are planning to do this please get in touch with us and let us know exactly how you want the PDF Viewer to appear to clients, which features should be enabled, and especially whether you plan to deploy the server standalone or inside a servlet container.