*GPDSpecVersion: "1.0"
*Include: "StdNames.gpd"
*GPDFileVersion: "1.101.0"
*GPDFileName: "DM212.GPD"
*ModelName: "Tally Dascom DM-212"
*MasterUnits: PAIR(160, 144)
*ResourceDLL: "TallyDascomDM.dll"
*PrinterType: SERIAL
*Feature: Orientation
{
    *rcNameID: =ORIENTATION_DISPLAY
    *DefaultOption: PORTRAIT
    *Option: PORTRAIT
    {
        *rcNameID: =PORTRAIT_DISPLAY
    }
    *Option: LANDSCAPE_CC270
    {
        *rcNameID: =LANDSCAPE_DISPLAY
    }
}
*Feature: InputBin
{
    *rcNameID: =PAPER_SOURCE_DISPLAY
 		*ConcealFromUI? : TRUE
    *DefaultOption: ROLLER
    *Option: ROLLER
    {
        *rcNameID:813
    }
}
*Feature: Resolution
{
    *rcNameID: =RESOLUTION_DISPLAY
    *DefaultOption: Option1
    *Option: Option1
    {
        *Name: "160 x 144 " =DOTS_PER_INCH
        *DPI: PAIR(160, 144)
        *TextDPI: PAIR(160, 144)
        *PinsPerLogPass: 16
        *PinsPerPhysPass: 8
        EXTERN_GLOBAL: *StripBlanks: LIST(LEADING,TRAILING)
        EXTERN_GLOBAL: *OutputDataFormat: V_BYTE
        *SpotDiameter: 170
        *Command: CmdSendBlockData { *Cmd : "<1B2A01>" %l{NumOfDataBytes} }
        *%Command: CmdEndBlockData { *Cmd : "<0D>" }
               
    }
    *Option: Option2
    {
        *Name: "160 x 72 " =DOTS_PER_INCH
        *DPI: PAIR(160, 72)
        *TextDPI: PAIR(160, 144)
        *PinsPerLogPass: 8
        *PinsPerPhysPass: 8
        EXTERN_GLOBAL: *StripBlanks: LIST(TRAILING)
        EXTERN_GLOBAL: *OutputDataFormat: V_BYTE
        *SpotDiameter: 140
        *Command: CmdSendBlockData { *Cmd : "<1B2A01>" %l{NumOfDataBytes} }
        *%Command: CmdEndBlockData { *Cmd : "<0D>" }
    }
    *Option: Option3
    {
        *Name: "80 x 72 " =DOTS_PER_INCH
        *DPI: PAIR(80, 72)
        *TextDPI: PAIR(160, 144)
        *PinsPerLogPass: 8
        *PinsPerPhysPass: 8
        EXTERN_GLOBAL: *StripBlanks: LIST(TRAILING)
        EXTERN_GLOBAL: *OutputDataFormat: V_BYTE
        *SpotDiameter: 140
        *Command: CmdSendBlockData { *Cmd : "<1B2A00>" %l{NumOfDataBytes} }
        *%Command: CmdEndBlockData { *Cmd : "<0D>" }
    }
}
*Feature: PaperSize
{
    *rcNameID: =PAPER_SIZE_DISPLAY
    *DefaultOption: Option1
    *Option: Option1
    {
        *rcNameID: 701
        *OptionID: 701
        *PageDimensions: PAIR(478, 1684)
        *PrintableArea: PAIR(420, 1684)
        *PrintableOrigin: PAIR(0, 0)
        *Command: CmdSelect
        {
            *Order: DOC_SETUP.4
            *Cmd: "<00>"
        }
    }
    *Option: Option2
    {
        *rcNameID: 702
        *OptionID: 702
        *PageDimensions: PAIR(480, 1457)
        *PrintableArea: PAIR(420, 1457)
        *PrintableOrigin: PAIR(0, 0)
    
        *Command: CmdSelect
        {
            *Order: DOC_SETUP.4
            *Cmd: "<00>"
        }
    }
    *Option: Option3
    {
        *rcNameID: 703
        *OptionID: 703
        *PageDimensions: PAIR(480, 864)
        *PrintableArea: PAIR(420, 864)
        *PrintableOrigin: PAIR(0, 0)
       
        *Command: CmdSelect
        {
            *Order: DOC_SETUP.4
            *Cmd: "<00>"
        }
    }
    *Option: Option4
    {
        *rcNameID: 704
        *OptionID: 704
        *PageDimensions: PAIR(480, 864)
        *PrintableArea: PAIR(420, 864)
        *PrintableOrigin: PAIR(0, 0)
     
        *Command: CmdSelect
        {
            *Order: DOC_SETUP.4
            *Cmd: "<00>"
        }
    }
    *Option: Option5
    {
        *rcNameID: 705
        *OptionID: 705
        *PageDimensions: PAIR(478, 1512)
        *PrintableArea: PAIR(420, 1512)
        *PrintableOrigin: PAIR(0, 0)
       
        *Command: CmdSelect
        {
            *Order: DOC_SETUP.4
            *Cmd: "<00>"
        }
    }
    *Option: Option6
    {
        *rcNameID: 706
        *OptionID: 706
        *PageDimensions: PAIR(480, 1512)
        *PrintableArea: PAIR(420, 1512)
        *PrintableOrigin: PAIR(0, 0)
     
        *Command: CmdSelect
        {
            *Order: DOC_SETUP.4
            *Cmd: "<00>"
        }
    }
    *Option: Option7
    {
        *rcNameID: 707
        *OptionID: 707
        *PageDimensions: PAIR(478, 1584)
        *PrintableArea: PAIR(420, 1584)
        *PrintableOrigin: PAIR(0, 0)
    
        *Command: CmdSelect
        {
            *Order: DOC_SETUP.4
            *Cmd: "<00>"
        }
    }
    *Option: Option8
    {
        *rcNameID: 708
        *OptionID: 708
        *PageDimensions: PAIR(480, 1584)
        *PrintableArea: PAIR(420, 1584)
        *PrintableOrigin: PAIR(0, 0)
    
        *Command: CmdSelect
        {
            *Order: DOC_SETUP.4
            *Cmd: "<00>"
        }
    }
    *Option: Option9
    {
        *rcNameID: 709
        *OptionID: 709
        *PageDimensions: PAIR(480, 18572)
        *PrintableArea: PAIR(420, 18572)
        *PrintableOrigin: PAIR(0, 0)
    
        *Command: CmdSelect
        {
            *Order: DOC_SETUP.4
            *Cmd: "<00>"
        }
    }
 *Option: CUSTOMSIZE
    {
        *rcNameID: =USER_DEFINED_SIZE_DISPLAY
        *MinSize: PAIR(160, 144)
        *MaxSize: PAIR(480, 18573)
        *MaxPrintableWidth: 420
        *MinLeftMargin: 0
        *TopMargin: 0
        *BottomMargin: 0
        *CenterPrintable?: FALSE
        *CursorOrigin: PAIR(0, 0)
        *Command: CmdSelect
        {
            *Order: DOC_SETUP.4
            *Cmd: "<00>"
        }
    }

}
*Feature: Halftone
{
    *rcNameID: =HALFTONING_DISPLAY
    *DefaultOption: HT_PATSIZE_AUTO
    *Option: HT_PATSIZE_AUTO
    {
        *rcNameID: =HT_AUTO_SELECT_DISPLAY
    }
    *Option: HT_PATSIZE_SUPERCELL_M
    {
        *rcNameID: =HT_SUPERCELL_DISPLAY
    }
    *Option: HT_PATSIZE_6x6_M
    {
        *rcNameID: =HT_DITHER6X6_DISPLAY
    }
    *Option: HT_PATSIZE_8x8_M
    {
        *rcNameID: =HT_DITHER8X8_DISPLAY
    }
}
*Feature: PaperType
{
    *rcNameID: 801
    *FeatureType: DOC_PROPERTY
    *DefaultOption: RECEIPT
    *Option: RECEIPT
    {
        *rcNameID: 700
    }
    *Option: TICKET
    {
        *rcNameID: 802
    }
}
*switch: PaperType
{
    *case: TICKET
    {
        *EjectPageWithFF?: FALSE
    }
    *default
    {
        *EjectPageWithFF?: TRUE
    }
}


*Feature: PrintMode
{
    *rcNameID: 600
    *FeatureType: PRINTER_PROPERTY
    *DefaultOption: DOUBLEPRN

    *Option: DOUBLEPRN
    {
        *rcNameID: 602
        *Command: CmdSelect   
        {
            *Order: DOC_SETUP.100
            *Cmd: "<1B>U<00>"
        }
    }
    *Option: SIMPLEPRN
    {
        *rcNameID: 601
        *Command: CmdSelect    
        {
            *Order: DOC_SETUP.100
            *Cmd: "<1B>U<01>"
        }
    }
}

*Feature: CashMode
{
    *rcNameID: 400
    *FeatureType: PRINTER_PROPERTY
    *DefaultOption:  Option1

    *Option:  Option1
    {
        *rcNameID: 401
    }
    *Option:  Option2
    {
        *rcNameID: 402
        *Command: CmdSelect
        {
            *Order: DOC_FINISH.100
            *Cmd: "<1B><70><00><33><00>"
        }
    }
    *Option:  Option3
    {
        *rcNameID: 403
        *Command: CmdSelect
        {
            *Order: DOC_SETUP.101
            *Cmd: "<1B><70><00><33><00>"
        }
    }
}

*Feature: BlackMarkMode
{
    *rcNameID: 510
    *FeatureType: PRINTER_PROPERTY
    *DefaultOption: Option1
    *Option: Option1   
    {
        *rcNameID: 511
        *Command: CmdSelect
        {
            *Order: PAGE_FINISH.100
            *Cmd: "<00>"
        }
    }
     *Option: Option2   
    {
        *rcNameID: 512
        *Command: CmdSelect
        {
            *Order: PAGE_FINISH.101
            *Cmd: "<1d><0c>"
        }
    }
    *Option: Option3
    {
        *rcNameID: 513
        *Command: CmdSelect
        {
            *Order: PAGE_SETUP.101
            *Cmd: "<1d><0c>"
        }
    }
}

