CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2009
    Posts
    1

    printer get printed in the server instead of printing in the client

    I am using jBoss server .
    when we are giving print from the client it does not print in client but its get print in the server.. i don't know how to redirect it...so help me...

    this is the piece of code::

    PrintRequestAttributeSet printRequestAttributeSet = new HashPrintRequestAttributeSet();
    printRequestAttributeSet.add(OrientationRequested.PORTRAIT);
    printRequestAttributeSet.add(MediaSizeName.ISO_A4);
    PrintServiceAttributeSet printServiceAttributeSet = new HashPrintServiceAttributeSet();
    printServiceAttributeSet.add(new PrinterName("HP LJ P3005", null));
    exporter = new JRPrintServiceExporter();
    exporter.setParameter(JRPrintServiceExporterParameter.PRINT_REQUEST_ATTRIBUTE_ SET, printRequestAttributeSet);
    exporter.setParameter(JRPrintServiceExporterParameter.PRINT_SERVICE_ATTRIBUTE_ SET, printServiceAttributeSet);
    exporter.setParameter(JRPrintServiceExporterParameter.DISPLAY_PAGE_DIALOG, Boolean.FALSE);
    exporter.setParameter(JRPrintServiceExporterParameter.DISPLAY_PRINT_DIALOG, Boolean.FALSE);

  2. #2
    dlorde is offline Elite Member Power Poster
    Join Date
    Aug 1999
    Location
    UK
    Posts
    10,163

    Re: printer get printed in the server instead of printing in the client

    If the code is running on the server, how on Earth is it supposed to know that the client even has a printer, let alone how to print to it? The client needs to tell the server that it has a printer and give it the printer details.

    The sooner you start to code, the longer the program will take...
    R. Carlson
    Please use [CODE]...your code here...[/CODE] tags when posting code. If you get an error, please post the full error message and stack trace, if present.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured