Results 1 to 2 of 2
- 07-09-2009, 02:02 PM #1
Member
- Join Date
- Jul 2009
- Posts
- 1
- Rep Power
- 0
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);
}
- 08-12-2009, 07:30 PM #2
Member
- Join Date
- Aug 2009
- Posts
- 4
- Rep Power
- 0
Similar Threads
-
PDF Box issue
By jazz2k8 in forum Advanced JavaReplies: 0Last Post: 03-20-2009, 11:04 AM -
Keeping track of Copies + Comparisons in Sort Methods
By VinceGuad in forum New To JavaReplies: 0Last Post: 03-12-2009, 04:07 AM -
Session Issue
By jazz2k8 in forum Advanced JavaReplies: 2Last Post: 11-05-2008, 01:28 PM -
Java mail problem(working in intranet,but not working in iternet)
By sundarjothi in forum Advanced JavaReplies: 8Last Post: 05-28-2008, 07:00 AM -
Issue
By chaitu444 in forum New To JavaReplies: 2Last Post: 11-06-2007, 07:49 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks