*GPDFileName: "DeliDriverPrinterLaser2.gpd"
*GPDFileVersion: "1.2"
*GPDSpecVersion: "1.2"
*Include: "StdNames.gpd"
*ModelName: "Deli Laser2 Printer Series"
*MasterUnits: PAIR(600, 600)
*PrinterType: PAGE
*MaxCopies: 999


*%******************************************************************************************
*%                                      Input Locale
*%******************************************************************************************
*Feature: Locale
{
    *Name: "Locale"
    *ConcealFromUI?: TRUE
    *DefaultOption: English_United_States

    *Option: Chinese_PRC
    {
        *Name: "  "
        *OptionID: 0x0804
    }
    *Option: Chinese_Singapore
    {
        *Name: "  "
        *OptionID: 0x1004
    }
}

*%******************************************************************************************
*%                                 resource dll & resource ID
*%******************************************************************************************
*switch: Locale
{
    *case: Chinese_PRC
    {
        *ResourceDLL: "DeliDriverPrinterLaser2ResZh.dll"
    }
    *case: Chinese_Singapore
    {
        *ResourceDLL: "DeliDriverPrinterLaser2ResZh.dll"
    }
    *default:
    {
        *ResourceDLL: "DeliDriverPrinterLaser2ResEn.dll"
    }
}

*Macros: OEM_DEF_PaperSizeNames
{
    IDS_OEM_PAPER_ISOB5:        2010
    IDS_OEM_PAPER_ISOB6:        2011
    IDS_OEM_MEDIA_HEAVY:        2012
    IDS_OEM_MEDIA_LIGHT:        2013
    IDS_OEM_PAPER_16K_184_260:  2051
    IDS_OEM_PAPER_16K_195_270:  2052
    IDS_OEM_PAPER_16K_197_273:  2053
    IDS_OEM_PAPER_32K:          2054
    IDS_OEM_PAPER_TAX:          2055
	IDS_OEM_PAPER_A5_Hori:      2056
}

*%******************************************************************************************
*%                                      Orientation
*%******************************************************************************************
*Feature: Orientation
{
    *rcNameID: =ORIENTATION_DISPLAY
    *DefaultOption: PORTRAIT
    *Option: PORTRAIT
    {
        *rcNameID: =PORTRAIT_DISPLAY
        *Command: CmdSelect
        {
            *Order: DOC_SETUP.6
            *Cmd: ""
        }
    }
    *Option: LANDSCAPE_CC90
    {
        *rcNameID: =LANDSCAPE_DISPLAY
        *Command: CmdSelect
        {
            *Order: DOC_SETUP.8
            *Cmd: ""
        }
    }
}

*%******************************************************************************************
*%                                      Input Bin
*%******************************************************************************************
*Feature: InputBin
{
    *rcNameID: =PAPER_SOURCE_DISPLAY
*%    *DefaultOption: CASSETTE
    *ConflictPriority: 2
    *Option: CASSETTE
    {
        *rcNameID: =CASSETTE_DISPLAY
        *Command: CmdSelect
        {
            *Order: DOC_SETUP.11
            *Cmd: ""
        }
    }
}

*%******************************************************************************************
*%                                      Resolution
*%******************************************************************************************
*Feature: Resolution
{
    *rcNameID: =RESOLUTION_DISPLAY
    *DefaultOption: Option1
    *Option: Option1
    {
        *Name: "Standard"
        *DPI: PAIR(600, 600)
        *TextDPI: PAIR(600, 600)
        *SpotDiameter: 100
        *Command: CmdSelect
        {
            *Order: DOC_SETUP.7
            *Cmd: ""
        }
    }
}

*%******************************************************************************************
*%                                      Paper Size
*%******************************************************************************************
*Feature: PaperSize
{
    *rcNameID: =PAPER_SIZE_DISPLAY
    *ConflictPriority: 1
    *DefaultOption: A4

    *Option: A4
    {
        *rcNameID: =RCID_DMPAPER_SYSTEM_NAME
        *switch: Orientation
        {
            *case: PORTRAIT
            {
                *PrintableArea: PAIR(4768, 6824)
                *PrintableOrigin: PAIR(96, 96)
                *CursorOrigin: PAIR(96, 96)
            }
            *case: LANDSCAPE_CC90
            {
                *PrintableArea: PAIR(4768, 6824)
                *PrintableOrigin: PAIR(96, 96)
                *CursorOrigin: PAIR(96, 6920)
            }
        }
    }
    *Option: A5
    {
        *rcNameID: =RCID_DMPAPER_SYSTEM_NAME
        *switch: Orientation
        {
            *case: PORTRAIT
            {
                *PrintableArea: PAIR(3304, 4768)
                *PrintableOrigin: PAIR(96, 96)
                *CursorOrigin: PAIR(96, 96)
            }
            *case: LANDSCAPE_CC90
            {
                *PrintableArea: PAIR(3304, 4768)
                *PrintableOrigin: PAIR(96, 96)
                *CursorOrigin: PAIR(96, 4864)
            }
        }
    }
    *Option: A5_Hori
    {
        *rcNameID: =IDS_OEM_PAPER_A5_Hori	
        *PageDimensions:  PAIR(3500, 4960)
        *Command: CmdSelect
        {
            *Order: DOC_SETUP.20
            *Cmd: ""
        }
        *switch: Orientation
        {
            *case: PORTRAIT
            {
                *PrintableArea: PAIR(3308, 4768)
                *PrintableOrigin: PAIR(96, 96)
                *CursorOrigin: PAIR(96, 96)
            }
            *case: LANDSCAPE_CC90
            {
                *PrintableArea: PAIR(3308, 4768)
                *PrintableOrigin: PAIR(96, 96)
                *CursorOrigin: PAIR(96, 4864)
            }
        }
    }
	
    *Option: B5
    {
        *rcNameID: =RCID_DMPAPER_SYSTEM_NAME
        *switch: Orientation
        {
            *case: PORTRAIT
            {
                *PrintableArea: PAIR(4104, 5880)
                *PrintableOrigin: PAIR(96, 96)
                *CursorOrigin: PAIR(96, 96)
            }
            *case: LANDSCAPE_CC90
            {
                *PrintableArea: PAIR(4104, 5880)
                *PrintableOrigin: PAIR(96, 96)
                *CursorOrigin: PAIR(96, 5976)
            }
        }
    }
    *Option: B6_JIS
    {
        *rcNameID: =RCID_DMPAPER_SYSTEM_NAME
        *switch: Orientation
        {
            *case: PORTRAIT
            {
                *PrintableArea: PAIR(2832, 4104)
                *PrintableOrigin: PAIR(96, 96)
                *CursorOrigin: PAIR(96, 96)
            }
            *case: LANDSCAPE_CC90
            {
                *PrintableArea: PAIR(2832, 4104)
                *PrintableOrigin: PAIR(96, 96)
                *CursorOrigin: PAIR(96, 4200)
            }
        }
        *Constraints: LIST(Duplex.VERTICAL, Duplex.HORIZONTAL)
    }
    *Option: B5_ISO
    {
        *rcNameID: =IDS_OEM_PAPER_ISOB5
        *PageDimensions:  PAIR(4157, 5905)
        *Command: CmdSelect
        {
            *Order: DOC_SETUP.20
            *Cmd: ""
        }
        *switch: Orientation
        {
            *case: PORTRAIT
            {
                *PrintableArea: PAIR(3968, 5712)
                *PrintableOrigin: PAIR(96, 96)
                *CursorOrigin: PAIR(96, 96)
            }
            *case: LANDSCAPE_CC90
            {
                *PrintableArea: PAIR(3968, 5712)
                *PrintableOrigin: PAIR(96, 96)
                *CursorOrigin: PAIR(96, 5808)
            }
        }
    }
    *Option: B6_ISO
    {
        *rcNameID: =IDS_OEM_PAPER_ISOB6
        *PageDimensions:  PAIR(2952, 4157)
        *Command: CmdSelect
        {
            *Order: DOC_SETUP.20
            *Cmd: ""
        }
        *switch: Orientation
        {
            *case: PORTRAIT
            {
                *PrintableArea: PAIR(2760, 3968)
                *PrintableOrigin: PAIR(96, 96)
                *CursorOrigin: PAIR(96, 96)
            }
            *case: LANDSCAPE_CC90
            {
                *PrintableArea: PAIR(2760, 3968)
                *PrintableOrigin: PAIR(96, 96)
                *CursorOrigin: PAIR(96, 4064)
            }
        }
        *Constraints: LIST(Duplex.VERTICAL, Duplex.HORIZONTAL)
    }
    *Option: EXECUTIVE
    {
        *rcNameID: =RCID_DMPAPER_SYSTEM_NAME
        *switch: Orientation
        {
            *case: PORTRAIT
            {
                *PrintableArea: PAIR(4160, 6104)
                *PrintableOrigin: PAIR(96, 96)
                *CursorOrigin: PAIR(96, 96)
            }
            *case: LANDSCAPE_CC90
            {
                *PrintableArea: PAIR(4160, 6104)
                *PrintableOrigin: PAIR(96, 96)
                *CursorOrigin: PAIR(96, 6200)
            }
        }
    }
    *Option: 16K_184_260
    {
        *rcNameID: =IDS_OEM_PAPER_16K_184_260
        *PageDimensions:  PAIR(4346, 6141)
        *Command: CmdSelect
        {
            *Order: DOC_SETUP.20
            *Cmd: ""
        }
        *switch: Orientation
        {
            *case: PORTRAIT
            {
                *PrintableArea: PAIR(4152, 5944)
                *PrintableOrigin: PAIR(96, 96)
                *CursorOrigin: PAIR(96, 96)
            }
            *case: LANDSCAPE_CC90
            {
                *PrintableArea: PAIR(4152, 5944)
                *PrintableOrigin: PAIR(96, 96)
                *CursorOrigin: PAIR(96, 6040)
            }
        }
    }
    *Option: 16K_195_270
    {
        *rcNameID: =IDS_OEM_PAPER_16K_195_270
        *PageDimensions:  PAIR(4606, 6377)
        *Command: CmdSelect
        {
            *Order: DOC_SETUP.20
            *Cmd: ""
        }
        *switch: Orientation
        {
            *case: PORTRAIT
            {
                *PrintableArea: PAIR(4408, 6184)
                *PrintableOrigin: PAIR(96, 96)
                *CursorOrigin: PAIR(96, 96)
            }
            *case: LANDSCAPE_CC90
            {
                *PrintableArea: PAIR(4408, 6184)
                *PrintableOrigin: PAIR(96, 96)
                *CursorOrigin: PAIR(96, 6280)
            }
        }
    }
    *Option: A6
    {
        *rcNameID: =RCID_DMPAPER_SYSTEM_NAME
        *switch: Orientation
        {
            *case: PORTRAIT
            {
                *PrintableArea: PAIR(2288, 3304)
                *PrintableOrigin: PAIR(96, 96)
                *CursorOrigin: PAIR(96, 96)
            }
            *case: LANDSCAPE_CC90
            {
                *PrintableArea: PAIR(2288, 3304)
                *PrintableOrigin: PAIR(96, 96)
                *CursorOrigin: PAIR(96, 3400)
            }
        }
        *Constraints: LIST(Duplex.VERTICAL, Duplex.HORIZONTAL)
    }
    *Option: ENV_10
    {
        *rcNameID: =RCID_DMPAPER_SYSTEM_NAME
        *switch: Orientation
        {
            *case: PORTRAIT
            {
                *PrintableArea: PAIR(2280, 5504)
                *PrintableOrigin: PAIR(96, 96)
                *CursorOrigin: PAIR(96, 96)
            }
            *case: LANDSCAPE_CC90
            {
                *PrintableArea: PAIR(2280, 5504)
                *PrintableOrigin: PAIR(96, 96)
                *CursorOrigin: PAIR(96, 5600)
            }
        }
        *Constraints: LIST(Duplex.VERTICAL, Duplex.HORIZONTAL)
    }
    *Option: ENV_MONARCH
    {
        *rcNameID: =RCID_DMPAPER_SYSTEM_NAME
        *switch: Orientation
        {
            *case: PORTRAIT
            {
                *PrintableArea: PAIR(2128, 4304)
                *PrintableOrigin: PAIR(96, 96)
                *CursorOrigin: PAIR(96, 96)
            }
            *case: LANDSCAPE_CC90
            {
                *PrintableArea: PAIR(2128, 4304)
                *PrintableOrigin: PAIR(96, 96)
                *CursorOrigin: PAIR(96, 4400)
            }
        }
        *Constraints: LIST(Duplex.VERTICAL, Duplex.HORIZONTAL)
    }
    *Option: ENV_C5
    {
        *rcNameID: =RCID_DMPAPER_SYSTEM_NAME
        *switch: Orientation
        {
            *case: PORTRAIT
            {
                *PrintableArea: PAIR(3632, 5216)
                *PrintableOrigin: PAIR(96, 96)
                *CursorOrigin: PAIR(96, 96)
            }
            *case: LANDSCAPE_CC90
            {
                *PrintableArea: PAIR(3632, 5216)
                *PrintableOrigin: PAIR(96, 96)
                *CursorOrigin: PAIR(96, 5312)
            }
        }
        *Constraints: LIST(Duplex.VERTICAL, Duplex.HORIZONTAL)
    }
    *Option: ENV_DL
    {
        *rcNameID: =RCID_DMPAPER_SYSTEM_NAME
        *switch: Orientation
        {
            *case: PORTRAIT
            {
                *PrintableArea: PAIR(2400, 5000)
                *PrintableOrigin: PAIR(96, 96)
                *CursorOrigin: PAIR(96, 96)
            }
            *case: LANDSCAPE_CC90
            {
                *PrintableArea: PAIR(2400, 5000)
                *PrintableOrigin: PAIR(96, 96)
                *CursorOrigin: PAIR(96, 5096)
            }
        }
        *Constraints: LIST(Duplex.VERTICAL, Duplex.HORIZONTAL)
    }
    *Option: CUSTOMSIZE
    {
        *rcNameID: =USER_DEFINED_SIZE_DISPLAY
      
        *MinSize: PAIR(1792, 2736)
        *MaxSize: PAIR(5112, 8416)
        *MaxPrintableWidth: 99999
        *MinLeftMargin: 96
        *CenterPrintable?: FALSE
        *CustPrintableOriginX:  %d{96}
        *CustPrintableOriginY:  %d{96}
        *CustPrintableSizeX:  %d{PhysPaperWidth }
        *CustPrintableSizeY:  %d{PhysPaperLength }
        *Command: CmdSelect
        {
            *Order: DOC_SETUP.120
            *Cmd: ""
        }
        *switch: Orientation
        {
            *case: PORTRAIT
            {
                *CustCursorOriginX:  %d{96}
                *CustCursorOriginY:  %d{96}
  *CustPrintableSizeX:  %d{(((PhysPaperWidth  - 192)+1)/8)*8}
  *CustPrintableSizeY:  %d{(((PhysPaperLength  - 192)+1)/8)*8}
  *CustPrintableOriginX:  %d{96}
  *CustPrintableOriginY:  %d{96}
            }
            *case: LANDSCAPE_CC90
            {
  *CustPrintableOriginX:  %d{96}
  *CustPrintableOriginY:  %d{96}
  *CustPrintableSizeX:  %d{(((PhysPaperWidth  - 192)+1)/8)*8}
  *CustPrintableSizeY:  %d{(((PhysPaperLength  - 192)+1)/8)*8}
                *CustCursorOriginX:  %d{96}
                *CustCursorOriginY:  %d{(((PhysPaperLength  - 192)+1)/8)*8-96}
            }
        }
        *Constraints: LIST(Duplex.VERTICAL, Duplex.HORIZONTAL)
    }

}

*%******************************************************************************************
*%                                      Media Type
*%******************************************************************************************
*Feature: MediaType
{
    *rcNameID: =MEDIA_TYPE_DISPLAY
    *DefaultOption: STANDARD
    *Option: STANDARD
    {
        *rcNameID: =PLAIN_PAPER_DISPLAY
        *Command: CmdSelect
        {
            *Order: DOC_SETUP.15
            *Cmd: ""
        }
    }
    *Option: OEM_LIGHT
    {
        *rcNameID: =IDS_OEM_MEDIA_LIGHT
        *OptionID:259
        *Command: CmdSelect
        {
            *Order: DOC_SETUP.15
            *Cmd: ""
        }
        *Constraints: LIST(Duplex.VERTICAL, Duplex.HORIZONTAL)
    }
    *Option: OEM_HEAVY
    {
        *rcNameID: =IDS_OEM_MEDIA_HEAVY
        *OptionID:258
        *Command: CmdSelect
        {
            *Order: DOC_SETUP.15
            *Cmd: ""
        }
        *Constraints: LIST(Duplex.VERTICAL, Duplex.HORIZONTAL)
    }
}

*%******************************************************************************************
*%                                      Color Mode
*%******************************************************************************************
*ChangeColorModeOnDoc?: FALSE
*Feature: ColorMode
{
    *Name: "base color mode"
    *DefaultOption: 8bpp
    *Option: 8bpp
    {
        *Name: "Gray Scale (8bpp)"
        *DevNumOfPlanes: 0
        *DevBPP: 0
        *DrvBPP: 8
        *IPCallbackID: 3
        *Color?: FALSE
        *PaletteProgrammable?: FALSE
    }
}

*%******************************************************************************************
*%                                      Duplex Type
*%******************************************************************************************
*Feature: Duplex
{
    *rcNameID: =TWO_SIDED_PRINTING_DISPLAY
    *DefaultOption: NONE
    *ConflictPriority: 3
    *Option: NONE
    {
        *rcNameID: =NONE_DISPLAY
        *Command: CmdSelect
        {
            *Order: DOC_SETUP.9
            *Cmd: ""
        }
    }
    *Option: VERTICAL
    {
        *rcNameID: =FLIP_ON_LONG_EDGE_DISPLAY
        *Command: CmdSelect
        {
            *Order: DOC_SETUP.9
            *Cmd: ""
        }
        *Constraints: LIST(MediaType.OEM_LIGHT, MediaType.OEM_HEAVY, PaperSize.CUSTOMSIZE,
+                          PaperSize.A6, PaperSize.B6_JIS, PaperSize.B6_ISO,
+                          PaperSize.ENV_10, PaperSize.ENV_C5, PaperSize.ENV_MONARCH, PaperSize.ENV_DL)
    }
    *Option: HORIZONTAL
    {
        *rcNameID: =FLIP_ON_SHORT_EDGE_DISPLAY
        *Command: CmdSelect
        {
            *Order: DOC_SETUP.9
            *Cmd: ""
        }
        *Constraints: LIST(MediaType.OEM_LIGHT, MediaType.OEM_HEAVY, PaperSize.CUSTOMSIZE,
+                          PaperSize.A6, PaperSize.B6_JIS, PaperSize.B6_ISO,
+                          PaperSize.ENV_10, PaperSize.ENV_C5, PaperSize.ENV_MONARCH, PaperSize.ENV_DL)
    }
}

*%******************************************************************************************
*%                                      Cursor and Page Commands
*%******************************************************************************************
*RotateCoordinate?: TRUE
*RotateRaster?: TRUE
*RotateFont?: TRUE

*MemoryUsage: LIST(RASTER)
*CursorXAfterCR: AT_PRINTABLE_X_ORIGIN
*BadCursorMoveInGrxMode: LIST(X_PORTRAIT,Y_LANDSCAPE)
*XMoveUnit: 300
*YMoveUnit: 300

*OutputDataFormat: H_BYTE
*CursorXAfterSendBlockData: AT_GRXDATA_ORIGIN
*CursorYAfterSendBlockData: AUTO_INCREMENT

*Command: CmdCR { *Cmd : "" }
*Command: CmdLF { *Cmd : "" }
*Command: CmdFF { *Cmd : "" }
*Command: CmdSendBlockData { *Cmd : "" }
