Jump to content
Changes to the Jaspersoft community edition download ×

Print Job Listener JRPrintServiceExporter


Recommended Posts

By: pen123 - pen123

Print Job Listener JRPrintServiceExporter

2006-05-31 14:08

We are trying to print reports on a remote printer using JRPrintServiceExporter class.

 

As per our project requirement we should know whether print is successful or queued etc.

 

JRPrintServiceExporter and internally JRGraphics2DExporter classes use JRExportProgressMonitor to monitor the print jobs. However the montitoring capabilities are very limited.

 

Java printing api provides these capabilities through javax.print.event.PrintJobListener interface. Currently we are passing the following paramters to exportReport method on JRPrintServiceExporter class.

JRAbstractExporter exporter = new JRPrintServiceExporter();

exporter.setParameter(JRExporterParameter.OUTPUT_FILE_NAME, getDeliverable().getAccessionNbr());

exporter.setParameter(JRPrintServiceExporterParameter.PRINT_SERVICE, service);

exporter.setParameter(JRExporterParameter.JASPER_PRINT, ite.next());

exporter.exportReport();

 

The PrintJob is internally created and from our application we can not get handle on it. Is there any way we can pass PrintJob also as parameter to exportReport method?

 

If we can do that, we can register Listenerm before invoke the Jasper Print Service.

 

 

Please let me know your ideas.

 

thanks

LP

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...