Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Printing to dot matrix
Message
De
01/08/2001 08:40:02
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
01/08/2001 04:15:30
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00538025
Message ID:
00538226
Vues:
18
>>I have an Epson dot matrix printer. If I use the windows driver for this printer it prints extremely slow. By using the generic/text driver, the printer prints quickly, but the report generator is very cumbersome to set up. The printers top of form gets screwed up often. If anyone has any good solutions, I would appreciate the help.
>
>If the sole target printer is the Epson, try creating the report with the Epson printer driver in effect on the development system, and use only fonts that are resident on the Epson printer. Using Windows native or TrueType fonts will force the Windows GDI to render the characters as graphic images rather than as ASCII print streams; native fonts, OTOH, are accessed using a few printer commands specific to the printer and an ASCII stream, relying on the printer itself to render the characters.
>
>Doing this makes your report hardware dependent - if you are forced to run the report on say an HP LaserJet, the HP's native codes will not match, so Windows will map the native Epson fonts to a near-equivalent Windows font and render it as graphics, and in all probability, the printed image will not be identical to the output on the Epson.


Ed,

Printing "text mode" makes me hardware dependent, but this is a price I pay for speed. You need to send specific printer codes to reset the printer, print bold, etc.

??? will send printer codes, and the actual reports, to the printer.

? and ?? can be used to generate the text report. Other programmers use @...say, instead.

The text report can be shown on screen with MODIFY COMMAND, but this causes problems because of syntax highlighting. I used NotePad.exe, then Programmer's File Editor, and currently the default browser (this lets the user see bold and italic). Use the PRE tag to avoid line-wrap, and to use a fixed-width font (this trick I learned on the UT, without actually asking!).

I created an entire class to duplicate report-writer funcionality: break (or grouping) expressions (header and footers for each break level), page headers, etc. Basically, in method .Select() I insert commands to do the data selection, a main loop is run for each record. When the group expression(s) change, methods .GroupHeader() and .GroupFooter() are called with appropriate parameters.

Unfortunately, my system has several components, but I can give additional details if you so desire.

Hilmar.
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)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform