下面代码,打印图片,为什么打印机没有反应?或者设计一个打印一组图片的打印功能
(java实现,详情联334264003@
)public class DrawImage {
public static void drawImage(String fileName){
try {
DocFlavor dof = null;
if(
dof =
}
else if(
dof =
}
else if(
dof =
}
FileInputStream fin = new FileInputStream(fileName);
PrintRequestAttributeSet pras = new HashPrintRequestAttributeSet();
Copies(1));
PrintService pss[] =
if( == 0){
return ;
}
PrintService ps = pss[0];
image...");
DocPrintJob job =
Doc doc = new SimpleDoc(fin,dof,null);
PrintService service = 50, 50, pss, ps, dof, pras);
if(service!=null){
pras);
}
}catch(IOException ie){
}catch(PrintException pe){
}
}
public static void main(String[] args) {
drawImage( + "打磨前
}
}
雇主
发布需求
威客
报名竞价
雇主
选择中标
雇主
托管赏金
威客
在线工作
雇主
验收付款
任务圆满完成
为保障雇主与服务商的共同权益,任务结束后稿件详情将不对外展示!