In Control Panel my printer's port was configured to "FILE:".
For example, I can select a printer using PrintServiceAttributeSet
, but there is no way to set an output filename when printing. I don't use JRXlsExporter
or JRPdfExporter
or something like that, just JRPrintServiceExporter
.
PrintServiceAttributeSet printServiceAttributeSet = new HashPrintServiceAttributeSet();
printServiceAttributeSet.add(new PrinterName("Xerox DocuPrint 100 EPS PS3", null));
//...
exporter.setParameter(JRPrintServiceExporterParameter.DISPLAY_PAGE_DIALOG, Boolean.FALSE);
exporter.setParameter(JRPrintServiceExporterParameter.DISPLAY_PRINT_DIALOG, Boolean.FALSE);
//...
exporter.exportReport();
The driver outputs files in PostScript, but a window "Output file name" appears all the time. If I set a filename in the window manually, then printer prints to a file successfully.
Any idea how to set a filename programmatically?
javax.print.attribute.standard
» Destination helps.Solution: