*ColorMode entry in the GPD

Hi All,
I am working on an Unidriver based printer driver for Win2K. I have the
following *ColorMode entries in my GPD:
*option: Mono -> for 1BPP
*option: 24Bpp-> for 24BPP color rendering.
I have a requirement wherein I want to put these entries within a switch
case. For example, something like this:

*Feature: ColorMode
{
*switch:condition
{
*case: condition1
{
*% Have both the color mode options here
}
*case: condition2
{
*% Have only 1Bpp option here
}
}
}

But the minidev.exe tool gives me an error when I check this GPD. It gives
me an error telling that this feature(DevBPP, DevNumPlanes) cannot be
within a SWITHC_CASE_STATEMENT.
Is there any other way of achieving the same result?
Thanks in advance
Nagendra Prasad

The HP Color Laserjet sample in the DDK does what you are trying to do.
It has the following two sections. Refer to hpclj.gpd in the DDK for
further details.

*switch: ColorMode
{
*case: Mono
{
*BestQualitySettings: LIST(ColorMode.Mono,
Resolution.Option1, PrintQuality.Option3)
*BetterQualitySettings: LIST(ColorMode.Mono,
Resolution.Option1, PrintQuality.Option1)
*DraftQualitySettings: LIST(ColorMode.Mono,
Resolution.Option2, PrintQuality.Option2)
*DefaultQuality:BESTQUALITY
}

*default:
{
*BestQualitySettings: LIST(ColorMode.24bpp,
Resolution.Option1, PrintQuality.Option3)
*BetterQualitySettings: LIST(ColorMode.8bpp,
Resolution.Option1, PrintQuality.Option1)
*DraftQualitySettings: LIST(ColorMode.8bpp,
Resolution.Option2, PrintQuality.Option2)
*DefaultQuality:BESTQUALITY
}
}

*Feature: ColorMode
{
*rcNameID: =COLOR_PRINTING_MODE_DISPLAY
*DefaultOption: 24bpp
*Option: Mono
{
*rcNameID: =MONO_DISPLAY
*DevNumOfPlanes: 1
*DevBPP: 1
*Color? : FALSE
}
*Option: Color
{
*rcNameID: =COLOR_DISPLAY
*DevNumOfPlanes: 3
*DevBPP: 1
*DrvBPP: 4
EXTERN_GLOBAL: *RasterSendAllData? : TRUE
*PaletteSize : 8
*PaletteProgrammable? : TRUE
*ColorPlaneOrder: LIST(CYAN, MAGENTA, YELLOW)
*Command: CmdSendCyanData { *Cmd : “<1B>*b”
%d{NumOfDataBytes}“V” }
*Command: CmdSendMagentaData { *Cmd : “<1B>*b”
%d{NumOfDataBytes}“V” }
*Command: CmdSendYellowData { *Cmd : “<1B>*b”
%d{NumOfDataBytes}“W” }
*Command: CmdSelectBlackColor { *Cmd : “<1B>*v7S” }
*Command: CmdSelectRedColor { *Cmd : “<1B>*v6S” }
*Command: CmdSelectGreenColor { *Cmd : “<1B>*v5S” }
*Command: CmdSelectYellowColor { *Cmd : “<1B>*v4S” }
*Command: CmdSelectBlueColor { *Cmd : “<1B>*v3S” }
*Command: CmdSelectMagentaColor { *Cmd : “<1B>*v2S” }
*Command: CmdSelectCyanColor { *Cmd : “<1B>*v1S” }
*Command: CmdSelectWhiteColor { *Cmd : “<1B>*v0S” }
*Command: CmdSelect
{
*Order: DOC_SETUP.16
*Cmd: “<1B>*v6W<00 00 03 08 08 08>”
}
}
*Option: 8bpp
{
*rcNameID: =8BPP_DISPLAY
*Constraints: PaperSize.TABLOID
*DevNumOfPlanes: 1
*DevBPP: 8
*DrvBPP: 8
*PaletteSize: 256
*PaletteProgrammable? : TRUE
*Command: CmdDefinePaletteEntry { *Cmd : “<1B>*v”
%d{RedValue}“a” %d{GreenValue}“b” %d{BlueValue}“c”
%d{PaletteIndexToProgram}

  • “I” }
    *Command: CmdSelectPaletteEntry { *Cmd : “<1B>*v”
    %d{CurrentPaletteIndex}“S” }
    *Command: CmdSelect
    {
    *Order: DOC_SETUP.16
    *Cmd:
    “<1B>*v1N<1B>*v1O<1B>*t0I<1B>*l184O<1B>*v6W<000108080808>”
    }
    }
    *Option: 24bpp
    {
    *rcNameID: =24BPP_DISPLAY
    *Constraints: PaperSize.TABLOID
    *DevNumOfPlanes: 1
    *DevBPP: 24
    *DrvBPP: 24
    *Command: CmdEnableDRC { *Cmd : “<1B>*b3M” }
    *PaletteSize: 256
    *PaletteProgrammable? : TRUE
    *Command: CmdDefinePaletteEntry { *Cmd : “<1B>*v”
    %d{RedValue}“a” %d{GreenValue}“b” %d{BlueValue}“c”
    %d{PaletteIndexToProgram}
  • “I” }
    *Command: CmdSelectPaletteEntry { *Cmd : “<1B>*v”
    %d{CurrentPaletteIndex}“S” }
    *Command: CmdSetSrcBmpWidth { *Cmd : “<1B>*r”
    %d{RasterDataWidthInBytes / 3}“S” }
    *Command: CmdSelect
    {
    *Order: DOC_SETUP.16
    *Cmd:
    “<1B>*v1N<1B>*v1O<1B>*l184O<1B>*v6W<0003080808081B>*v0a0b0c7i255a255b255
    c0I<1B>*”
  • “o3W<060400>”
    }
    }
    }
  • Ashwin

This posting is provided “AS IS” with no warranties, and confers no
rights.

-----Original Message-----
From: xxxxx@wipro.com [mailto:xxxxx@wipro.com]
Sent: Sunday, June 09, 2002 11:28 PM
To: NT Developers Interest List
Subject: [ntdev] *ColorMode entry in the GPD

Hi All,
I am working on an Unidriver based printer driver for Win2K. I have the
following *ColorMode entries in my GPD:
*option: Mono -> for 1BPP
*option: 24Bpp-> for 24BPP color rendering.
I have a requirement wherein I want to put these entries within a switch
case. For example, something like this:

*Feature: ColorMode
{
*switch:condition
{
*case: condition1
{
*% Have both the color mode options here
}
*case: condition2
{
*% Have only 1Bpp option here
}
}
}

But the minidev.exe tool gives me an error when I check this GPD. It
gives me an error telling that this feature(DevBPP, DevNumPlanes) cannot
be within a SWITHC_CASE_STATEMENT. Is there any other way of achieving
the same result? Thanks in advance Nagendra Prasad


You are currently subscribed to ntdev as: xxxxx@microsoft.com To
unsubscribe send a blank email to %%email.unsub%%