*GPDSpecVersion: "1.01"
*Include: "StdNames.gpd"
*GPDFileVersion: "1.01"
*GPDFileName: "TH_Receipt.GPD"
*ModelName: "TH_Receipt"
*MasterUnits: PAIR(202, 204)
*ResourceDLL: "TH_Receipt.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
    *DefaultOption: Option1
    *Option: Option1
    {
        *rcNameID: 268
        *OptionID: 268
    }
}
*Feature: Resolution
{
    *Name: "Resolution"
    *rcNameID: =RESOLUTION_DISPLAY
    *DefaultOption: Option1
    *Option: Option1
   {
        *Name: "202 x 204 " =DOTS_PER_INCH
        *DPI: PAIR(202, 204)
        *TextDPI: PAIR(202, 204)
        *PinsPerPhysPass: 24
        *MinStripBlankPixels: 1
        EXTERN_GLOBAL: *StripBlanks: LIST(TRAILING)
        *SpotDiameter: 140
        *switch: Compression
        {
            *case: CompNormal
            {
                *PinsPerLogPass: 24
                EXTERN_GLOBAL: *OutputDataFormat: V_BYTE
               EXTERN_GLOBAL: *CursorYAfterSendBlockData: NO_MOVE
               *Command: CmdSendBlockData { *Cmd : "<1B>*!" %l{NumOfDataBytes / 3} }
            }
            *case: Compressed
            {
               *PinsPerLogPass: 1
               EXTERN_GLOBAL: *OutputDataFormat: H_BYTE
               EXTERN_GLOBAL: *CursorYAfterSendBlockData: AUTO_INCREMENT
              *Command: CmdEnableOEMComp {*Cmd:"<1B><2A><62><6D><32>"}
              *Command: CmdDisableCompression {*Cmd:"<1B><2A><62><6D><30>"}
              *Command: CmdSendBlockData { *Cmd : "<1B>*1" %l{NumOfDataBytes} }
            }
        }
    }
}
*Feature: Compression
{
    *Name:"Raster Compression"
    *rcNameID:=TEXT_QUALITY_DISPLAY
    *DefaultOption: Compressed
    *Option: CompNormal
    {
     *Name:"Uncompressed"
    }
    *Option: Compressed
    {
     *Name:"TIFF4 Compression"
    }
}
*Feature: PaperSize
{
    *rcNameID: =PAPER_SIZE_DISPLAY
    *DefaultOption: Option1
    *Option: Option1
    {
        *rcNameID: 258
        *OptionID: 258
        *PageDimensions: PAIR(640, 1632)
        *PrintableArea: PAIR(576, 1632)
        *PrintableOrigin: PAIR(32, 0)
    }
    *Option: Option2
    {
        *rcNameID: 259
        *OptionID: 259
        *PageDimensions: PAIR(640, 3264)
        *PrintableArea: PAIR(576, 3264)
        *PrintableOrigin: PAIR(32, 0)
    }
    *Option: Option3
    {
        *rcNameID: 260
        *OptionID: 260
        *PageDimensions: PAIR(640, 4486)
        *PrintableArea: PAIR(576, 4486)
        *PrintableOrigin: PAIR(32, 0)
        *switch: Resolution
        {
            *case: Option1
            {
                *PrintableArea: PAIR(576, 4485)
            }
        }
    }
    *Option: Option4
    {
        *rcNameID: 261
        *OptionID: 261
        *PageDimensions: PAIR(640, 7344)
        *PrintableArea: PAIR(576, 7344)
        *PrintableOrigin: PAIR(32, 0)
    }
    *Option: Option5
    {
        *rcNameID: 262
        *OptionID: 262
        *PageDimensions: PAIR(640, 32000)
        *PrintableArea: PAIR(576, 32000)
        *PrintableOrigin: PAIR(32, 0)
        *switch: Resolution
        {
            *case: Option1
            {
                *PrintableArea: PAIR(576, 31998)
            }
        }
    }
}
*Feature: MediaType
{
    *rcNameID: =MEDIA_TYPE_DISPLAY
    *DefaultOption: Option1
    *Option: Option1
    {
        *rcNameID: 263
        *OptionID: 263
        *Command: CmdSelect
        {
            *Order: DOC_SETUP.2
            *Cmd: "<1B>{<001B>V<00>"
        }
    }
    *Option: Option2
    {
        *rcNameID: 264
        *OptionID: 264
        *Command: CmdSelect
        {
            *Order: DOC_SETUP.2
            *Cmd: "<1B>{<001B>V<01>"
        }
    }
    *Option: Option3
    {
        *rcNameID: 265
        *OptionID: 265
        *Command: CmdSelect
        {
            *Order: DOC_SETUP.2
            *Cmd: "<1B>{<011B>V<00>"
        }
    }
    *Option: Option4
    {
        *rcNameID: 266
        *OptionID: 266
        *Command: CmdSelect
        {
            *Order: DOC_SETUP.2
            *Cmd: "<1B>{<011B>V<01>"
        }
    }
    *Option: Option5
    {
        *rcNameID: 267
        *OptionID: 267
        *Command: CmdSelect
        {
            *Order: DOC_SETUP.2
            *Cmd: "<1B12>"
        }
    }
}

*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: CashDrawerFeature
{
   *Name: "Cash Drawer"
   *rcNameID:=TEXT_QUALITY_DISPLAY
   *DefaultOption: CashDrawer1
    *Option: CashDrawer1
    {
            *Name: "CD 1"
            *Switch: CashDrawerEnable
            {
                *Case:  CashDrawerOpenEndDoc
                {
                     *Command: CmdSelect
                     {
                         *Order: DOC_FINISH.2
                         *Cmd: "<1B>p<00>@<FF>"
                     }
                }
				*Case:  CashDrawerOpenStartDoc
                {
                     *Command: CmdSelect
                     {
                         *Order: DOC_SETUP.2
                         *Cmd: "<1B>p<00>@<FF>"
                     }
                }	
                *Case:  CashDrawerClose
                {
                    *Command: CmdSelect
                    {
                      *Cmd: "<00>"
                    }
                }
            }
    }
    *Option: CashDrawer2
    {
        *Name: "CD 2"
            *Switch: CashDrawerEnable
            {
                *Case:  CashDrawerOpenEndDoc
                {
                     *Command: CmdSelect
                     {
                         *Order: DOC_FINISH.2
                         *Cmd: "<1B>p<01>@<FF>"
                     }
                }
				*Case:  CashDrawerOpenStartDoc
                {
                     *Command: CmdSelect
                     {
                         *Order: DOC_SETUP.2
                         *Cmd: "<1B>p<01>@<FF>"
                     }
                }
                *Case:  CashDrawerClose
                {
                    *Command: CmdSelect
                    {
                      *Cmd: "<00>"
                    }
                }
            }
    }
}

*Feature: CashDrawerEnable
{
   *Name: "Cash Drawer Open"
   *rcNameID:=TEXT_QUALITY_DISPLAY
   *DefaultOption: CashDrawerOpen
    *Option: CashDrawerOpenEndDoc
    {
        *Name: "Open End Doc"
        *Command: CmdSelect
        {
            *Order: DOC_FINISH.2
            *Cmd: "<00>"
        }
	}
	*Option: CashDrawerOpenStartDoc
    {
		*Name: "Open Start Doc"
        *Command: CmdSelect
        {
           	*Order: DOC_SETUP.2
            *Cmd: "<00>"
        }
    }
    *Option: CashDrawerClose
    {
        *Name: "Don't Open"
        *Command: CmdSelect
        {
            *Order: DOC_FINISH.2
            *Cmd: "<00>"
        }
    }
}

