Can't print .prn file using cmd on network printer

WooCaSh picture WooCaSh · Jan 4, 2013 · Viewed 9.6k times · Source

I'm trying print prn file in my c# program. To do it I'm trying first find solution to command that allow me print prn file on network printer. So here is command that I'm actualy use:

print C:\test\test.prn > "\\10.0.2.152\Brother DCP-7065DN Printer"

I also try another command:

copy /B C:\test\test.prn "\\10.0.2.152\Brother DCP-7065DN Printer"

In both cases after few seconds cmd showing message:

Cannot find network path.

But both command work in case when I use PDFCreator as printer. So when I write \\developer3.idtt.local\PDFCreator instead of "\\10.0.2.152\Brother DCP-7065DN Printer" then file can be "printed".


Now some additional information:

  • developer3.idtt.local is a my full computer name.
  • 10.0.2.152 is ip adress of Brother printer and it answer on ping command.
  • Brother DCP-7065DN Printer is the target printer and it is checked as shared printer in preferences.
  • Printer port:

enter image description here enter image description here

Question:

How solve this problem? Are you have any idea why this printer cannot be find by cmd?

Answer

WooCaSh picture WooCaSh · Jan 4, 2013

Ok problem solved!

If I check print as shared printer you should call your computer name instead of printer IP. In my case correct command is:

copy C:\\test\\test.prn /B \\Developer3\TSC

where Developer3 is my computer name and TSC is shareName of printer. Also don't forget to use printer for this type of file (in my example I tested on thermal printer) otherwise you can got clear page.