CSP: Print All PDF Reports, Java Applet not Supported Anymore, How to Migrate to Java Web Start (JNLP)
Hi all-
We used to have this Java applet in our CSP page to "print all" and "download all" PDF medical reports. We want this applet so that the user won't have to open each PDF in the browser just to print it.
But now most browsers do not support Java applets anymore due to security concerns, so that Java application is down. We tried to migrate to Java Web Start but don't know how to invoke the JNLP file from the CSP page. I am new to Cache so any help would be greatly appreciated.
Also, is there an easier solution to this print all problem? I assume many hospitals/labs would be facing the same issue, so there might be a smart hack?
Thomas, I am working on the same problem. I will post a solution if and when I get one. And look for any support here to of course.
Thanks for the post Stefan
However, I have tried Firefox, Chrome, and IE. All of them gave me error saying Java plug-in is not supported.
Is there a smarter way to do the printing job?
Eduard,
Please correct me if I'm wrong. Suppose I have 20 PDF reports to print, in this way I'd have to open 20 new windows viewing each PDF and select printer. That doesn't sound very desirable.
I believe we had the Java applet to get us out from that situation.
Embedding a JLNP file in a CSP page is the same as in a plain HTML page. You have to embed and load the JLNP file using something like the following snippet:
In order to figure out the value for the jnlp_embedded parameter you have to base64 encode the contents of your JNLP file. The JNLP file has to be accessible from the relative link provided by the parameter jnlp_href.
This tutorial explains how to embed JNLP files:
http://docs.oracle.com/javase/tutorial/deployment/deploymentInDepth/embe...
Yes, there's no way to print multiple files from js with one dialogue.
You can merge all PDFs on server and print that.
I suppose you can also search for/develop browser extension to get around this particular feature of browser security model, but that's probably more work than merging.
You can use pure javascript to do that:
function PrintAll() { var files = ["file1.pdf", "file2.pdf", "file3.pdf"]; for (var i = 0; i < files.length; i++) { var newWindow = window.open(files[i], "print"); newWindow.print(); newWindow.close(); } }