Hi

I'm trying to get a silent print of my PDF report at client/browser. 
Unfortunately, I can't be quite successful in this. My silent print command 
comes to browser with the PDF document and when I open this there's a dialog 
stating "this document is trying to print", now if I click ok, the document 
gets printed. But I need to print the document silently without opening and 
without showing any dialog (not download dialog too).

 

The code block for setting exporter with silent print parameter is as follows:

OutputStream outputStream = new FileOutputStream(outputFile);
          exporter = new JRPdfExporter();
          exporter.setParameter(JRPdfExporterParameter.CHARACTER_ENCODING, 
"UTF-8");
          exporter.setParameter(JRExporterParameter.JASPER_PRINT, jp);
          
exporter.setParameter(JRPdfExporterParameter.PDF_JAVASCRIPT,"this.print({bUI: 
false,bSilent: true,bShrinkToFit: false});");
          exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, 
outputStream);
          exporter.exportReport();

 

Can anyone help me resolve this or at least let me know if it's possible or not?

 

Thanks

Rashed
------------------------------------------------------------------------------
Get a FREE DOWNLOAD! and learn more about uberSVN rich system, 
user administration capabilities and model configuration. Take 
the hassle out of deploying and managing Subversion and the 
tools developers use with it. 
http://p.sf.net/sfu/wandisco-dev2dev
_______________________________________________
jasperreports-questions mailing list
jasperreports-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jasperreports-questions

Reply via email to