*%
*% Copyright (c) 1997 - 1999 Microsoft Corporation
*% All Rights Reserved.
*%
*GPDSpecVersion: "1.0"
*GPDFileVersion: "5.0"
*GPDFileName: "MP-360K.GPD"
*Include: "StdNames.gpd"
*CodePage: 936
*ModelName: "实达MP-360K"
*MasterUnits: PAIR(504, 864)
*ResourceDLL: "sr9res.dll"
*PrintRateUnit: CPS
*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: MANUAL
		*Option: MANUAL
		{
				*rcNameID: =MANUAL_FEED_DISPLAY
		}
}

*Feature: Resolution
{
		*rcNameID: =RESOLUTION_DISPLAY
		*DefaultOption: Option4
		*Option: Option1
		{
				*Name: "84 x 72 " =DOTS_PER_INCH
				*DPI: PAIR(84, 72)
				*TextDPI: PAIR(84,72)
				*PinsPerLogPass: 8
				*PinsPerPhysPass: 8
				*MinStripBlankPixels: 840
				EXTERN_GLOBAL: *StripBlanks: LIST(LEADING,ENCLOSED,TRAILING)
				*SpotDiameter: 100
				*Command: CmdSendBlockData{ *CallbackID: 20
             								 				*Params: LIST(NumOfDataBytes)
																	}*%Cmd : "<1B>*<00>" %l{NumOfDataBytes}
		}
		*Option: Option2
		{
				*Name: "168 x 72 " =DOTS_PER_INCH
				*DPI: PAIR(168, 72)
				*TextDPI: PAIR(168, 72)
				*PinsPerLogPass: 8
				*PinsPerPhysPass: 8
				*MinStripBlankPixels: 840
				EXTERN_GLOBAL: *StripBlanks: LIST(LEADING,ENCLOSED,TRAILING)
				*SpotDiameter: 168
				*Command: CmdSendBlockData{ *CallbackID: 21
              											*Params: LIST(NumOfDataBytes)
              										}*%Cmd : "<1B>*<01>" %l{NumOfDataBytes} }
		}
		*Option: Option3
		{
				*Name: "84 x 144 " =DOTS_PER_INCH
				*DPI: PAIR(84, 144)
				*TextDPI: PAIR(84,144)
				*PinsPerLogPass: 16
				*PinsPerPhysPass: 16
				*MinStripBlankPixels: 840
				EXTERN_GLOBAL: *StripBlanks: LIST(LEADING,ENCLOSED,TRAILING)
				*SpotDiameter: 100
				*Command: CmdSendBlockData{ *CallbackID: 22
              											*Params: LIST(NumOfDataBytes)
              										}*%Cmd : "<1B>*<02>" %l{NumOfDataBytes} }
		}
		*Option: Option4
		{
				*Name: "168 x 144 " =DOTS_PER_INCH
				*DPI: PAIR(168, 144)
				*TextDPI: PAIR(168,144)
				*PinsPerLogPass: 16
				*PinsPerPhysPass: 16
				*MinStripBlankPixels: 840
				EXTERN_GLOBAL: *StripBlanks: LIST(LEADING,ENCLOSED,TRAILING)
				*SpotDiameter: 168
				*Command: CmdSendBlockData{	*CallbackID: 23
              											*Params: LIST(NumOfDataBytes)
              										}*%Cmd : "<1B>*<03>" %l{NumOfDataBytes} }
		}

		*Option: Option5
		{
				*Name: "168 x 216 " =DOTS_PER_INCH
				*DPI: PAIR(168, 216)
				*TextDPI: PAIR(168,216)
				*PinsPerLogPass: 16
				*PinsPerPhysPass: 16
				*MinStripBlankPixels: 840
				EXTERN_GLOBAL: *StripBlanks: LIST(LEADING,ENCLOSED,TRAILING)
				*SpotDiameter: 168
				*Command: CmdSendBlockData{ *CallbackID: 24
              											*Params: LIST(NumOfDataBytes)
              										}*%Cmd : "<1B>*<04>" %l{NumOfDataBytes} }
		}
		*Option: Option6
		{
				*Name: "168 x 288 " =DOTS_PER_INCH
				*DPI: PAIR(168, 288)
				*TextDPI: PAIR(168,288)
				*PinsPerLogPass: 16
				*PinsPerPhysPass: 16
				*MinStripBlankPixels: 840
				EXTERN_GLOBAL: *StripBlanks: LIST(LEADING,ENCLOSED,TRAILING)
				*SpotDiameter: 168
				*Command: CmdSendBlockData{	*CallbackID: 25
              											*Params: LIST(NumOfDataBytes)
              										}*%Cmd : "<1B>*<05>" %l{NumOfDataBytes} }
		}
}

