Jump to content
  • JRPrintServiceExporter overrides default printer by explicitly setting PrintService


    Linuxhippy
    Assigned User teodord
    CategoryBug report
    PriorityNormal
    ReproducibilityAlways
    ResolutionOpen
    SeverityMinor
    StatusNew

    JRPrintServiceExporter explicitly sets the PrintService which should be used (code below).

    However this way the default printer defined by the OS is completly ignored - the print dialog will simply always show the first printer returned by lookupPrintServices instead of the default printer.

     

     

    // determining the print service only once

    printService = (PrintService) parameters.get(JRPrintServiceExporterParameter.PRINT_SERVICE);

    if (printService == null) {

    PrintService[] services = PrintServiceLookup.lookupPrintServices(null, printServiceAttributeSet);

    if (services.length > 0)

    {

    printService = services[0];

    }

    }

     

     



    User Feedback

    Recommended Comments

    There are no comments to display.


×
×
  • Create New...