Jump to content
Changes to the Jaspersoft community edition download ×

JRPrintServiceExporter: print without margins


toschm

Recommended Posts

I am using Java with JasperReports. I have designed my Report with iReport and generate it from JavaCode. That is all working perfect. My Problem is in the directly printing.

The normal print is no Problem. For example:

PrintRequestAttributeSet printRequestAttributeSet = new HashPrintRequestAttributeSet();printRequestAttributeSet.add(MediaSizeName.ISO_A4);printRequestAttributeSet.add(new Copies(1));PrintServiceAttributeSet printServiceAttributeSet = new HashPrintServiceAttributeSet();printServiceAttributeSet.add(new PrinterName(PrintServiceLookup.lookupDefaultPrintService().getName(), null));//…JRPrintServiceExporter exporter = new JRPrintServiceExporter();exporter.setParameter(JRExporterParameter.JASPER_PRINT, print);exporter.setParameter(JRPrintServiceExporterParameter.PRINT_SERVICE_ATTRIBUTE_SET, printServiceAttributeSet);exporter.setParameter(JRPrintServiceExporterParameter.PRINT_REQUEST_ATTRIBUTE_SET, printRequestAttributeSet);exporter.setParameter(JRPrintServiceExporterParameter.DISPLAY_PAGE_DIALOG, Boolean.FALSE);exporter.setParameter(JRPrintServiceExporterParameter.DISPLAY_PRINT_DIALOG, Boolean.FALSE);            try{   exporter.exportReport();}//…[/code]

 

My wish is to print without any margin on paper. My Printer can print without margins and if I show the printdialog I can configure to print without margins. But without the printdialog I can’t configure this.

Do anyone have an idea to print (from side of printer) without margins?

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...