• XPRINT SET COLORMODE - problem report

    From Wolfgang =?utf-8?Q?=CE=95nzinger?=@21:1/5 to All on Fri Mar 19 14:00:57 2021
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)