Accounts Report to be printed in USB Laser Printer

Solution as  to  how  to  make  Accounts  software  print  in  USB  hp laserjet  1020 printer.

Prepared by

Girija SA Tirupur HPO Mobile;9486596214

Solution

  • DOS based applications like FoxPro doesn't detect an USB printer.

One way of directing output to USB is by using net use at command line,We will use a little trick to work out.
  1. We fist share our printer with a share name within 8 digit name.
  2. Because DOS didn't support more than 8 characters.
  3. Then we will use above command.
  4. But we need to ensure that we will use text print only.

Now follow these instructions

  1. Share your USB printer and give its name at printer share name
  2. Open the printer properties, select ADVANCE tab select Print Processor
  3. Select TEXT and save the change.

Now use net use command
NET USE LPT1 \\computer name\printer share name/persistent:yes
At the command prompt type DIR >PRN this must give you print from USB printer,then try printing from your application.

That's all,  now you can write a small batch file to active the printer every time before you go to FoxPro or any other DOS program. 

Note : After Create Batch file using above command line, Just create shortcut the same in Start to activate printer automatically.