使用java,去掉异常处理,就这么简单
FileOutputStream ostream = new FileOutputStream("\\\\host\\share");
PrintStream printStream = new PrintStream(ostream);
printStream.print("HELLO PRINTER");
printStream.close();
ostream.close();
最佳答案
File.open("\\\\host\\share") do |f|
f.print("HELLO PRINTER#{12.chr}")
end
关于windows - 如何从 ruby 将原始打印机代码写入 Windows 打印机共享?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/404975/