*Feature: PaperSize
{
		*rcNameID: =PAPER_SIZE_DISPLAY
		*DefaultOption: Option2   											 		*% 默认纸张类型改为 76 x 127 mm add by hl 2008-3-20 10:25:09

		*Option: Option1
		{
				*Name:"Roll Paper 76x127mm"
				*PageDimensions: PAIR(1512,4320)
				*PrintableArea:  PAIR(1260, 4320)						 		*% 修改可打印区域宽度
				*PrintableOrigin: PAIR(120, 0)
				
				*Command: CmdSelect
        {
            *Order: DOC_SETUP.2
            *CallbackID: 15
            *Params: LIST(PhysPaperLength)
        }
		 }


	 *Option: Option2
		{
				*Name:"Roll Paper 57x127mm"
				*PageDimensions: PAIR(1131,  4320)
				*PrintableArea:  PAIR(840,  4320)
				*PrintableOrigin: PAIR(120, 0)

				*Command: CmdSelect
        {
            *Order: DOC_SETUP.2
            *CallbackID: 15
            *Params: LIST(PhysPaperLength)
        }
		}

		*% add new papersize   by hl 2007-12-29 11:05:47

		*Option: Option3
		{
				*Name:"Roll Paper 76x50mm"
				*PageDimensions: PAIR(1512, 1728)
				*PrintableArea:  PAIR(1260, 1728)
				*PrintableOrigin: PAIR(120, 0)

				*Command: CmdSelect
        {
            *Order: DOC_SETUP.2
            *CallbackID: 15
            *Params: LIST(PhysPaperLength)
        }
		}

	 *Option: Option4
		{
				*Name:"Roll Paper 57x50mm"
				*PageDimensions: PAIR(1131, 1728)
				*PrintableArea:  PAIR(840,  1728)
				*PrintableOrigin: PAIR(120, 0)

				*Command: CmdSelect
        {
            *Order: DOC_SETUP.2
            *CallbackID: 15
            *Params: LIST(PhysPaperLength)
        }
		}

		*% add new paper size end!

		*% add new papersize   by hl 2008-1-8 13:47:46

		*Option: Option5
		{
				*Name:"Roll Paper 76mm x 4/3 inch"
				*PageDimensions: PAIR(1512, 1152)
				*PrintableArea:  PAIR(1260, 1152)
				*PrintableOrigin: PAIR(120, 0)

				*Command: CmdSelect
        {
            *Order: DOC_SETUP.2
            *CallbackID: 15
            *Params: LIST(PhysPaperLength)
        }
		}

	 *Option: Option6
		{
				*Name:"Roll Paper 57mm x 4/3 inch"
				*PageDimensions: PAIR(1131, 1152)
				*PrintableArea:  PAIR(840,  1152)
				*PrintableOrigin: PAIR(120, 0)

				*Command: CmdSelect
        {
            *Order: DOC_SETUP.2
            *CallbackID: 15
            *Params: LIST(PhysPaperLength)
        }
		}

		*% add new paper size end!

	*%add by hl 2006-8-3 11:59上午
	*Option: CUSTOMSIZE
	{
				*rcNameID: =USER_DEFINED_SIZE_DISPLAY
				*MinSize: PAIR(92, 176)
				*MaxSize: PAIR(1512, 17280)
				*MaxPrintableWidth: 1512
				*MinLeftMargin: 0
				*CenterPrintable?: FALSE
				*CursorOrigin:  PAIR(0, 0)

				*Command: CmdSelect
        {
            *Order: DOC_SETUP.2
            *CallbackID: 15
            *Params: LIST(PhysPaperLength)
        }
		}
 }

