*GPDFileName: "TH-330.gpd"
*GPDFileVersion: "1.1"
*GPDSpecVersion: "1.0"
*ModelName: "Starmach TH-330 "
*MasterUnits: PAIR(203, 203)
*Include: "StdNames.gpd"
*ResourceDLL: "TH24Res.dll"
*PrinterType: SERIAL
*PrintRateUnit: CPS *% 
*PrintRate: 220     *% 
 *CharPosition: BASELINE  *% 

*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: 1001
	}
}


*Feature: Resolution
{
	*rcNameID: =RESOLUTION_DISPLAY
	*DefaultOption: Option1
	*Option: Option1
	{
		*Name: "8 dots per mm"
	        *Command: CmdSendBlockData { *Cmd : ""}

		*DPI: PAIR(203, 203)
		*PinsPerLogPass: 24
		*PinsPerPhysPass: 1
		*TextDPI: PAIR(203, 203)
		*SpotDiameter: 100
    }
}


*Feature: PaperSize
{
	*rcNameID: =PAPER_SIZE_DISPLAY
	*DefaultOption: Option44
	*Option: Option1
	{
		*Name: "94mm x 145mm"
		*PageDimensions: PAIR(752, 1160)
		*PrintableArea: PAIR(752, 1160)
		*PrintableOrigin: PAIR(0, 0)
	}
	*Option: Option2
	{
		*Name: "94mm x 150mm"
		*PageDimensions: PAIR(752, 1200)
		*PrintableArea: PAIR(752, 1200)
		*PrintableOrigin: PAIR(0, 0)
	}
	*Option: Option3
	{
		*Name: "94mm x 190mm"
		*PageDimensions: PAIR(752, 1520)
		*PrintableArea: PAIR(752, 1520)
		*PrintableOrigin: PAIR(0, 0)
	}
	*Option: Option4
	{
		*Name: "94mm x 200mm"
		*PageDimensions: PAIR(752, 1600)
		*PrintableArea: PAIR(752, 1600)
		*PrintableOrigin: PAIR(0, 0)
	}
	*Option: Option5
	{
		*Name: "94mm x 210mm"
		*PageDimensions: PAIR(752, 1680)
		*PrintableArea: PAIR(752, 1680)
		*PrintableOrigin: PAIR(0, 0)
	}
	*Option: Option6
	{
		*Name: "100mm x 113mm"
		*PageDimensions: PAIR(800, 904)
		*PrintableArea: PAIR(800, 904)
		*PrintableOrigin: PAIR(0, 0)
	}
	*Option: Option7
	{
		*Name: "100mm x 145mm"
		*PageDimensions: PAIR(800, 1160)
		*PrintableArea: PAIR(800, 1160)
		*PrintableOrigin: PAIR(0, 0)
	}
	*Option: Option8
	{
		*Name: "100mm x 150mm"
		*PageDimensions: PAIR(800, 1200)
		*PrintableArea: PAIR(800, 1200)
		*PrintableOrigin: PAIR(0, 0)
	}
	*Option: Option9
	{
		*Name: "100mm x 190mm"
		*PageDimensions: PAIR(800, 1520)
		*PrintableArea: PAIR(800, 1520)
		*PrintableOrigin: PAIR(0, 0)
	}
	*Option: Option10
	{
		*Name: "100mm x 200mm"
		*PageDimensions: PAIR(800, 1600)
		*PrintableArea: PAIR(800, 1600)
		*PrintableOrigin: PAIR(0, 0)
	}
	*Option: Option11
	{
		*Name: "100mm x 210mm"
		*PageDimensions: PAIR(800, 1680)
		*PrintableArea: PAIR(800, 1680)
		*PrintableOrigin: PAIR(0, 0)
	}
	*Option: Option12
	{
		*Name: "105mm x 145mm"
		*PageDimensions: PAIR(840, 1160)
		*PrintableArea: PAIR(840, 1160)
		*PrintableOrigin: PAIR(0, 0)
	}
	*Option: Option13
	{
		*Name: "105mm x 150mm"
		*PageDimensions: PAIR(840, 1200)
		*PrintableArea: PAIR(840, 1200)
		*PrintableOrigin: PAIR(0, 0)
	}
	*Option: Option14
	{
		*Name: "105mm x 190mm"
		*PageDimensions: PAIR(840, 1520)
		*PrintableArea: PAIR(840, 1520)
		*PrintableOrigin: PAIR(0, 0)
	}
	*Option: Option15
	{
		*Name: "105mm x 200mm"
		*PageDimensions: PAIR(840, 1600)
		*PrintableArea: PAIR(840, 1600)
		*PrintableOrigin: PAIR(0, 0)
	}
	*Option: Option16
	{
		*Name: "105mm x 210mm"
		*PageDimensions: PAIR(840, 1680)
		*PrintableArea: PAIR(840, 1680)
		*PrintableOrigin: PAIR(0, 0)
	}
	*Option: Option17
	{
		*Name: "94mm x 187mm"
		*PageDimensions: PAIR(752, 1496)
		*PrintableArea: PAIR(752, 1496)
		*PrintableOrigin: PAIR(0, 0)
	}

*Option: Option18
	{
		*Name: "194mm x 87mm"
		*PageDimensions: PAIR(752, 1496)
		*PrintableArea: PAIR(752, 1496)
		*PrintableOrigin: PAIR(0, 0)
	}
*Option: Option19
	{
		*rcNameID: 7017
		*PageDimensions: PAIR(800, 1200)
		*PrintableArea: PAIR(800, 1200)
		*PrintableOrigin: PAIR(0, 0)
	}
	*Option: Option20
	{
		*rcNameID: 7018
		*PageDimensions: PAIR(800, 800)
		*PrintableArea: PAIR(800, 800)
		*PrintableOrigin: PAIR(0, 0)
	}
	*Option: Option21
	{
		*rcNameID: 7019
		*PageDimensions: PAIR(800, 904)
		*PrintableArea: PAIR(800, 904)
		*PrintableOrigin: PAIR(0, 0)
	}
	*Option: Option22
	{
		*rcNameID: 7020
		*PageDimensions: PAIR(800, 1200)
		*PrintableArea: PAIR(800, 1200)
		*PrintableOrigin: PAIR(0, 0)
	}
	*Option: Option23
	{
		*rcNameID: 7021
		*PageDimensions: PAIR(800, 1200)
		*PrintableArea: PAIR(800, 1200)
		*PrintableOrigin: PAIR(0, 0)
	}
	*Option: Option24
	{
		*rcNameID: 7022
		*PageDimensions: PAIR(800, 1200)
		*PrintableArea: PAIR(800, 1200)
		*PrintableOrigin: PAIR(0, 0)
	}
	*Option: Option25
	{
		*rcNameID: 7023
		*PageDimensions: PAIR(800, 1360)
		*PrintableArea: PAIR(800, 1360)
		*PrintableOrigin: PAIR(0, 0)
	}
	*Option: Option26
	{
		*rcNameID: 7024
		*PageDimensions: PAIR(800, 1440)
		*PrintableArea: PAIR(800, 1440)
		*PrintableOrigin: PAIR(0, 0)
	}
	*Option: Option27
	{
		*rcNameID: 7025
		*PageDimensions: PAIR(800, 1440)
		*PrintableArea: PAIR(800, 1440)
		*PrintableOrigin: PAIR(0, 0)
	}
	*Option: Option28
	{
		*rcNameID: 7026
		*PageDimensions: PAIR(800, 1440)
		*PrintableArea: PAIR(800, 1440)
		*PrintableOrigin: PAIR(0, 0)
	}
	*Option: Option29
	{
		*rcNameID: 7027
		*PageDimensions: PAIR(800, 1520)
		*PrintableArea: PAIR(800, 1520)
		*PrintableOrigin: PAIR(0, 0)
	}
	*Option: Option30
	{
		*rcNameID: 7028
		*PageDimensions: PAIR(800, 1192)
		*PrintableArea: PAIR(800, 1192)
		*PrintableOrigin: PAIR(0, 0)
	}
	*Option: Option31
	{
		*rcNameID: 7029
		*PageDimensions: PAIR(800, 1520)
		*PrintableArea: PAIR(800, 1520)
		*PrintableOrigin: PAIR(0, 0)
	}
	*Option: Option32
	{
		*rcNameID: 7030
		*PageDimensions: PAIR(800, 1608)
		*PrintableArea: PAIR(800, 1608)
		*PrintableOrigin: PAIR(0, 0)
	}
	*Option: Option33
	{
		*rcNameID: 7031
		*PageDimensions: PAIR(800, 1624)
		*PrintableArea: PAIR(800, 1624)
		*PrintableOrigin: PAIR(0, 0)
	}
	*Option: Option34
	{
		*rcNameID: 7032
		*PageDimensions: PAIR(800, 2000)
		*PrintableArea: PAIR(800, 2000)
		*PrintableOrigin: PAIR(0, 0)
	}
	*Option: Option35
	{
		*rcNameID: 7033
		*PageDimensions: PAIR(800, 2240)
		*PrintableArea: PAIR(800, 2240)
		*PrintableOrigin: PAIR(0, 0)
	}
	*Option: Option36
	{
		*rcNameID: 7034
		*PageDimensions: PAIR(800, 2320)
		*PrintableArea: PAIR(800, 2320)
		*PrintableOrigin: PAIR(0, 0)
	}
	*Option: Option37
	{
		*rcNameID: 7035
		*PageDimensions: PAIR(800, 600)
		*PrintableArea: PAIR(800, 600)
		*PrintableOrigin: PAIR(0, 0)
	}
	*Option: Option38
	{
		*rcNameID: 7036
		*PageDimensions: PAIR(800, 400)
		*PrintableArea: PAIR(800, 400)
		*PrintableOrigin: PAIR(0, 0)
	}
	*Option: Option39
	{
		*rcNameID: 7037
		*PageDimensions: PAIR(800, 200)
		*PrintableArea: PAIR(800, 200)
		*PrintableOrigin: PAIR(0, 0)
	}
	*Option: Option40
	{
		*rcNameID: 7038
		*PageDimensions: PAIR(400, 160)
		*PrintableArea: PAIR(400, 160)
		*PrintableOrigin: PAIR(0, 0)
	}
	*Option: Option41
	{
		*rcNameID: 7039
		*PageDimensions: PAIR(400, 240)
		*PrintableArea: PAIR(400, 240)
		*PrintableOrigin: PAIR(0, 0)
	}
	*Option: Option42
	{
		*rcNameID: 7040
		*PageDimensions: PAIR(320, 400)
		*PrintableArea: PAIR(320, 400)
		*PrintableOrigin: PAIR(0, 0)
	}
	*Option: Option43
	{
		*rcNameID: 7041
		*PageDimensions: PAIR(480, 320)
		*PrintableArea: PAIR(480, 320)
		*PrintableOrigin: PAIR(0, 0)
	}
	*Option: Option44
	{
		*Name: "100mm x 180mm"
		*PageDimensions: PAIR(800, 1440)
		*PrintableArea: PAIR(800, 1440)
		*PrintableOrigin: PAIR(0, 0)
	}
		*Option: Option45
	{
		*rcNameID: 7050
		*PageDimensions: PAIR(720, 400)
		*PrintableArea: PAIR(720, 400)
		*PrintableOrigin: PAIR(0, 0)
	}	
	*Option: Option46
	{
		*rcNameID: 7042
		*PageDimensions: PAIR(720, 440)
		*PrintableArea: PAIR(720, 440)
		*PrintableOrigin: PAIR(0, 0)
	}
	*Option: Option47
	{
		*rcNameID: 7043
		*PageDimensions: PAIR(720, 480)
		*PrintableArea: PAIR(720, 480)
		*PrintableOrigin: PAIR(0, 0)
	}	
	*Option: Option48
	{
		*rcNameID: 7044
		*PageDimensions: PAIR(720, 520)
		*PrintableArea: PAIR(720, 520)
		*PrintableOrigin: PAIR(0, 0)
	}	
	*Option: Option49
	{
		*rcNameID: 7045
		*PageDimensions: PAIR(720, 560)
		*PrintableArea: PAIR(720, 560)
		*PrintableOrigin: PAIR(0, 0)
	}	
	*Option: Option50
	{
		*rcNameID: 7046
		*PageDimensions: PAIR(720, 600)
		*PrintableArea: PAIR(720, 600)
		*PrintableOrigin: PAIR(0, 0)
	}	
	*Option: Option51
	{
		*rcNameID: 7047
		*PageDimensions: PAIR(720, 640)
		*PrintableArea: PAIR(720, 640)
		*PrintableOrigin: PAIR(0, 0)
	}	
	*Option: Option52
	{
		*rcNameID: 7048
		*PageDimensions: PAIR(720, 680)
		*PrintableArea: PAIR(720, 680)
		*PrintableOrigin: PAIR(0, 0)
	}	
	*Option: Option53
	{
		*rcNameID: 7048
		*PageDimensions: PAIR(720, 680)
		*PrintableArea: PAIR(720, 680)
		*PrintableOrigin: PAIR(0, 0)
	}	
	*Option: Option54
	{
		*rcNameID: 7049
		*PageDimensions: PAIR(720, 720)
		*PrintableArea: PAIR(720, 720)
		*PrintableOrigin: PAIR(0, 0)
	}	


	*Option: CUSTOMSIZE
	{
		*rcNameID: =USER_DEFINED_SIZE_DISPLAY
		*MinSize: PAIR(24, 24)
		*MaxSize: PAIR(864, 5892)
		*MaxPrintableWidth: 864
		*MinLeftMargin: 0
		*TopMargin: 0
		*BottomMargin: 0
		*CenterPrintable?: TRUE
		*CursorOrigin: PAIR(0, 0)
	}
}
*Feature: PrintDensity
{
	*FeatureType: PRINTER_PROPERTY
	*rcNameID: 6050
	*DefaultOption: Option6
	*Option: Option1
	{
		*Name:"1"
		*Command: CmdSelect
		{
			*Order: JOB_SETUP.0
			*Cmd: "<44><45><4E><53><49><54><59><20><30><0D><0A>"
		}
	}
	*Option: Option2
	{
		*Name:"2"
		*Command: CmdSelect
		{
			*Order: JOB_SETUP.0
			*Cmd: "<44><45><4E><53><49><54><59><20><31><0D><0A>"
		}
	}
	*Option: Option3
	{
		*Name:"3"
		*Command: CmdSelect
		{
			*Order: JOB_SETUP.0
			*Cmd: "<44><45><4E><53><49><54><59><20><32><0D><0A>"
		}
	}
	*Option: Option4
	{
		*Name:"4"
		*Command: CmdSelect
		{
			*Order: JOB_SETUP.0
			*Cmd: "<44><45><4E><53><49><54><59><20><33><0D><0A>"
		}
	}
	*Option: Option5
	{
		*Name:"5"
		*Command: CmdSelect
		{
			*Order: JOB_SETUP.0
			*Cmd: "<44><45><4E><53><49><54><59><20><34><0D><0A>"
		}
	}
	*Option: Option6
	{
		*Name:"6"
		*Command: CmdSelect
		{
			*Order: JOB_SETUP.0
			*Cmd: "<44><45><4E><53><49><54><59><20><35><0D><0A>"
		}
	}
	*Option: Option7
	{
		*Name:"7"
		*Command: CmdSelect
		{
			*Order: JOB_SETUP.0
			*Cmd: "<44><45><4E><53><49><54><59><20><36><0D><0A>"
		}
	}
	*Option: Option8
	{
		*Name:"8"
		*Command: CmdSelect
		{
			*Order: JOB_SETUP.0
			*Cmd: "<44><45><4E><53><49><54><59><20><37><0D><0A>"
		}
	}
	*Option: Option9
	{
		*Name:"9"
		*Command: CmdSelect
		{
			*Order: JOB_SETUP.0
			*Cmd: "<44><45><4E><53><49><54><59><20><38><0D><0A>"
		}
	}
	*Option: Option10
	{
		*Name:"10"
		*Command: CmdSelect
		{
			*Order: JOB_SETUP.0
			*Cmd: "<44><45><4E><53><49><54><59><20><39><0D><0A>"
		}
	}
}

*Feature: PrintSpeed
{
	*FeatureType: PRINTER_PROPERTY
	*rcNameID: 6078
	*DefaultOption: Option2
	*Option: Option1
	{
		*Name:"1"
		*Command: CmdSelect
		{
			*Order: JOB_SETUP.0
			*Cmd: "<53><50><45><45><44><20><30><0D><0A>"
		}
	}
	*Option: Option2
	{
		*Name:"2"
		*Command: CmdSelect
		{
			*Order: JOB_SETUP.0
			*Cmd: "<53><50><45><45><44><20><31><0D><0A>"
		}
	}
	*Option: Option3
	{
		*Name:"3"
		*Command: CmdSelect
		{
			*Order: JOB_SETUP.0
			*Cmd: "<53><50><45><45><44><20><32><0D><0A>"
		}
	}
	*Option: Option4
	{
		*Name:"4"
		*Command: CmdSelect
		{
			*Order: JOB_SETUP.0
			*Cmd: "<53><50><45><45><44><20><33><0D><0A>"
		}
	}
	*Option: Option5
	{
		*Name:"5"
		*Command: CmdSelect
		{
			*Order: JOB_SETUP.0
			*Cmd: "<53><50><45><45><44><20><34><0D><0A>"
		}
	}
	*Option: Option6
	{
		*Name:"6"
		*Command: CmdSelect
		{
			*Order: JOB_SETUP.0
			*Cmd: "<53><50><45><45><44><20><35><0D><0A>"
		}
	}
}

