Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dot Matrix printer with Condensed font
Message
From
11/11/1999 13:28:51
 
 
To
09/11/1999 21:43:22
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00250520
Message ID:
00290211
Views:
33
>Hi Rob,
>
>PMFJI, but I am faced with a similar problem as Peter. I'm rewriting a dos app that prints to a form in 12 pitch throughout the each form. The forms are irregular size, about 5 inches long and 8.5 wide. I seem to remember when I was messing around printing to a dot matrix printer from windows before, that the printing was really slow.
>
>My question is, how in the world do you use the benefits of using the Windows Print drivers, and still be able to print fast to a dot matrix AND be able to use the WYSIWYG design in the VFP Report Designer? Is this even possible?
>
>If it's not possible, what are the best alternatives in your opinion?
>
>In the original project which I wrote years ago in dos, I created a printers table containing about 20 or so common printers with each of their respective known control codes, a task I didn't enjoy the first time and while I still have the codes that I've been using, there are new printers and hence new codes. In this project as I said before, I'm only sending the control code to print in 12 Pitch, but that could change as time goes on.
>
>Thanks for any help you can give me. -Rick
>
>>I suspect you are running into the usual 'windows takes control of your entire existence' problem... It is virtually impossible to send output directly to the printer using the windows printer drivers. If you really don't want to convert your hard-coded reports to FRXs, you might try the following: Direct your output to a text file (with the embedded printer control codes) and then send it directly out the printer port using either Ed Rauh's Copy_File() API (see FAQ under 'sending output directly to a printer' (or something like that), or using the RAWPRINT.FLL or RAWPRINT.VCX found in the Files section. These all bypass Windows to just squirt your stuff directly to the printer port, and are really easy to use. If your output is not exactly 8-1/2 x 11 inch pages, you will probably need to do printer setup on the dot matrix printer icon to use a custom page size as well.

Hi Rick:

Just checked in and noticed the continuing thread between you and Ed. I think Ed pretty well summed up the problem; and your last comment about 'the best of both worlds' is the issue being discussed. I don't have a specific action for you to take that hasn't already been suggested. My experience has been that trying to drive a DOS program print output is best done by bypassing the windows printer drivers and as I said earlier, just squirt your output directly to the printer port -- with 'rawprint' or the like -- if needed. Just think of it this way: windows 'knows' about DOS programs and usually just barely tolerates their presence and foibles, but DOS programs don't 'know' about windows in any way, so any attempts to exploit windows features and capabilities are difficult if not impossible in many cases. Not a happy answer, but I'd rather spend my time addressing the problems I CAN fix than to beat my head against the windows brick wall... So, no, you really can't have it both ways.

FWIW: I also took Ed's comments wrong in his initial response, so its not just you. I like Ed a lot, and respect Ed's technical skills and knowledge, but I have seen where sometimes a person unintentionally 'pushes his buttons', and his responses can be harsh. We all do this on occasion... I'm probably more prone to that offline, but in any case, his info is always top notch.

Anyhow, good luck. If you find a better solution than all that has been proposed, please be sure to post it here, so someone else can get some benefit as well.

Rob
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform