Groups | Search | Server Info | Keyboard shortcuts | Login | Register


Groups > comp.lang.basic.powerbasic > #98

XPRINT SET COLORMODE - problem report

From Wolfgang Εnzinger <we_usenet@nurfuerspam.de>
Newsgroups comp.lang.basic.powerbasic
Subject XPRINT SET COLORMODE - problem report
Date 2021-03-19 14:00 +0100
Message-ID <uqa1wokmihyo.dlg@weu.my-fqdn.de> (permalink)

Show all headers | View raw


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

Back to comp.lang.basic.powerbasic | Previous | Next | Find similar


Thread

XPRINT SET COLORMODE - problem report Wolfgang  Εnzinger <we_usenet@nurfuerspam.de> - 2021-03-19 14:00 +0100

csiph-web