*GPDFileName: "DELIINKATBPRNDRV.gpd"
*GPDFileVersion: "1.2"
*GPDSpecVersion: "1.2"
*Include: "StdNames.gpd"
*ModelName: "Deli Inkjet Atb Series"
*MasterUnits: PAIR(600, 600)
*PrinterType: PAGE
*MaxCopies: 1


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

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

*%******************************************************************************************
*%                                 resource dll & resource ID
*%******************************************************************************************
*switch: Locale
{
    *case: Chinese_PRC
    {
        *ResourceDLL: "DELIINKATBPRNRS_zh-CN.dll"
    }
    *case: Chinese_Singapore
    {
        *ResourceDLL: "DELIINKATBPRNRS_zh-CN.dll"
    }
    *case: English_United_States
    {
        *ResourceDLL: "DELIINKATBPRNRS_en-US.dll"
    }
    *default:
    {
        *ResourceDLL: "DELIINKATBPRNRS_en-US.dll"
    }
}

*Macros: OEM_DEF_PaperSizeNames
{
    IDS_OEM_PAPER_JISB5_CK:        		2110
    IDS_OEM_MEDIA_HEAVY_CK:       		2112
    IDS_OEM_MEDIA_LIGHT_CK:        		2113
	IDS_OEM_MEDIA_MATTE_CK:        		2116
    IDS_OEM_PAPER_TAX_CK:          		2155
	IDS_OEM_PAPER_5R_CK:                2160
	IDS_OEM_PAPER_4R_CK:                2161
	IDS_OEM_PAPER_3R_CK:                2162
}

*%******************************************************************************************
*%                                      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
        *PageDimensions:  PAIR(4960, 7015)
        *Command: CmdSelect
        {
            *Order: DOC_SETUP.20
            *Cmd: ""
        }
        *switch: Orientation
        {
            *case: PORTRAIT
            {
                *PrintableArea: PAIR(4768, 6828)
                *PrintableOrigin: PAIR(96, 96)
                *CursorOrigin: PAIR(96, 96)
            }
            *case: LANDSCAPE_CC90
            {
                *PrintableArea: PAIR(4768, 6828)
                *PrintableOrigin: PAIR(96, 96)
                *CursorOrigin: PAIR(96, 6924)
            }
        }
    }
    *Option: A5
    {
        *rcNameID: =RCID_DMPAPER_SYSTEM_NAME
        *switch: Orientation
        {
            *case: PORTRAIT
            {
                *PrintableArea: PAIR(3328, 4770)
                *PrintableOrigin: PAIR(96, 96)
                *CursorOrigin: PAIR(96, 96)
            }
            *case: LANDSCAPE_CC90
            {
                *PrintableArea: PAIR(3328, 4770)
                *PrintableOrigin: PAIR(96, 96)
                *CursorOrigin: PAIR(96, 4866)
            }
        }
        *Constraints: LIST(MediaType.OEM_HEAVY_CK, MediaType.OEM_MATTE_CK)
    }
    *Option: ENV_C5
    {
        *rcNameID: =RCID_DMPAPER_SYSTEM_NAME
        *switch: Orientation
        {
            *case: PORTRAIT
            {
                *PrintableArea: PAIR(3648, 5220)
                *PrintableOrigin: PAIR(96, 96)
                *CursorOrigin: PAIR(96, 96)
            }
            *case: LANDSCAPE_CC90
            {
                *PrintableArea: PAIR(3648, 5220)
                *PrintableOrigin: PAIR(96, 96)
                *CursorOrigin: PAIR(96, 5316)
            }
        }
        *Constraints: LIST(MediaType.OEM_HEAVY_CK, MediaType.OEM_MATTE_CK)
    }
    *Option: ENV_DL
    {
        *rcNameID: =RCID_DMPAPER_SYSTEM_NAME
        *switch: Orientation
        {
            *case: PORTRAIT
            {
                *PrintableArea: PAIR(2400, 5004)
                *PrintableOrigin: PAIR(96, 96)
                *CursorOrigin: PAIR(96, 96)
            }
            *case: LANDSCAPE_CC90
            {
                *PrintableArea: PAIR(2400, 5004)
                *PrintableOrigin: PAIR(96, 96)
                *CursorOrigin: PAIR(96, 5100)
            }
        }
        *Constraints: LIST(MediaType.OEM_HEAVY_CK, MediaType.OEM_MATTE_CK)
    }
    *Option: DELI_B5_JIS_CK
    {
        *rcNameID: =IDS_OEM_PAPER_JISB5_CK
		*PageDimensions:  PAIR(4320, 6072)
        *Command: CmdSelect
        {
            *Order: DOC_SETUP.20
            *Cmd: ""
        }

        *switch: Orientation
        {
            *case: PORTRAIT
            {
                *PrintableArea: PAIR(4128, 5880)
                *PrintableOrigin: PAIR(96, 96)
                *CursorOrigin: PAIR(96, 96)
            }
            *case: LANDSCAPE_CC90
            {
                *PrintableArea: PAIR(4128, 5880)
                *PrintableOrigin: PAIR(96, 96)
                *CursorOrigin: PAIR(96, 5976)
            }
        }
        *Constraints: LIST(MediaType.OEM_HEAVY_CK, MediaType.OEM_MATTE_CK)
    }
    *Option: DELI_TAX_CK
    {
        *rcNameID: =IDS_OEM_PAPER_TAX_CK
        *PageDimensions:  PAIR(3779, 5905)
        *Command: CmdSelect
        {
            *Order: DOC_SETUP.20
            *Cmd: ""
        }
        *switch: Orientation
        {
            *case: PORTRAIT
            {
                *PrintableArea: PAIR(3584, 5712)
                *PrintableOrigin: PAIR(96, 96)
                *CursorOrigin: PAIR(96, 96)
            }
            *case: LANDSCAPE_CC90
            {
                *PrintableArea: PAIR(3584, 5712)
                *PrintableOrigin: PAIR(96, 96)
                *CursorOrigin: PAIR(96, 5808)
            }
        }
        *Constraints: LIST(MediaType.OEM_HEAVY_CK, MediaType.OEM_MATTE_CK)
    }
	*Option: DELI_3R_CK
    {
        *rcNameID: =IDS_OEM_PAPER_3R_CK
        *PageDimensions:  PAIR(2112, 3006)
        *Command: CmdSelect
        {
            *Order: DOC_SETUP.20
            *Cmd: ""
        }
        *switch: Orientation
        {
            *case: PORTRAIT
            {
                *PrintableArea: PAIR(1920, 2814)
                *PrintableOrigin: PAIR(96, 96)
                *CursorOrigin: PAIR(96, 96)
            }
            *case: LANDSCAPE_CC90
            {
                *PrintableArea: PAIR(1920, 2814)
                *PrintableOrigin: PAIR(96, 96)
                *CursorOrigin: PAIR(96, 2910)
            }
        }
        *Constraints: LIST(MediaType.OEM_LIGHT_CK, MediaType.OEM_MATTE_CK)
    }
	*Option: DELI_4R_CK
    {
        *rcNameID: =IDS_OEM_PAPER_4R_CK
        *PageDimensions:  PAIR(2400, 3600)
        *Command: CmdSelect
        {
            *Order: DOC_SETUP.20
            *Cmd: ""
        }
        *switch: Orientation
        {
            *case: PORTRAIT
            {
                *PrintableArea: PAIR(2208, 3408)
                *PrintableOrigin: PAIR(96, 96)
                *CursorOrigin: PAIR(96, 96)
            }
            *case: LANDSCAPE_CC90
            {
                *PrintableArea: PAIR(2208, 3408)
                *PrintableOrigin: PAIR(96, 96)
                *CursorOrigin: PAIR(96, 3504)
            }
        }
        *Constraints: LIST(MediaType.OEM_LIGHT_CK, MediaType.OEM_MATTE_CK)
    }
	*Option: DELI_5R_CK
    {
        *rcNameID: =IDS_OEM_PAPER_5R_CK
        *PageDimensions:  PAIR(3008, 4204)
        *Command: CmdSelect
        {
            *Order: DOC_SETUP.20
            *Cmd: ""
        }
        *switch: Orientation
        {
            *case: PORTRAIT
            {
                *PrintableArea: PAIR(2816, 4008)
                *PrintableOrigin: PAIR(96, 96)
                *CursorOrigin: PAIR(96, 96)
            }
            *case: LANDSCAPE_CC90
            {
                *PrintableArea: PAIR(2816, 4008)
                *PrintableOrigin: PAIR(96, 96)
                *CursorOrigin: PAIR(96, 4104)
            }
        }
        *Constraints: LIST(MediaType.OEM_LIGHT_CK, MediaType.OEM_MATTE_CK)
    }
	
	*Option: CUSTOMSIZE
    {
        *rcNameID: =USER_DEFINED_SIZE_DISPLAY
      
        *MinSize: PAIR(2084, 3000)
        *MaxSize: PAIR(5104, 8410)
        *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)/32)*32}
				*CustPrintableSizeY:  %d{(((PhysPaperLength - 192)+1)/16)*16}
				*CustPrintableOriginX:  %d{96}
				*CustPrintableOriginY:  %d{96}
            }
            *case: LANDSCAPE_CC90
            {
				*CustPrintableOriginX:  %d{96}
				*CustPrintableOriginY:  %d{96}
				*CustPrintableSizeX:  %d{(((PhysPaperWidth - 192)+1)/32)*32}
				*CustPrintableSizeY:  %d{(((PhysPaperLength - 192)+1)/16)*16}
                *CustCursorOriginX:  %d{96}
                *CustCursorOriginY:  %d{(((PhysPaperLength - 192)+1)/16)*16-96}
            }
        }
        *Constraints: LIST(InputBin.CASSETTE)
    }

}

