Using the Java API for AEM Forms output services (documentation available at http://helpx.adobe.com/aem-forms/6/javadocs/com/adobe/fd/output/api/OutputService.html) I am able to create the Postscript document. The problem I am facing is that, I do not know how to handle the Postscript returned to the browser. The returned postscript document when opened in the browser with window.open() gives a big text file as shown in the attached file.
I would like the browser to prompt to send this generated postscript to a printer.
The code that I used to generate the postscript is as follows