Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-09-2009, 03:02 PM
Member
 
Join Date: Jul 2009
Posts: 1
Rep Power: 0
nvngyl is on a distinguished road
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);
}
Bookmark Post in Technorati
Reply With Quote
  #2 (permalink)  
Old 08-12-2009, 08:30 PM
Member
 
Join Date: Aug 2009
Posts: 4
Rep Power: 0
Bozz is on a distinguished road
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
Bookmark Post in Technorati
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
PDF Box issue jazz2k8 Advanced Java 0 03-20-2009 12:04 PM
Keeping track of Copies + Comparisons in Sort Methods VinceGuad New To Java 0 03-12-2009 05:07 AM
Session Issue jazz2k8 Advanced Java 2 11-05-2008 02:28 PM
Java mail problem(working in intranet,but not working in iternet) sundarjothi Advanced Java 8 05-28-2008 08:00 AM
Issue chaitu444 New To Java 2 11-06-2007 08:49 PM


All times are GMT +2. The time now is 06:43 PM.



VBulletin, Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2009, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org