Question about Computers & Internet

2 Answers

USB printing through DOS mode


I am working as a VB6 programmer.

To print a .txt file through DOS mode i am using a batch file with code
copy mydoc.txt to prn:
But it is not working in USB port printers.

Plz send me the VB6 code for printing a text file using USB printers.

Posted by on

  • naga_rajan06 Jul 12, 2008

    Problem: USB printing through DOS mode
    posted by naga_rajan06 on 07/12/2008


    I am working as a VB6 programmer.

    To print a .txt file through DOS mode i am using a batch file with code
    copy mydoc.txt to prn:
    But it is not working in USB port printers.

    Plz send me the VB6 code for printing a text file using USB printers.

  • KrishnaKMR May 11, 2010

    I am working as a VB6 programmer. To print a .txt file through DOS mode i am using a batch file with code copy mydoc.txt to prn: But it is not working in USB port printers. Plz send me the VB6 code for printing a text file using USB printers.

×

2 Answers

  • Level 2:

    An expert who has achieved level 2 by getting 100 points

    MVP:

    An expert that got 5 achievements.

    Novelist:

    An expert who has written 50 answers of more than 400 characters.

    Scholar:

    An expert who has written 20 answers of more than 400 characters.

  • Expert
  • 160 Answers

Google for DOS PRINT USB, and you'll find some utilities that do this.

Or, you can include some commands in your batch file.

First, get the device name:

In a DOS window, type NET VIEW ComputerName (or use 127.0.0.1)

Once you know the printer share name, you use it in a batch file.

NET USE lpt1: \\ComputerName\ShareName /Persistent:Y

This captures the print queue to the shared printer.

You must also go into Printer Properties/Advanced/Print Processor and set it to TEXT

Your copy, print and other commands will work.

Posted on Jul 18, 2008

  • Level 1:

    An expert who has achieved level 1.

  • Contributor
  • 1 Answer

1 Suggested Answer

6ya6ya
  • 2 Answers

SOURCE: I have freestanding Series 8 dishwasher. Lately during the filling cycle water hammer is occurring. How can this be resolved

Hi,
a 6ya expert can help you resolve that issue over the phone in a minute or two.
best thing about this new service is that you are never placed on hold and get to talk to real repairmen in the US.
the service is completely free and covers almost anything you can think of (from cars to computers, handyman, and even drones).
click here to download the app (for users in the US for now) and get all the help you need.
goodluck!

Posted on Jan 02, 2017

Add Your Answer

Uploading: 0%

my-video-file.mp4

Complete. Click "Add" to insert your video. Add

×

Loading...
Loading...

Related Questions:

1 Answer

Hi , We're trying to print the file to TLP 2844 using DOS commend : copy test.txt LPT1 , but the printer does not response . We installed the out-box driver and make the driver pointed to LPT1, It...


the only thing I see missing is the ":" after lpt1
ie - command should be copy test.txt lpt1:
you could also try using print test.txt
or type test.txt > lpt1:

Mar 18, 2011 | Zebra TLP 2844-Z Thermal Label Printer

3 Answers

How to create simple batch files


Creating a batch file
MS-DOS users
Microsoft Windows and other users

MS-DOS users
To create a basic batch file in MS-DOS, follow the below steps that give you an example of how to create a basic batch file.

  1. Open an MS-DOS command window or get to MS-DOS. Additional information about doing this can be found on document CHDOS.
  2. At the MS-DOS prompt, type: edit test.bat and press enter.
  3. If typed properly, you should now be in a blue screen. Within the screen, type:

    pause
    dir c:\windows
    dir c:\windows\system

  4. Once the above three lines have been typed in, click File and choose exit; when prompted to save, click "Yes." Users who do not have a mouse cursor can accomplish this same task by pressing ALT+F to access the file menu, then pressing "X" to exit, and pressing enter to save changes.
  5. Once you are back at the MS-DOS prompt, type: test and press enter. This will execute the test.bat file and begin running the file. Because the first line is pause, you will first be prompted to press a key. Once you press a key the batch file will run line-by-line; in this case, listing the files in the windows and windows\system directories.
If you wish to add more lines to this batch file you would simply type "edit test.bat" to edit the file again.
Additional information about the MS-DOS edit command can be found on our edit command page. Some versions of MS-DOS and bootable diskettes may not have the edit command; if this is the case, you would either need to obtain the edit.com file to access this file or use the copy con command.




Microsoft Windows and other users
A Windows user can still use the above MS-DOS steps if they wish to create a batch file. If, however, you're more comfortable using Microsoft Windows or your operating system, you can use any text editor, such as Notepad or Wordpad, to create your batch files, as long as the file extension ends with .bat. In the below example we use the Windows notepad to create a batch file.
  1. Click Start
  2. Click Run
  3. Type: notepad and press enter.
  4. Once notepad is open, type the below lines in the file or copy and paste the below lines into notepad.

    @echo off
    echo Hello this is a test batch file
    pause
    dir c:\windows

  5. Click File and click Save; browse to where you want to save the file. For the file name, type "test.bat", and if your version of Windows has a "Save as type" option, choose "All files", otherwise it will save as a text file. Once all of this has been done click the Save button and exit notepad.
  6. Now, to run the batch file, simply double-click or run the file like any other program. Once the batch file has completed running it will close the window automatically.

