*GPDSpecVersion: "1.0"
*Include: "StdNames.gpd"
*GPDFileVersion: "1.0"
*GPDFileName: "CTP180.GPD"
*ModelName: "Jolimark CTP-180"
*MasterUnits: PAIR(203, 203)
*ResourceDLL: "CTP180.Dll"
*PrinterType: SERIAL
*Feature: Orientation
{
    *rcNameID: =ORIENTATION_DISPLAY
    *DefaultOption: PORTRAIT
    *Option: PORTRAIT
    {
        *rcNameID: =PORTRAIT_DISPLAY
    }
    *Option: LANDSCAPE_CC270
    {
        *rcNameID: =LANDSCAPE_DISPLAY
    }
}
*% the cutter
*Feature: InputBin
{
    *rcNameID: =PAPER_SOURCE_DISPLAY
    *DefaultOption: Option1
    *Option: Option1
    {
        *rcNameID: 266
        *OptionID: 266
        *Command: CmdSelect
        {
            *Order: DOC_FINISH.3
            *Cmd: ""
*%          	*Cmd: "<1B>J<8E>"
        }
    }
    *Option: Option2
    {
        *rcNameID: 280
        *OptionID: 280
        *Command: CmdSelect
        {
            *Order: PAGE_FINISH.3
            *Cmd: ""
*%            *Cmd: "<1B>J<8E>"
        }
    }
}
*Feature: Resolution
{
    *rcNameID: =RESOLUTION_DISPLAY
    *DefaultOption: Option1
    *Option: Option1
    {
        *Name: "203 x 203 " =DOTS_PER_INCH
        *DPI: PAIR(203, 203)
        *TextDPI: PAIR(203, 203)
        *PinsPerLogPass: 24
        *PinsPerPhysPass: 24
        *MinStripBlankPixels: 72
        EXTERN_GLOBAL: *StripBlanks: LIST(LEADING,ENCLOSED,TRAILING)
        *SpotDiameter: 100
        *Command: CmdSendBlockData { *Cmd : "<1B>*!" %l{(NumOfDataBytes / 3) } }
    }
}
*Feature: PaperSize
{
    *rcNameID: =PAPER_SIZE_DISPLAY
    *DefaultOption: Option3
    *Option: Option1
    {
        *rcNameID: 259
        *OptionID: 259
        *PageDimensions: PAIR(464, 2374)
        *PrintableArea: PAIR(384, 2374)
        *PrintableOrigin: PAIR(40, 0)
        *Command: CmdSelect
        {
            *Order: PAGE_SETUP.2
            *Cmd: "<1B>2<00><1D578001><1D4CD800>"
        }
    }
    *Option: Option2
    {
        *rcNameID: 258
        *OptionID: 258
        *PageDimensions: PAIR(640, 2374)
        *PrintableArea: PAIR(576, 2374)
        *PrintableOrigin: PAIR(32, 0)
        *Command: CmdSelect
        {
            *Order: PAGE_SETUP.2
            *Cmd: "<1B>2<00><1D574002><1D4C7800>"
        }
    }
    *Option: Option3
    {
        *rcNameID: 295
        *OptionID: 295
        *PageDimensions: PAIR(816, 2374)
        *PrintableArea: PAIR(816, 2374)
        *PrintableOrigin: PAIR(0, 0)
        *Command: CmdSelect
        {
            *Order: PAGE_SETUP.2
            *Cmd: "<1B>2<00><1D573003><1D4C0000>"
        }
    }
    *Option: Option4
    {
        *rcNameID: 260
        *OptionID: 260
        *PageDimensions: PAIR(864, 2374)
        *PrintableArea: PAIR(864, 2374)
        *PrintableOrigin: PAIR(0, 0)
        *Command: CmdSelect
        {
            *Order: PAGE_SETUP.2
            *Cmd: "<1B>2<00><1D576003><1D4C0000>"
        }
    }
    *Option: CUSTOMSIZE
    {
        *rcNameID: =USER_DEFINED_SIZE_DISPLAY
        *MinSize: PAIR(203, 208)
        *MaxSize: PAIR(864, 32767)
        *MaxPrintableWidth: 816
        *MinLeftMargin: 0
        *CenterPrintable?: FALSE
        *Command: CmdSelect
        {
            *Order: PAGE_SETUP.2
            *Cmd: "<1B>2<00><1D57>" %l{PhysPaperWidth } "<1D4C>" %l{(864-PhysPaperWidth)/2-24 }	*% 108*8=864
        }
    }
}
*% cash drawer
*%*Feature: MediaType
*%{
*%    *rcNameID: =MEDIA_TYPE_DISPLAY
*%    *DefaultOption: Option1
*%    *Option: Option1
*%    {
*%        *rcNameID: 261
*%        *OptionID: 261
*%    }
*%    *Option: Option2
*%    {
*%        *rcNameID: 262
*%        *OptionID: 262
*%        *Command: CmdSelect
*%        {
*%            *Order: DOC_SETUP.5
*%            *Cmd: "<1B>p<00FFFF><1B>p<01FFFF>"
*%        }
*%    }
*%    *Option: Option3
*%    {
*%        *rcNameID: 263
*%        *OptionID: 263
*%        *Command: CmdSelect
*%        {
*%            *Order: DOC_FINISH.4
*%            *Cmd: "<1B>p<00FFFF><1B>p<01FFFF>"
*%        }
*%    }
*%}

