Wolfgang Εnzinger
unread,Mar 19, 2021, 9:00:59 AM3/19/21You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
In case anybody else encounters this ...
One of my programs is a GIS (Geographic Information System), and users
sometimes need to print the map. Coloured.
Until about a year ago, I used XPRINT ATTACH CHOOSE for printer selection,
and then the various XPRINT methods for actual printing.
Since XPRINT ATTACH CHOOSE is quite limited in various ways, I then
replaced it with the native method PrintDlg(). After the selection, the
settings were applied to XPRINT, like:
IF (@pDevMode.dmFields AND %DM_COLOR) THEN
XPRINT SET COLORMODE @pDevMode.dmColor
END IF
And now the problem started. As far as I can tell, only about 10% of my
users were concerned, and I couldn't ever reproduce the problem with any of
my printers myself. However, those 10% reported that the printer only
prints in b/w, even when they had chosen color mode in the printer
selection dialog. The situation was always the same: b/w is the default for
the printer, and the document setting "colored" is ignored.
I tried this and that, like ResetDC() and DocumentProperties(), to no
avail. Finally I decided to eliminate XPRINT completely and rewrite it all
using only GDI functions. Big surprise: no more problems.
Regarding the colormode, there must be a bug in XPRINT SET COLORMODE. The
weird thing is that this seems to affect only a couple of printer models,
one of them being Kyocera TASKalfa 4052ci. And XPRINT ATTACH CHOOSE seems
to set the colormode in a slightly different way - which makes the whole
thing work.
COLORMODE is the only property affected, others like ORIENTATION or COPIES
work perfectly in whatever situation.
Observed with PB/Win9 and PB/Win10.
Maybe this helps others who face the same problem. And, if dreaming is
allowed: maybe this will be fixed in PB/Win11.
Cheers Wolfgang
--
get it while you can