*Feature: TearMode
{
    *rcNameID: 410
    *FeatureType: PRINTER_PROPERTY
    *DefaultOption: Option1
    *Option: Option1   
    {
        *rcNameID: 411
    }
     *Option: Option2
    {
        *rcNameID: 412
        *switch: BlackMarkMode
        {
        		*case: Option1
        		{
        				*Command: CmdSelect
        				{
            				*Order: DOC_FINISH.101
           				  *Cmd: "<1d>V<4280>"
                 }
            }
        		*case: Option2
        		{
        				*Command: CmdSelect
        				{
            				*Order: DOC_FINISH.101
           				  *Cmd: "<1d>V<4201>"
                 }
            }
	          *case: Option3
        		{
        				*Command: CmdSelect
        				{
            				*Order: DOC_FINISH.101
           				  *Cmd: "<1d>V<4201>"
                 }
            }
        }
    }
    *Option: Option3
    {
        *rcNameID: 413
        *switch: BlackMarkMode
        {
        		*case: Option1
        		{
        				*Command: CmdSelect
        				{
            				*Order: PAGE_FINISH.102
           				  *Cmd: "<1d>V<4280>"
                 }
            }
        		*case: Option2
        		{
        				*Command: CmdSelect
        				{
            				*Order: PAGE_FINISH.102
           				  *Cmd: "<1d>V<4201>"
                 }
            }
	          *case: Option3
        		{
        				*Command: CmdSelect
        				{
            				*Order: PAGE_FINISH.102
           				  *Cmd: "<1d>V<4201>"
                 }
            }
        }
     }
   
}

*Command: CmdStartDoc
{
    *Order: DOC_SETUP.0
    *Cmd: "<1B>@"
}
*Command: CmdStartPage
{
    *Order: PAGE_SETUP.1
    *Cmd: "<0D>"
}
*Command: CmdEndPage
{
    *Order: PAGE_FINISH.1
    *Cmd: "<00>"
}
*Command: CmdEndDoc 
{
    *Order: DOC_FINISH.1
    *Cmd: "<00>"
}
*Command: CmdEndJob
{
    *Order: JOB_FINISH.0
    *Cmd: "<1B40>"
}
*RotateCoordinate?: FALSE
*RotateRaster?: FALSE
*RotateFont?: FALSE
*switch: Orientation
{
    *case: PORTRAIT
    {
        *TextCaps: LIST(TC_OP_CHARACTER,TC_EA_DOUBLE,TC_UA_ABLE)
    }
    *case: LANDSCAPE_CC270
    {
        *TextCaps: LIST()
    }
}
*CursorXAfterCR: AT_CURSOR_X_ORIGIN
*YMoveAttributes: LIST(SEND_CR_FIRST)
*MaxLineSpacing: 255
*% *XMoveThreshold: 0
*YMoveThreshold: *
*% *XMoveUnit: 160
*YMoveUnit: 144
*Command: CmdYMoveRelDown { *Cmd : "<1B>J" %c[0,255]{max_repeat((DestYRel ) )} }
*% *Command: CmdXMoveAbsolute
*% {
*%     *CallbackID : 100
*%     *Params : LIST(DestX)
*% }
*Command: CmdCR { *Cmd : "<0D>" }
*Command: CmdLF { *Cmd : "<0A>" }
*Command: CmdFF { *Cmd : "<0C>" }
*Command: CmdUniDirectionOn { *Cmd : "<1B>U<01>" }
*Command: CmdUniDirectionOff { *Cmd : "<1B>U<00>" }
*OutputDataFormat: V_BYTE
*% *OptimizeLeftBound?: FALSE
*UseSpaceForXMove?:TRUE
*CursorXAfterSendBlockData: AT_GRXDATA_END
*CursorYAfterSendBlockData: NO_MOVE
*DefaultFont: 35
*DefaultCTT: 0
*switch: Orientation
{
    *case: PORTRAIT
    {
		*DeviceFonts: LIST(1,2,4,5,6,7,8,9,15,17,18,19,21,22,35,36,
+                   37,39,40,41,42,43,44)
	}
    *case: LANDSCAPE_CC270
    {
        *DeviceFonts: LIST()
    }
}