*%*Feature: PrintQuality *% NV Logo andsoon

*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: JobIntegrityProtocol
{
    *rcNameID: 290
    *DefaultOption: Option1
    *Option: Option1
    {
        *rcNameID: 291
    }
    *Option: Option2
    {
        *rcNameID: 292
        *Command: CmdSelect
        {
            *Order: DOC_SETUP.1
            *Cmd: "<1A0101011A01020F1A010301>"
        }
    }
*%    *Option: Option3
*%    {
*%        *rcNameID: 293
*%        *Command: CmdSelect
*%        {
*%            *Order: DOC_SETUP.1
*%            *Cmd: "<1A0101011A01020F>"
*%        }
*%    }
*%    *Option: Option4
*%    {
*%        *rcNameID: 294
*%        *Command: CmdSelect
*%        {
*%            *Order: DOC_SETUP.1
*%            *Cmd: "<1A010301>"
*%        }
*%    }
}

*Feature: Logo
{
    *%*rcNameID: =TEXT_QUALITY_DISPLAY
    *rcNameID: 281
    *DefaultOption: Option1
    *Option: Option1
    {
        *rcNameID: 268
    }
    *Option: Option2
    {
        *rcNameID: 269
        *Command: CmdSelect
        {
            *Order: DOC_SETUP.6
            *Cmd: "<1B>a1<1C>p<0100><1B>a0"
        }
    }
    *Option: Option3
    {
        *rcNameID: 270
        *Command: CmdSelect
        {
            *Order: DOC_SETUP.6
            *Cmd: "<1B>a1<1C>p<0200><1B>a0"
        }
    }
    *Option: Option4
    {
        *rcNameID: 271
        *Command: CmdSelect
        {
            *Order: DOC_SETUP.6
            *Cmd: "<1B>a1<1C>p<0300><1B>a0"
        }
    }
    *Option: Option5
    {
        *rcNameID: 272
        *Command: CmdSelect
        {
            *Order: DOC_SETUP.6
            *Cmd: "<1B>a1<1C>p<0400><1B>a0"
        }
    }
    *Option: Option6
    {
        *rcNameID: 273
        *Command: CmdSelect
        {
            *Order: PAGE_SETUP.3
            *Cmd: "<1B>a1<1C>p<0100><1B>a0"
        }
    }
    *Option: Option7
    {
        *rcNameID: 274
        *Command: CmdSelect
        {
            *Order: PAGE_SETUP.3
            *Cmd: "<1B>a1<1C>p<0200><1B>a0"
        }
    }
    *Option: Option8
    {
        *rcNameID: 275
        *Command: CmdSelect
        {
            *Order: PAGE_SETUP.3
            *Cmd: "<1B>a1<1C>p<0300><1B>a0"
        }
    }
    *Option: Option9
    {
        *rcNameID: 276
        *Command: CmdSelect
        {
            *Order: PAGE_SETUP.3
            *Cmd: "<1B>a1<1C>p<0400><1B>a0"
        }
    }
}