*Command: CmdStartJob
{
    *CallbackID: 1
    *Order: JOB_SETUP.1
    *Params: LIST(TextXRes, TextYRes)
}
*Command: CmdStartDoc
{
    *CallbackID: 5
    *Order: DOC_SETUP.1
    *Params: LIST(PhysPaperWidth, PhysPaperLength)
}

*Command: CmdYMoveRelDown 
{ 
    *CallbackID: 101
    *Params: DestYRel

    *%--- *Order: PAGE_SETUP.2
    *%--- *Cmd : "<1B>J" %c[0,255]{max_repeat((DestYRel / 2) )} 
}

*Command: CmdXMoveAbsolute { *Cmd : "" }



*Command: CmdStartPage
{
    *CallbackID: 6          *%  2019-1-11 Ôö¼Ó
    *Order: PAGE_SETUP.1
    *Params: LIST(RasterDataWidthInBytes, RasterDataHeightInPixels)

    *%    *Order: PAGE_SETUP.1
    *%    *Cmd: ""         
}


*Command: CmdEndPage
{
    *Order: PAGE_FINISH.1  
    
    *CallbackID: 99  *%--- 
    *%--- *Cmd: ""
}

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

*AbsXMovesRightOnly?: FALSE
*CursorXAfterCR: AT_PRINTABLE_X_ORIGIN
*YMoveAttributes: SEND_CR_FIRST
*UseSpaceForXMove?: FALSE

*YMoveThreshold: *
*XMoveUnit: 203
*YMoveUnit: 203

*Command: CmdCR : ""
*Command: CmdLF : ""
*Command: CmdFF : ""


*EjectPageWithFF?: TRUE                 *% 
*OutputDataFormat: H_BYTE
*RasterSendAllData?: TRUE
*OptimizeLeftBound?: FALSE
*CursorXAfterSendBlockData: AT_CURSOR_X_ORIGIN          *%AT_GRXDATA_END
*CursorYAfterSendBlockData: NO_MOVE
