Results 1 to 1 of 1
Thread: printing problem
- 11-27-2007, 11:20 AM #1
Member
- Join Date
- Nov 2007
- Posts
- 1
- Rep Power
- 0
printing problem
try{
DocPrintJob job=null;
PrintService[] services = PrintServiceLookup.lookupPrintServices(null, null);
PrintService svc = PrintServiceLookup.lookupDefaultPrintService();
PrintRequestAttributeSet attrs = new HashPrintRequestAttributeSet();
PrintService selection = ServiceUI.printDialog( null, 100, 100, services, svc, null, attrs);
job = selection.createPrintJob();
DocFlavor flavor =DocFlavor.BYTE_ARRAY.AUTOSENSE;
SimpleDoc doc = new SimpleDoc(data.getBytes(), flavor, null); //doc1
job.print(doc,attrs);
}
catch(Exception e5)
{
System.out.println("thr? is error in url");
e5.printStackTrace();
}
actually i m on applet i have string in hand to print ,actually when i use this code to print on generic printer ,it is fine but when i try to do same with laser printer (ML-1610 samsung ),a temporary document is created for print in spooler ,and then my printer gets some indication,then roller moves for a while
then printer show that document is printed but no printouts are there
can u plz help me out .
:mad:
Similar Threads
-
Problem after Printing GUI.
By coldblood22 in forum AWT / SwingReplies: 1Last Post: 04-05-2008, 02:43 PM -
Printing (no dialog)
By Java Tip in forum Java TipReplies: 0Last Post: 02-04-2008, 09:36 AM -
Problem in printing java graphics
By Mahendra in forum Java 2DReplies: 0Last Post: 01-23-2008, 12:45 PM -
Printing using java
By ramachandran in forum Advanced JavaReplies: 1Last Post: 01-05-2008, 10:16 AM -
[Java Printing]
By remnahush in forum Advanced JavaReplies: 1Last Post: 11-08-2007, 03:28 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks