I am using JasperReports 5.6
I generate pdf using PDFCreator.
My pdf is generated successfully, but i can't set name to that PDF file.
PrintRequestAttributeSet printRequestAttributeSet = new HashPrintRequestAttributeSet();
printRequestAttributeSet.add(MediaSizeName.ISO_A4);
PrintServiceAttributeSet printServiceAttributeSet = new HashPrintServiceAttributeSet();
printServiceAttributeSet.add(new PrinterName("PDFCreator", null));
JRPrintServiceExporter exporter = new JRPrintServiceExporter();
exporter.setExporterInput(new SimpleExporterInput(tempFileName));
SimplePrintServiceExporterConfiguration configuration = new SimplePrintServiceExporterConfiguration();
configuration.setPrintRequestAttributeSet(printRequestAttributeSet);
configuration.setPrintServiceAttributeSet(printServiceAttributeSet);
configuration.setDisplayPageDialog(false);
configuration.setDisplayPrintDialog(false);
exporter.setConfiguration(configuration);
exporter.exportReport();
My pdf name are set using that PDFCreator tool
I want to pass the name to that pdf file.
Since exporter.setParameter(JRExporterParameter.OUTPUT_FILE_NAME, "d:/adc.pdf");
method is now deprecated.
Please tell me solution how to set that out file name