*Feature: Beep
{
	*rcNameID: 282
	*DefaultOption: Option1
	*Option: Option1
	{
		*rcNameID: 283
	}
	*Option: Option2
	{
		*rcNameID: 284
		*Command: CmdSelect
		{
			*Order: PAGE_FINISH.5
			*Cmd: "<1B07141401>"
		}
	}
		*Option: Option3
	{
		*rcNameID: 285
		*Command: CmdSelect
		{
			*Order: PAGE_SETUP.5
			*Cmd: "<1B07141401>"
		}
	}
	*Option: Option4
	{
		*rcNameID: 286
		*Command: CmdSelect
		{
			*Order: DOC_FINISH.5
			*Cmd: "<1B07141401>"
		}
	}
		*Option: Option5
	{
		*rcNameID: 287
		*Command: CmdSelect
		{
			*Order: DOC_SETUP.8
			*Cmd: "<1B07141401>"
		}
	}
}
*%*Feature: OutputBin
*%{
*%    *rcNameID: =OUTPUTBIN_DISPLAY
*%    *DefaultOption: Option2
*%    *Option: Option1
*%    {
*%        *rcNameID: 288
*%        *Command: CmdSelect
*%        {
*%            *Order: PAGE_SETUP.8
*%            *Cmd: "<1D0C>"
*%        }
*%    }
*%    *Option: Option2
*%    {
*%        *rcNameID: 289
*%    }
*%}

*Feature: PrintPaperType
{
		*rcNameID: 308
    *DefaultOption: Option1
    *Option: Option1
    {
        *rcNameID: 309
    }
    *Option: Option2
    {
        *rcNameID: 310
        *Command: CmdSelect
        {
            *Order: PAGE_SETUP.1
    				*Cmd: "<1B1D1E043101A01B1D1F>"
        }
    }
    *Option: Option3
    {
        *rcNameID: 311
        *Command: CmdSelect
        {
            *Order: PAGE_SETUP.1
    				*Cmd: "<1B1D1E043103A01B1D1F>"
        }
    }
    *Option: Option4
    {
        *rcNameID: 312
        *Command: CmdSelect
        {
            *Order: PAGE_SETUP.1
    				*Cmd: "<1B1D1E043104A01B1D1F>"
        }
    }
}

*Feature: PrintPaperSpec
{
    *rcNameID: 297
    *DefaultOption: Option1
    *Option: Option1
    {
        *rcNameID: 298
        *Command: CmdSelect
        {
            *Order: PAGE_FINISH.1
    				*Cmd: "<1B1D1E043200C81B1D1F><1B>=<011B>R<001B>t<001D>P<0000>"		*%  2MM
        }
    }
    *Option: Option2
    {
        *rcNameID: 299
        *Command: CmdSelect
        {
            *Order: PAGE_FINISH.1
    				*Cmd: "<1B1D1E043200CC1B1D1F><1B>=<011B>R<001B>t<001D>P<0000>"		*%  3MM
        }
    }
    *Option: Option3
    {
        *rcNameID: 300
        *Command: CmdSelect
        {
            *Order: PAGE_FINISH.1
    				*Cmd: "<1B1D1E043200D01B1D1F><1B>=<011B>R<001B>t<001D>P<0000>"		*%  4MM
        }
    }
}

*Feature: Migration
{
		*rcNameID: 313
		*DefaultOption: Option3
		*Option: Option1
		{
				*rcNameID: 314
				*switch: PrintPaperType
				{
						*case: Option1
						{
								*Command: CmdSelect
				        {
				        		*Order: PAGE_SETUP.1
				        		*Cmd: "<1B1D1E043102B01B1D1F>"
				        }
				    }
				    *case: Option2
						{
				    		*Command: CmdSelect
				        {
				            *Order: PAGE_FINISH.6
				    				*Cmd: "<1B>J<C8>"
				        }
				    }
        }
		}
		*Option: Option2
		{
				*rcNameID: 315
				*switch: PrintPaperType
				{
						*case: Option1
						{
								*Command: CmdSelect
				        {
				        		*Order: PAGE_SETUP.1
				        		*Cmd: "<1B1D1E043102A81B1D1F>"
				        }
				    }
				    *case: Option2
						{
				    		*Command: CmdSelect
				        {
				            *Order: PAGE_FINISH.6
				    				*Cmd: "<1B>J<C8>"
				        }
				    }
        }
		}
		*Option: Option3
		{
				*rcNameID: 316
				*switch: PrintPaperType
				{
						*case: Option1
						{
								*Command: CmdSelect
				        {
				        		*Order: PAGE_SETUP.1
				        		*Cmd: "<1B1D1E043102A01B1D1F>"
				        }
				    }
				    *case: Option2
						{
				    		*Command: CmdSelect
				        {
				            *Order: PAGE_FINISH.6
				    				*Cmd: "<1B>J<C8>"
				        }
				    }
        }
		}
		*Option: Option4
		{
				*rcNameID: 317
				*switch: PrintPaperType
				{
						*case: Option1
						{
								*Command: CmdSelect
				        {
				        		*Order: PAGE_SETUP.1
				        		*Cmd: "<1B1D1E043102981B1D1F>"
				        }
				    }
				    *case: Option2
						{
				    		*Command: CmdSelect
				        {
				            *Order: PAGE_FINISH.6
				    				*Cmd: "<1B>J<C8>"
				        }
				    }
        }
		}
		*Option: Option5
		{
				*rcNameID: 318
				*switch: PrintPaperType
				{
						*case: Option1
						{
								*Command: CmdSelect
				        {
				        		*Order: PAGE_SETUP.1
				        		*Cmd: "<1B1D1E043102901B1D1F>"
				        }
				    }
				    *case: Option2
						{
				    		*Command: CmdSelect
				        {
				            *Order: PAGE_FINISH.6
				    				*Cmd: "<1B>J<C8>"
				        }
				    }
        }
		}
}

