0

I am using jBoss server .
when we are giving print from the client it does it print in client but its get print in the server.. i don't know how to redirect it...so help me...

this is the piece of code::

PrintRequestAttributeSet printRequestAttributeSet = new HashPrintRequestAttributeSet();
printRequestAttributeSet.add(OrientationRequested.PORTRAIT);
printRequestAttributeSet.add(MediaSizeName.ISO_A4);
PrintServiceAttributeSet printServiceAttributeSet = new HashPrintServiceAttributeSet();
printServiceAttributeSet.add(new PrinterName("HP LJ P3005", null));
exporter = new JRPrintServiceExporter();
exporter.setParameter(JRPrintServiceExporterParameter.PRINT_REQUEST_ATTRIBUTE_SET, printRequestAttributeSet);
exporter.setParameter(JRPrintServiceExporterParameter.PRINT_SERVICE_ATTRIBUTE_SET, printServiceAttributeSet);
exporter.setParameter(JRPrintServiceExporterParameter.DISPLAY_PAGE_DIALOG, Boolean.FALSE);
exporter.setParameter(JRPrintServiceExporterParameter.DISPLAY_PRINT_DIALOG, Boolean.FALSE);

2
Contributors
1
Reply
2
Views
7 Years
Discussion Span
Last Post by ~s.o.s~
0

> when we are giving print from the client it does it print in client but its
> get print in the server

This is because the code you have written gets executed on the server. In a typical web app setting, you don't [and shouldn't IMO] have control over the client environment. AFAIK, the best way would be to initiate a print request using Javascript and hope that the client has javascript enabled.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.