*%******************************************************************************************
*%                                      Media Type
*%******************************************************************************************
*Feature: MediaType
{
    *rcNameID: =MEDIA_TYPE_DISPLAY
    *DefaultOption: OEM_LIGHT_CK
    *Option: OEM_LIGHT_CK
    {
        *rcNameID: =IDS_OEM_MEDIA_LIGHT_CK
        *OptionID:259
        *Command: CmdSelect
        {
            *Order: DOC_SETUP.15
            *Cmd: ""
        }
    }
    *Option: OEM_HEAVY_CK
    {
        *rcNameID: =IDS_OEM_MEDIA_HEAVY_CK
        *OptionID:258
        *Command: CmdSelect
        {
            *Order: DOC_SETUP.15
            *Cmd: ""
        }
    }
    *Option: OEM_MATTE_CK
    {
        *rcNameID: =IDS_OEM_MEDIA_MATTE_CK
        *OptionID:260
        *Command: CmdSelect
        {
            *Order: DOC_SETUP.15
            *Cmd: ""
        }
    }
}

*%******************************************************************************************
*%                                      Color Mode
*%******************************************************************************************
*ChangeColorModeOnDoc?: FALSE
*Feature: ColorMode
{
    *Name: "base color mode"
    *DefaultOption: 24bpp
    *Option: 24bpp
    {
        *Name: "Color Scale (24bpp)"
		*DevNumOfPlanes: 0
        *DevBPP: 1
        *DrvBPP: 24
        *PaletteSize: 256
        *PaletteProgrammable? : FALSE
		*ColorPlaneOrder: LIST(RED, GREEN, BLUE)
		*IPCallbackID: 1 
    }
	
	*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: ""
        }
    }
    *Option: HORIZONTAL
    {
        *rcNameID: =FLIP_ON_SHORT_EDGE_DISPLAY
        *Command: CmdSelect
        {
            *Order: DOC_SETUP.9
            *Cmd: ""
        }
    }
}

*%******************************************************************************************
*%                                      Print Order 
*%******************************************************************************************
*OutputOrderReversed?: TRUE

*%******************************************************************************************
*%                                      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 : "" }