*% add duble and uniduble direction options		2007-4-4 11:46  add by hl
*Feature: PrintQuality
{
		*rcNameID: =TEXT_QUALITY_DISPLAY
		*DefaultOption: Duble_QUALITY
		*%DefaultOption: Uni_Duble_QUALITY
		*Option: Option1
		{
				*%Name: "Auto Select"
				 *Name: "自动选择"
		}
		*Option:Duble_QUALITY
		{
				*%Name: "UniDirection Off"
				*Name: "双向质量"
				*Command: CmdSelect
				{
						*Order: DOC_SETUP.2
						*Cmd: "<1B>U<00>"
				}
		}
		*Option: Uni_Duble_QUALITY
		{
				*%Name: "UniDirection On"
				*Name: "单向质量"
				*Command: CmdSelect
				{
						*Order: DOC_SETUP.2
						*Cmd: "<1B>U<01>"
				}
		}
}


*Command: CmdStartDoc
{
		*Order: DOC_SETUP.1
		*%Cmd: "<1B>@"
		*CallbackID: 11

}
*Command: CmdStartPage
{
		*Order: PAGE_SETUP.1
		*CallbackID: 12
}

*Command: CmdEndPage
{
		*Order: PAGE_FINISH.1
		*CallbackID: 13
}

*Command: CmdEndDoc
{
		*Order: DOC_FINISH.1
		*CallbackID: 14
}

*RotateCoordinate?: FALSE
*RotateRaster?: FALSE
*RotateFont?: FALSE
*switch: Orientation
{
		*case: PORTRAIT
		{
				*TextCaps: LIST(TC_OP_CHARACTER,TC_EA_DOUBLE,TC_IA_ABLE,TC_RA_ABLE)
		}
		*case: LANDSCAPE_CC270
		{
				*TextCaps: LIST(TC_RA_ABLE)
		}
}
*CursorXAfterCR: AT_CURSOR_X_ORIGIN
*YMoveAttributes: LIST(SEND_CR_FIRST)
*MaxLineSpacing: 255
*%XMoveThreshold: 0
*YMoveThreshold: *
*%XMoveUnit: 85
*YMoveUnit: 144
*%Command: CmdXMoveAbsolute { *Cmd : "<1B>$" %l{(DestX / 6) } }
*%Command: CmdXMoveAbsolute { *Cmd : "<1B>$" %l[0,1486]{max_repeat(DestX )} }
*Command: CmdYMoveRelDown
{
*CallbackID: 18
*Params: LIST(DestYRel)
} *%Cmd : "<1B>J" %c[0,255]{max_repeat(DestYRel/6)}   *% 纵向DPI加倍，则纵向走纸的值要重新计算，除数也加倍
																																								 *%	 rebuild by huangl 2008-3-20 11:26:07
*Command: CmdSetLineSpacing { *Cmd : "<1B>3" %c[0,255]{(LinefeedSpacing / 2) } }
*Command: CmdCR { *Cmd : "<0D>" }
*Command: CmdLF { *CallbackID: 26 }*%Cmd : "<0A>"
*Command: CmdFF {*CallbackID: 16 }   *%{ *Cmd : "<0C>" }     *% rebuild by hl 2010.11.18
*Command: CmdBackSpace { *Cmd : "<08>" }
*Command: CmdUniDirectionOn { *Cmd : "<1B>U<01>" }
*Command: CmdUniDirectionOff { *Cmd : "<1B>U<00>" }
*EjectPageWithFF?: TRUE
*OutputDataFormat: V_BYTE
*OptimizeLeftBound?: FALSE
*CursorXAfterSendBlockData: AT_GRXDATA_END
*CursorYAfterSendBlockData: NO_MOVE
*DefaultFont: 3
*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)
		}
		*case: LANDSCAPE_CC270
		{
				*DeviceFonts: LIST()
		}
}
*Command: CmdBoldOn { *Cmd : "<1B>E" }
*Command: CmdBoldOff { *Cmd : "<1B>F" }
*Command: CmdItalicOn { *Cmd : "<1B>4" }
*Command: CmdItalicOff { *Cmd : "<1B>5" }
*Command: CmdUnderlineOn { *Cmd : "<1B>-<01>" }
*Command: CmdUnderlineOff { *Cmd : "<1B>-<00>" }
