alexbrainman / printer

Windows printing
BSD 3-Clause "New" or "Revised" License
228 stars 80 forks source link

any "hello world" for it? #3

Closed gm100861 closed 6 years ago

gm100861 commented 6 years ago

Hello, i was build https://play.golang.org/p/tI-7R98hHa , and it was does't work. i can see task to printer, but printer not work. any one can help me?

my os is windows 10, go version go1.9.2 windows/amd64 my printer is network printer.

alexbrainman commented 6 years ago

but printer not work. any one can help me?

Your printer must be able to understand the data in the file that you have printed. What is in the file? Can you try and print plain text file?

Alex

gm100861 commented 6 years ago

C:\isos\go>go build pdemo.go C:\isos\go>echo "hello, printer" > c:/isos/demo.txt C:\isos\go>pdemo.exe c:/isos/demo.txt

then, i found the system log. like this honway 拥有的文档 打印文档 无法在打印机 HP LaserJet M1120 MFP Class Driver 上打印。请尝试再次打印文档,或重新启动后台打印程序。 数据类型: RAW。后台文件大小(以字节为单位): 22。打印的字节数: 22。文档页面总数: 1。打印页面总数: 0。客户端计算机: \DESKTOP-20JA7BH。打印处理器返回的 Win32 错误代码: 2147500037。未指定的错误

i google error code 2147500037, but not found any solution

alexbrainman commented 6 years ago

then, i found the system log. like this

I do not understand what it says.

but not found any solution

I am not sure if it will help, but I would try this PR https://github.com/alexbrainman/printer/pull/2 Other than that I do not know. Sorry.

Alex

alexbrainman commented 6 years ago

@gm100861 please try https://github.com/alexbrainman/printer/tree/fix1 to see if that fixes your problem.

Thank you.

Alex