Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Printer wide-font problem
Message
From
26/03/2004 08:05:02
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
25/03/2004 21:45:32
Alan Harris-Reid
Baseline Data Services
Devon, United Kingdom
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00889837
Message ID:
00889918
Views:
14
Another option - the one I use - is to send the entire print job with a single "???" command. Prepare everything, sending text and printer codes to a file with "?/??". Then, load it to a variable, and send it all at once with a single "???" command.

>I am outputting a (very old, hand-coded) report directly to a printer using ??? for print commands and @ SAY for text posisitioning. I want some lines to be output in double-width font. The code looks something like this...
>
>SET DEVICE TO PRINT
>SET PRINT TO
>??? CHR(27)+'@' && reset printer (necessary, but can't work-out why)
>
>??? CHR(27)+'W1' && set wide font on
>@0,0 SAY "Double-width text"
>??? CHR(27)+'W0' && set wide font off
>@1,0 SAY "Back to normal width"
>@2,0 SAY "Further text in normal width"
>
>SET PRINT TO
>SET DEVICE TO SCREEN
>
>This doesn't work - all printed text is in normal width. However, I found some very old code and discovered that the following code-block replacement works...
>
>@0,0 SAY "Double-width text"
>??? CHR(27)+'W1'
>@1,0 SAY "Back to normal width"
>??? CHR(27)+'W0'
>@2,0 SAY "Further text in normal width"
>
>Can anyone explain what might be going on, and what is the neatest way around this problem? Ideally I want the double-width lines 'wrapped' between the wide-font on/off commands, but it seems that the ??? wide on/off is required *after* the @ SAY... line. This doesn't make sense to me.
>
>Any help would be appreciated.
>
>Alan
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform