Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Printing using printer codes to GDI printers?
Message
From
09/04/2002 09:18:35
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
09/04/2002 09:01:27
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00642572
Message ID:
00642609
Views:
24
This message has been marked as the solution to the initial question of the thread.
>Hilmar, if I understand GDI printers correctly, they do not have an on-board CPU to handle the print rendering with a rendering language that contains a predefined set of features nor RAM to render the page. GDI printers instead support what the Windows GDI supports for a rendering language. They require the local computer's CPU and Windows GDI to perform the print rendering. They use the GDI to render the image and then pass the rendered page as a bitmap image to the printer instead of sending PCL to the printer itself and rendering the page on the printer. This creates a problem for all of my reports that are printed using ??? and @...say and condensed, bold, standard printing is set using ???. The printer doesn't recognize any esc codes. Unless I am mistaken???

This is the way the Epson printer works - if you use the standard report.

>
>Oh yeah, the standard Epson dot-matrix printers do NOT fall into this category, but the newer low-end windows printers (c40/c60/c80/etc) as well as most low-end Lexmarks do.

However, printing a text-file (in "text-mode", of course), would use fonts -albeit primitive ones - pre-defined in the Epson printer.

What you say would imply that the GDI printers you list have no "text-mode" whatsoever. I have some doubts about this possibility, but it is quite possible, so it is worthwhile to check this assumption with the printer manuals, for the models of interest.

As a workaround, you might create a combination of classes and functions that do the following:

  • Create the textfile as you already do.
  • Convert this to a DBF. One record per line.
  • Run a standard report on this to create the GDI image. This is sent directly to the printer.

    Some additional considerations apply; the end-of-page character must be interpreted accordingly, for instance. Also, you may want to have different reports (or a single one, with more than one field, and conditional printing) for compressed vs. non-compressed printing.

    Mind you, I don't know whether all this is really necessary - but it might be possible to have a generic solution. Also, for quick printing on printers that support text-mode, you may also want to continue supporting printing the file as text-mode.

    HTH, 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)
  • Previous
    Reply
    Map
    View

    Click here to load this message in the networking platform