Results 1 to 2 of 2
  1. #1
    nvngyl is offline Member
    Join Date
    Jul 2009
    Posts
    1
    Rep Power
    0

    Default PS Prinitng Issue - Copies not working

    I have a postscript printer (Driver) installed on my machine and it supports copies, n-up etc. But when i print using JPS, PrintRequestAttributeSet has no effect on printing. please find the code below and let me know if i am doing anything wrong:

    DocFlavor flavor = DocFlavor.INPUT_STREAM.POSTSCRIPT;
    PrintService[] pservices = PrintServiceLookup.lookupPrintServices(flavor, null);
    PrintRequestAttributeSet aset = new HashPrintRequestAttributeSet();
    aset.add(new Copies(2));
    PrintService[] pservices = PrintServiceLookup.lookupPrintServices(flavor, null);
    if (pservices.length > 0)
    {
    DocPrintJob pj = pservices[0].createPrintJob(); // printer is at 0th index
    FileInputStream fis = new FileInputStream("C:\\Test\\2.ps");
    Doc doc = new SimpleDoc(fis, flavor,null);
    pj.print(doc, aset);
    }

  2. #2
    Bozz is offline Member
    Join Date
    Aug 2009
    Posts
    4
    Rep Power
    0

    Default

    Same type of issue here.

    Setting "DUPLEX" neither "Tray x" selection works.

    Who can shed some light on this ?

    Printing with attributes shouldn't be to hard.

    Thanks in advance

Similar Threads

  1. PDF Box issue
    By jazz2k8 in forum Advanced Java
    Replies: 0
    Last Post: 03-20-2009, 11:04 AM
  2. Keeping track of Copies + Comparisons in Sort Methods
    By VinceGuad in forum New To Java
    Replies: 0
    Last Post: 03-12-2009, 04:07 AM
  3. Session Issue
    By jazz2k8 in forum Advanced Java
    Replies: 2
    Last Post: 11-05-2008, 01:28 PM
  4. Replies: 8
    Last Post: 05-28-2008, 07:00 AM
  5. Issue
    By chaitu444 in forum New To Java
    Replies: 2
    Last Post: 11-06-2007, 07:49 PM

Posting Permissions

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