Copy File To Network Printer Port

Active4 years, 4 months ago

I have an Epson TM-T88V network printer. I can print to it using the printer driver. But I need to copy a 'print file' to the printer using the command line, and this causes problems. If, however, multiple files need to be printed, using the copy command can also be used, as shown below. COPY /B *.TXT > LPT1 The above example uses the copy command to copy all txt or text files in the current directory to the LPT1 port. Copy file to USB002 printer using commandline in windows. I am looking for a way to copy the file 'test.txt' to my usb printer which connected via USB002 port.

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:

I also try another command:

In both cases after few seconds cmd showing message:

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

Software para resetear epson t50. Jan 31, 2013  RESETEAR LA IMPRESORA EPSON T50 Comparto el programa para resetear la impresora EPSON T50: Modo de reseteo: - Ejecutar AdjProg.exe - Clic en Accept.

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:

Question:

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

WooCaShWooCaSh
4,6273 gold badges32 silver badges54 bronze badges

1 Answer

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:testtest.prn /B Developer3TSC

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.

WooCaShWooCaSh
4,6273 gold badges32 silver badges54 bronze badges
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.

Not the answer you're looking for? Browse other questions tagged printingcopycmdnetwork-printers or ask your own question.

Copy To File From Printer

Active9 months ago

I have currently-working code which sends raw data to a printer by writing a temporary file, then using File.Copy() to send it to the printer. File.Copy() supports both local ports, like LPT1 and shared printers like FRONTCOUNTERLabelPrinter.

However, now I'm trying to get it working with a printer that's directly on the network: 192.168.2.100, and I can't figure out the format to use.

I know it's possible to 'Add a printer' from each computer, but I'm hoping to avoid that - the second line of code above works from any computer on the network automatically, with no configuration required. I also know it's possible to P/Invoke the windows print spooler, and if that's my only option I may take it, but that's much more code overhead than I'd like to have.

Ideally, someone will have either a way to make File.Copy() work or a similar C# statement which will accept a network IP.

Bobson
BobsonBobson
10.7k4 gold badges38 silver badges71 bronze badges

2 Answers

Iseries Copy File To Network Drive

You can use sockets and send the data straight to that IP address. Should pretty much be the same as File.Copy. I just tried it out and that worked.

I just sent some text but here is the code that I used

Kirk BackusKirk Backus
3,7284 gold badges24 silver badges49 bronze badges
saeid mohammad hashemsaeid mohammad hashem
9451 gold badge12 silver badges14 bronze badges

Copy File To Network Printer

Not the answer you're looking for? Browse other questions tagged c#printingnetwork-printers or ask your own question.