Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[PW5.0] Help! Switching printers on the fly screws up fonts!

0 views
Skip to first unread message

David Ellis

unread,
Aug 23, 1995, 3:00:00 AM8/23/95
to
: *the default printer is then set back with "PrinterSetCurrent"
: The printers switch fine, problem is the label printer font is huge.

To solve the font problem, try following printerSetCurrent() with
sendKeys("%FR-"). This tip is from another PW 5.0 user and I haven't
tried it.


Chas Randal

unread,
Aug 23, 1995, 3:00:00 AM8/23/95
to
My app needs to switch from the default printer to a label
printer, then back to the default for reports. In summary it:
*saves the default printer name, driver name, & port with "PrinterGetInfo"
*enumerates the printer drivers to locate the name of the label
printer with "enumPrinters". If the right driver is found,
*sets the label printer driver with "PrinterSetCurrent"
*the labels are printed

*the default printer is then set back with "PrinterSetCurrent"
The printers switch fine, problem is the label printer font is huge.
In report design mode, the labels print fine, or if I preset the
label printer as the default (not good when you switch back for reports!).
I've talked to Borland Tech Support, the label printer vendor,
and have tried all combinations of "printerSetOptions" and
"ReportPrintInfo". The client is restless, anybody seen this before?
TIA big time!

Chas Randal
ch...@onr.com

Chas Randal

unread,
Aug 23, 1995, 3:00:00 AM8/23/95
to
In article <dellisDD...@netcom.com>, del...@netcom.com (David Ellis) says:
>
>: *the default printer is then set back with "PrinterSetCurrent"

>: The printers switch fine, problem is the label printer font is huge.
>
>To solve the font problem, try following printerSetCurrent() with
>sendKeys("%FR-"). This tip is from another PW 5.0 user and I haven't
>tried it.
>
Thanks for the tip. That's the same one from Borland Tech support. Problem in this
case is that this function is executed from a dialog box which doesn't
have a menu. Alt-F is ignored. I may have to put a menu up if this is
the only solution, but I'd rather not. Thanks again for responding.

Chas Randal
ch...@onr.com

JefSummers

unread,
Aug 23, 1995, 3:00:00 AM8/23/95
to
PrinterSetCurrent is buggy. It does not handle fonts correctly, nor can
you fix this with PrinterSetOptions. I've spent hours and hours playing
with different ways around this problem including using DLLs to change
printer drivers (my own and others') but no luck. The only way to
successfully change printer drivers without font problems that I have
found is to use sendKeys to open the printer setup dialog (you could use
MenuAction but then it just sits there and you are no longer in program
control), then sendKeys the name of the printer driver. The prettiest way
to do that would be to use a Windows API call to stop screen updates until
the process is done, but that would require a great deal of confidence in
the code. This has been a topic on many boards (GEnie, CompuServe, etc)
and I have not heard of any other way around it.

David Ellis

unread,
Aug 23, 1995, 3:00:00 AM8/23/95
to
Ooops. There's an error in the sendKeys(). It should have a tilde instead
of a hyphen: sendKeys("%FR~")

: >To solve the font problem, try following printerSetCurrent() with

0 new messages