#include
#include
int main()
{
char cmd[100];
int i;
//检查打印机的状态
sprintf(cmd, “lpstat -p”);
system(cmd);
//删除打印队列中的所有任务
sprintf(cmd, “cancel -a”);
system(cmd);
//清空Printer选择,方法一
sprintf(cmd, “lpoptions -d”);
system(cmd);
//清空Printer选择,方法二
for(i=1;i<=10;i++){
sprintf(cmd, "lpoptions -p Printer-%d -X", i);
system(cmd);
}
//清空Printer选择,方法三
sprintf(cmd, "lpoptions -r >/dev/null”);
system(cmd);
//检查打印机状态
sprintf(cmd, “lpstat -p”);
system(cmd);
return 0;
}
本文由作者笔名:逗号CMS 于 2024-08-06 01:45:01发表在本站,原创文章,禁止转载,文章内容仅供娱乐参考,不能盲信。
本文链接: http://www.lovelp.cn/wen/130737.html
上一篇
爱普生清零软件大全
下一篇
爱普生清零软件到哪里下载