Jan 04, 2011 | Computers & Internet

2 Answers

Send a .txt file (zpl language to COM1) to theTLP 2824-Z.


Help!!! I can not print barcode with DOS-command "copy barcode.txt com1". DOS Version is 6.1.7600. The printer zebra TLP 2844 does not recognize the EPL commands.

j.zh

Jul 28, 2009 | Zebra TLP 2844-Z Thermal Label Printer

1 Answer

Posted by rhung33 on Jan 16, 2009 Under Window DOS prompt and Unix Sun Solaris 8 Station , using LPR -p command to print txt file to cause Lexmark T644 printer '' Flushing buffer '' and...


The printer can't handle the data it received and flush it out of its buffer. Goto Menu->Settings->Postscript Settings and turn "Print PostScript Erro" on. When the same print job prints, you should get a page printed out telling you what the printer doesn't like. You may also want to try forcing the printer into Postscript mode. Your PS file probably contains a PJL to set the device to PS mode before it prints. When the printer expects PCL data and received PS data(or vise versa), you can get this behaviour

Jan 16, 2009 | Lexmark T644 Laser Printer

1 Answer

Zebra printers & MS Word


HI Les1810,

You should be printing faster with Zebra fonts.
Which driver are you using? Version?
I strongly recommend the Zebra Designer V1.3.08, available at Zebra.com

To isolate the problem, capture the output to a file.
Define a local port as C:\output.txt and set that as the port in driver properties.
Now print your document. The printer commands will be in C:\output.txt.

Send c:\output.txt directly to your printer.
For LPT1, use the DOS copy command to send the file. (Copy C:\output.txt LPT1)
For serial connections, use Hyperterm to send the file.
For network connections, use ftp.
No easy USB method is readily available.

Does this print faster than printing the original document from Word through the driver?
If yes, then update your driver.
If no, debug your communication to the printer (LPT1, serial, network, etc.)

Sep 24, 2008 | Zebra TLP 2844-Z Thermal Label Printer

1 Answer

Help me with Zebra TLP 2844


The printer only understands EPL code. (Eltron Programming Language) If you are trying to print text from DOS it wont understand (interpret) the txt codes.

To verify that the printer is working.

Open a DOS box, start the dos editor. Type Edit. Dos editor will open.


Type a single capital letter U. and print. Send to printer. The printer will print a configuration label.

EPL code to reset printer is

^default.


If you want to print a text file. use the Zebra Universal Driver. Zebra TLP2844. Open any windows application. E,G, Notepad. type text and send it to printer. Print as normal.

Jul 24, 2008 | Zebra LP 2844 Thermal Printer

1 Answer

NET WORK DOS PRINT


1.
copy [disk][path][filename] print

2.
print [disk][path][filename]

Example:
copy c:\log.txt print
print c:\log.txt

Jan 12, 2008 | Microsoft Windows XP Professional With...

2 Answers

Printing from Dos Prompt


1. Save your text file (.txt).

2. On the command prompt navigate to that directory

3.Type "Lpr -S 192.168.1.200 -P lp text.txt"

Substitute 192.168.1.200 for your copier's ip

Substitute text.txt to filename.

 

Or you can: to print from MS-DOS apps.

1. Share the printer on a networked windows computer. Make sure you make the name MS-DOS compatible.

2. At a DOS prompt, type the following command:
"net use lpt1: \\servername\printer_share/persistent:yes"

NOTE Servername=computer name

printer_share=printers share name

 

Sep 28, 2007 | Office Equipment & Supplies

1 Answer

Can I print in Dos Programme with USB Printer


Assuming the printer can understand DOS coded printouts (which most should be able to), you can do it like this: Go to Control Panel | Printers | ML 2010 and share the printer. Then go to a command prompt Start | Run | type cmd Assuming that you share it with the share name "MYPRINTER" and the computer is called "MYCOMPUTER", then type NET USE LPT2: \\MYCOMPUTER\MYPRINTER /PERSISTENT:YES at a command prompt. Now you can print to LPT2: and the output will go to the USB-connected printer. To find your computer name, right click on the My Computer icon (either on your desktop or the start menu) and choose properties. The window that opens will have a Computer Name tab.

Mar 22, 2006 | Samsung ML 2010 Laser Printer

Not finding what you are looking for?
Computers & Internet Logo

Related Topics:

1,475 people viewed this question

Ask a Question

Usually answered in minutes!

Top Computers & Internet Experts

Brian Sullivan
Brian Sullivan

Level 3 Expert

27725 Answers

kakima

Level 3 Expert

102366 Answers

David Payne
David Payne

Level 3 Expert

14161 Answers

Are you a Computer and Internet Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides

Loading...