|
|
Re: Automate report print without manual intervention [message #1199517 is a reply to message #1199493] |
Wed, 20 November 2013 22:01 |
rd w Messages: 3 Registered: November 2013 |
Junior Member |
|
|
actual requirement is to print different reports from papers kept in different printer tray.
i was not able to select printer tray through code .. so i created virtual instances of the printer with the idea of sending each report to a different instance of the printer.
for some reason postscript was not supported in the birt ( from maximo - birt 3.7.1 ). i m using pdf, html emitters
//Code:
selectedPrinter=PrintServiceLookup.lookupDefaultPrintService();
inputStream = ByteArrayInputStream(reportOutput);
aset=HashPrintRequestAttributeSet()
aset.add(MediaTray.MIDDLE)
job = service.createPrintJob( )
doc = SimpleDoc( inputStream,DocFlavor.INPUT_STREAM.POSTSCRIPT, null )
job.print( doc,aset )
--
This code throws an exception saying invalid docflavor
[Updated on: Wed, 20 November 2013 22:17] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.03953 seconds