String str="测试字符串";
DocFlavor flavor=DocFlavor.BYTE_ARRAY.AUTOSENSE;
PrintRequestAttributeSet pras = new HashPrintRequestAttributeSet();
byte by[]=str.getBytes();
DocPrintJob job=defaultService.createPrintJob();
DocAttributeSet das = new HashDocAttributeSet();
Doc doc=new SimpleDoc(by,flavor,das);
job.print(doc,pras);当执行打印后,并不能同时用打印机上打印出来,必须按打印机上的走纸键才能打印出来,这是不是打印不同步?各位大大,怎样才能同步执行?是程序问题?还是硬件问题?再者,当我打印出来时,字符串,是在A4纸的第一行中间,不是应该从纸张的最左边开始打吗?
各位大大帮帮忙,小弟急求!!!