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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I print from a clipper program from Windows XP?

Status
Not open for further replies.

StephenBig

Programmer
Sep 26, 2007
1
AU
We have a program written in Clipper and I cant get it to print. I am using a USB port for my printer. Anyone out there that can help?
 
Hi, StephenBig

This link (a bit out of date) is still a good discussion of the overall problem and gives some possible solutions:


You can also look into xHarbour, which does have the ability to access windows printers directly, but may require some effort to port your app to that environment.

If I need to stay with Clipper, I usually change the prog to print to a disk file and then shell out to Wordpad to display the report, but that may not be appropriate for your app.

Jock
 
You might try printing to a file.. close it.. Then use NOTEPAD <file> /print

Always prints to the default printer..and uses the last font saved in NOTEPAD..

You can get fancy and use WORDPAD or WORD as well.

Recently I had to generate HTML from the clipper and used WORD to print it out.. the output was fantastic..the time to gen the HTML wasn't too bad as I was able to create an HTML template..change data in the template (with CLIPPER) and send that to WORD to print with a MACRO..

Almost looks like an integrated system !
 
Hi,

Share your printer in windows

Make a .bat file:

net use lpt1: \\computername\printershared /persistent:yes
clipperfile.exe (your exe)
net use lpt1: \\computername\printershared /delete

If print slow, regedit HKLM\SYSTEM\CURRENTCONTROLSET\CONTROL\WOW
Key LPT_Timeout=15 (seconds) to LPT_Timeout=1 (second)

Bye,

Luis
 
I use a program called Dosprn. License (one) costs about 10$ but for 5, 10, ... you get discount. It stays resident and enable you to print to any windows prinetr driver. You can even define new esc/p2 codes and relate to them formating rules. You can translate characters (useful for translation of national chars). Worth looking for. If you add a pdf printer (pdfcreator is free) you can print to pdf and send printouts by e-mail.
good luck
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top