0 Replies Latest reply on Sep 2, 2011 3:07 PM by 886014

    Print - custom size

      Hi all

      I'm developing an application that print barcodes on a label printer.
      The application use jasper report to generate the barcode, and then print it on a 110x40mm label.

      Everithing works fine if the printer is the default system printer.

      But, if I change the default system printer, and select the printer by printService class, the label printer print a wrong size for the label.

      This is the code:
      JRPrintServiceExporter exporter;
      exporter = new JRPrintServiceExporter();
      exporter.setParameter(JRExporterParameter.JASPER_PRINT, print);

      exporter.setParameter(JRPrintServiceExporterParameter.PRINT_SERVICE, printService);
      exporter.setParameter(JRPrintServiceExporterParameter.PRINT_SERVICE_ATTRIBUTE_SET, printService.getAttributes());


      I guess that the problem depends on printRequestAttributeSet.
      I tryied to set different media size on it, but nothing seems to work.

      I also tryied to set the parameters with print dialog, with no result

      Can you please help me?

      Best Regards,

      Edited by: 883011 on 2-set-2011 8.05