Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

programming

Status
Not open for further replies.

memphis1969

Programmer
Feb 26, 2004
3
US
This is my problem.....I have a printer with USB cord connected in my computer, how can i send a printing instruction code from Clipper in the USB port...? Or could you tell me another way to do it...?
 
It is from the foxpro forum but you can use it.
Perhaps the code needs some adjustments...
Rob.


I have found this PrintFile available as free download in the following link... working excellent.

Read the readMe file provided with that. YOu can set the command line options.. to use that as an automatic print spooler. Any file put in the specified spooler directory will be picked up and printed by the PrintFile.

So what I did, is to check for a Variable in my programme and use the spooler if opted... example...

IF lUsePfile
myTxt = "C:\mySpoolDir\"+sys(3)+".txt"
REPORT FORM myReport NOEJECT TO FILE (myTxt)
ELSE
REPORT FORM myReport NOEJECT TO PRINT
ENDIF

PrintFile will print the text file and then delete it as well.

In the above example I setup the spooler to take the default as .txt.... while its default is .ps

You can manipulate all these suitably. You can even print in Landscape with two pages in a single A4.


THE ADVANTAGE IS THAT YOU CAN START USING USB PRINTERS AND 'WINDOWS PRINTERS' IN FOXPRO DOS.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top