*%*Feature: PrintPaperWidth
*%{
*%		*rcNameID: 311
*%    *DefaultOption: Option1
*%    *Option: Option1
*%    {
*%        *rcNameID: 312
*%        *Command: CmdSelect
*%        {
*%            *Order: PAGE_SETUP.2
*%    				*Cmd: "<1D4C1A00><1D572C03>"
*%        }
*%    }
*%    *Option: Option2
*%    {
*%        *rcNameID: 313
*%        *Command: CmdSelect
*%        {
*%            *Order: PAGE_SETUP.2
*%    				*Cmd: "<1D4C5000><1D576002>"
*%        }
*%    }
*%    *Option: Option3
*%    {
*%        *rcNameID: 314
*%        *Command: CmdSelect
*%        {
*%            *Order: PAGE_SETUP.2
*%    				*Cmd: "<1D4CA800><1D57B001>"
*%        }
*%    }
*%}

*Command: CmdStartDoc
{
    *Order: DOC_SETUP.2
*%    *Cmd: "<1B>@<1B>=<011B>R<001B>t<001D>P<0000>"
    *Cmd: "<1B>@"
}
*%*Command: CmdStartPage
*%{
*%    *Order: PAGE_SETUP.1
*%    *Cmd: "<1B>Ph<0000>"
*%}
*Command: CmdEndPage
{
    *Order: PAGE_FINISH.2
    *Cmd: "<1B>Pg<00><1B>@"
}
*Command: CmdEndJob
{
    *Order: JOB_FINISH.10
    *%*Cmd: "<1B>Pi<001B>@"
    *Cmd: "<1B>@"
}
*RotateCoordinate?: FALSE
*RotateRaster?: FALSE
*RotateFont?: FALSE
*TextCaps: LIST(TC_OP_CHARACTER,TC_EA_DOUBLE,TC_IA_ABLE,TC_UA_ABLE,TC_RA_ABLE)
*CursorXAfterCR: AT_CURSOR_X_ORIGIN
*YMoveAttributes: LIST(SEND_CR_FIRST)
*XMoveThreshold: 0
*YMoveThreshold: *
*XMoveUnit: 203
*YMoveUnit: 203
*Command: CmdXMoveAbsolute { *Cmd : "<1B>$" %l{DestX } }
*Command: CmdYMoveRelDown { *Cmd : "<1B>J" %c[0,255]{max_repeat(DestYRel )} }
*Command: CmdCR { *Cmd : "<00>" }
*Command: CmdLF { *Cmd : "<00>" }
*Command: CmdFF { *Cmd : "<1B>J<00>" }
*EjectPageWithFF?: TRUE
*switch: InputBin
{
    *case: Option2
    {
        *EjectPageWithFF?: FALSE
    }
*%    *case: Option6
*%    {
*%        *EjectPageWithFF?: FALSE
*%    }
}



*OutputDataFormat: V_BYTE
*OptimizeLeftBound?: FALSE
*CursorXAfterSendBlockData: AT_GRXDATA_END
*CursorYAfterSendBlockData: NO_MOVE
*%*DefaultCTT: 0
*%*switch: Orientation
*%{
*%    *case: PORTRAIT
*%    {
*%        *DeviceFonts: LIST(1,2)
*%    }
*%    *case: LANDSCAPE_CC270
*%    {
*%        *DeviceFonts: LIST(1,2)
*%    }
*%}

*Command: CmdSelectSingleByteMode { *Cmd : "<1C>." }
*Command: CmdSelectDoubleByteMode { *Cmd : "<1C>&" }


