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

Define FONT in the printer

Status
Not open for further replies.

trukis

IS-IT--Management
Jan 20, 2002
5
US
Hi!
I have reports made with @say..., in a version programed under 2.0 for an old epson printer, with ??? chr() codes. Now I'm using 2.6 and a hp DJ 640 printer. the ??? CHR() codes don't work anymore, so I tried to add the FONT statement at the end of the @say... but sometime it works, sometime it doesn't.
Is there a way to define the font for all the reports in the program? So I don't need to change or define a font unless I have a specific need? If not, why the font statements do not always work?

Thanks,
Trukis
 
Did you change the CHR() codes to acommodate the new printer? Epson codes are different than HP codes.

Dave S.
 
In fact I tried to avoid using specific printer configuration, and instead use a generic font command that let me change the printer. So I deleted the chr() commands. Depending on the printer/ PC, now is printing with different fonts, even when I don't have any chr() or FONT command.
 
The only way you can get generic print from a driver is to use the generic/text only driver, since any other printer driver is going to implement it's own fonts. From what I understand, you can use ??? to bypass the printer driver but then you can't use @ SAY, and the FONT statement will be ignored.

Dave S.
 
I have dealt with this in both 2.6 DOS and 2.6 Win in
older programs.

First I'd recommend that you seriously consider changing the reports from the @SAY format to utilizing 2.6's
Report forms (FRT & FRX's). They are SIGNIFICANTLY
easier to maintain and/or modify.

NOTE: The following is not the easiest way of doing things,
but it worked.

I created a set of pre-defined variables such as BOLD,
Condensed, etc. for each type of printer that my customer
was using. This was not easy since I had to get each
printer manufacturer's specific command string definitions
to create the desired change.

I then either had the program define the printer type to
be used, based on pre-defined requirements (such as Monarch
Bar Code Printer for barcodes, etc.) or, for more generic
functions, I let the user define the printer type and stored
the user-specific choices for later default usage.

Once the program knew which set of priner control variables
to use, it put them into the desired places within either the
@SAY report or into the FRX type report.

The report then appeared as desired.

Good Luck,
jrbbldr
jrbbldr@yahoo.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top