*Feature: Knife
{
   *Name: "Knife Cut"
   *rcNameID:=TEXT_QUALITY_DISPLAY
   *DefaultOption: PaperCutPartialED
   *Option: PaperCutPartialED
   {
        *Name: "Partial Cut End Doc"
        *Command: CmdSelect
        {
            *Order: DOC_FINISH.1
            *Cmd: "<1B>J<A01A>"
        }
    }
	 
   *Option: PaperCutFullED
    {
        *Name: "Full Cut End Doc"
        *Command: CmdSelect
        {
            *Order: DOC_FINISH.1
            *Cmd: "<1B>J<A019>"
        }
    }

    *Option: PaperCutPartialEP
    {
        *Name: "Partial Cut End Page"
        *Command: CmdSelect
        {
            *Order: PAGE_FINISH.1
            *Cmd: "<1B>J<A01A>"
        }
    }

    *Option: PaperCutFullEP
    {
        *Name: "Full Cut End Page"
        *Command: CmdSelect
        {
            *Order: PAGE_FINISH.1
            *Cmd: "<1B>J<A019>"
        }
    }

    *Option: PaperCutNone
    {
        *Name: "No Cut"
        *Command: CmdSelect
        {
            *Order: DOC_FINISH.1
            *Cmd: "<1B>J<A0>"
        }
    }
	*Option: BackUpAfterPCKnifeCutEJ
    {
        *Name: "Backup After Knife Cut Partial Cut End Job"
        *Command: CmdSelect
        {
            *Order: JOB_FINISH.1
    		*Cmd: "<1D5642FF>"
        }
    }
	
	*Option: BackUpAfterFCKnifeCutEP
    {
        *Name: "Backup After Knife Cut Full Cut End Page"
        *Command: CmdSelect
        {
            *Order: PAGE_FINISH.1
    		*Cmd: "<1D5643FF>"
        }
    }
}


*Feature: StartOfDocOpt
{
   *Name: "Printer Initialization"
   *rcNameID:=TEXT_QUALITY_DISPLAY
   *DefaultOption: Initialize 
	*Option: Initialize
	{
     *Name: "Start of Document"


         *Command: CmdStartDoc
        {
          *Order: DOC_SETUP.1
          *Cmd: "<1B>@<1F035B80>"
        }
	}
	*Option: NoInit
    {
        *Name: "None"

         *Command: CmdStartDoc
        {
          *Order: DOC_SETUP.1
          *Cmd: "<1F035B80>"
        }
    }
}

*Command: CmdEndPage
{
    *Order: PAGE_FINISH.1
    *Cmd: "<1B>J6"
}

*Command: CmdEndDOC
{
    *Order: DOC_FINISH.1
    *Cmd: "<1B>J6"
}


*Command: CmdEndJob
{
    *Order: JOB_FINISH.1
    *Cmd: "<>"
}

*RotateCoordinate?: FALSE
*RotateRaster?: FALSE
*RotateFont?: FALSE
*switch: Orientation
{
    *case: PORTRAIT
    {
        *TextCaps: LIST(TC_OP_CHARACTER,TC_EA_DOUBLE,TC_IA_ABLE,TC_UA_ABLE)
    }
    *case: LANDSCAPE_CC270
    {
        *TextCaps: LIST()
    }
}
*CursorXAfterCR: AT_CURSOR_X_ORIGIN
*YMoveAttributes: LIST(SEND_CR_FIRST)
*MaxLineSpacing: 0
*XMoveThreshold: 0
*YMoveThreshold: *
*XMoveUnit: 202
*YMoveUnit: 204
*Command: CmdXMoveAbsolute { *Cmd : "<1B>$" %l{DestX} }
*Command: CmdYMoveRelDown { *Cmd : "<001B>J" %c{DestYRel} }
*Command: CmdSetLineSpacing { *Cmd : "<1B>3" %c{LinefeedSpacing} }
*Command: CmdCR { *Cmd : "<0D>" }
*Command: CmdLF { *Cmd : "<0A>" }
*Command: CmdFF { *Cmd : "<0C>" }
*EjectPageWithFF?: TRUE
*%OutputDataFormat: V_BYTE
*OptimizeLeftBound?: FALSE
*CursorXAfterSendBlockData: AT_CURSOR_X_ORIGIN
*%CursorYAfterSendBlockData: AUTO_INCREMENT
*DefaultFont: 1
*DefaultCTT: -1
*switch: Orientation
{
    *case: PORTRAIT
    {
        *DeviceFonts: LIST(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,
+                   17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,
+                   33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,
+                   49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,
+                   65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,
+                   81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,
+                   97,98,99,100,101,102,103,104,105)
    }
    *case: LANDSCAPE_CC270
    {
        *DeviceFonts: LIST()
    }
}
*Command: CmdBoldOn { *Cmd : "<1B>E1" }
*Command: CmdBoldOff { *Cmd : "<1B>E0" }
*Command: CmdItalicOn { *Cmd : "<1B>I1" }
*Command: CmdItalicOff { *Cmd : "<1B>I0" }
*Command: CmdUnderlineOn { *Cmd : "<1B>-1" }
*Command: CmdUnderlineOff { *Cmd : "<1B>-0" }
