*GPDFileName: "ZY-1026.gpd"
*GPDFileVersion: "1.0"
*GPDSpecVersion: "1.0"
*Include: "StdNames.gpd"
*ModelName: "ZYLFC10 PRINTER"
*MasterUnits: PAIR(600, 600)
*ResourceDLL: "unires.dll"
*PrinterType: PAGE
*MaxCopies: 999

*Feature: Orientation
{
    *rcNameID: =ORIENTATION_DISPLAY
    *DefaultOption: PORTRAIT
    *Option: PORTRAIT
    {
        *rcNameID: =PORTRAIT_DISPLAY
    }
    *Option: LANDSCAPE_CC90
    {
        *rcNameID: =LANDSCAPE_DISPLAY
    }
}

*%******************************************************************************************
*%                                      Input Bin
*% 2023.03.02
*% Delete as a whole. In the "Print Preferences" page, 
*% the "Tray Selection" item is not displayed
*%******************************************************************************************

*%******************************************************************************************
*%                                      Resolution
*%******************************************************************************************
*Feature: Resolution
{
	*rcNameID: =RESOLUTION_DISPLAY
	*DefaultOption: Option1
	*Option: Option1
	{
		*Name: "600 x 600" =DOTS_PER_INCH
		*DPI: PAIR(600, 600)
		*TextDPI: PAIR(600, 600)
		*SpotDiameter: 100
		*Command: CmdBeginRaster { *Cmd : "" }
		*Command: CmdEndRaster { *Cmd : "" }
		*Command: CmdSendBlockData { *Cmd : "" }
		*Command: CmdSelect
		{
			*Order: DOC_SETUP.6
			*Cmd: "<1B>&A<03000000>"
		}
	}
}

*Command: CmdCopies
{
    *Order: DOC_SETUP.7
    *Cmd: "<1B>&l" %l[1,32767]{NumOfCopies}"ZY"
}

*%******************************************************************************************
*%                                      Paper Size
*%******************************************************************************************
*Feature: PaperSize
{
	*rcNameID: =PAPER_SIZE_DISPLAY
	*DefaultOption: A4
	*Option: A4
	{
		*rcNameID: =RCID_DMPAPER_SYSTEM_NAME
        *switch: Orientation
        {
            *case: PORTRAIT
            {
                *PrintableArea: PAIR(4768, 6824)
                *PrintableOrigin: PAIR(96, 96)
                *CursorOrigin: PAIR(96, 96)
            }
            *case: LANDSCAPE_CC90
            {
                *PrintableArea: PAIR(4768, 6824)
                *PrintableOrigin: PAIR(96, 96)
                *CursorOrigin: PAIR(96, 6920)
            }
        }
		*Command: CmdSelect
		{
			*Order: DOC_SETUP.5
			*Cmd: "<1B>&A<0200001A>"
		}
	}
	*Option: A5
	{
		*rcNameID: =RCID_DMPAPER_SYSTEM_NAME
        *switch: Orientation
        {
            *case: PORTRAIT
            {
                *PrintableArea: PAIR(3304, 4768)
                *PrintableOrigin: PAIR(96, 96)
                *CursorOrigin: PAIR(96, 96)
            }
            *case: LANDSCAPE_CC90
            {
                *PrintableArea: PAIR(3304, 4768)
                *PrintableOrigin: PAIR(96, 96)
                *CursorOrigin: PAIR(96, 4864)
            }
        }
		*Command: CmdSelect
		{
			*Order: DOC_SETUP.5
			*Cmd: "<1B>&A<02000019>"
		}
	}
	*Option: A5_ROTATED
	{
		*rcNameID: =RCID_DMPAPER_SYSTEM_NAME
        *switch: Orientation
        {
            *case: PORTRAIT
            {
                *PrintableArea: PAIR(4768, 3308)
                *PrintableOrigin: PAIR(96, 96)
                *CursorOrigin: PAIR(96, 96)
            }
            *case: LANDSCAPE_CC90
            {
                *PrintableArea: PAIR(4768, 3308)
                *PrintableOrigin: PAIR(96, 96)
                *CursorOrigin: PAIR(96, 3404)
            }
        }
		*Command: CmdSelect
		{
			*Order: DOC_SETUP.5
			*Cmd: "<1B>x<60131B>y<A80D>"
		}
	}
	*%******************************************************************************************
	*%                                      B5 (JIS) 182*257mm 
	*%******************************************************************************************
	*Option: B5
	{
		*rcNameID: =RCID_DMPAPER_SYSTEM_NAME
		*switch: Orientation
		{
			*case: PORTRAIT
			{
				*PrintableArea: PAIR(4104, 5872)
				*PrintableOrigin: PAIR(96, 96)
				*CursorOrigin: PAIR(96, 96)
			}
			*case: LANDSCAPE_CC90
			{
				*PrintableArea: PAIR(4104, 5872)
				*PrintableOrigin: PAIR(96, 96)
				*CursorOrigin: PAIR(96, 5968)
			}
		}
		*Command: CmdSelect
		{
			*Order: DOC_SETUP.5
			*Cmd: "<1B>&A<02000064>"
		}
	}
	*%******************************************************************************************
		*% 2025.08.11 In the English system, change the default paper size to A4
		*% In the English system, the default paper size is LETTER. 
		*% If you want to change the default paper size to another paper size, 
		*% you need to change the default LETTER paper size to a different name.
		*%******************************************************************************************
		*%*Option: LETTER
		*Option: Option21		
		{
			*%*rcNameID: =RCID_DMPAPER_SYSTEM_NAME
			*Name: "LETTER PAPER"
		*PageDimensions: PAIR(5100, 6600)
        *switch: Orientation
        {
            *case: PORTRAIT
            {
                *PrintableArea: PAIR(4904, 6408)
                *PrintableOrigin: PAIR(96, 96)
                *CursorOrigin: PAIR(96, 96)
            }
            *case: LANDSCAPE_CC90
            {
                *PrintableArea: PAIR(4904, 6408)
                *PrintableOrigin: PAIR(96, 96)
                *CursorOrigin: PAIR(96, 6504)
            }
        }
		*Command: CmdSelect
		{
			*Order: DOC_SETUP.5
			*Cmd: "<1B>&A<02000002>"
		}
	}
	*Option: LEGAL
	{
		*rcNameID: =RCID_DMPAPER_SYSTEM_NAME
		*PageDimensions: PAIR(5100, 8400)
        *switch: Orientation
        {
            *case: PORTRAIT
            {
                *PrintableArea: PAIR(4904, 8208)
                *PrintableOrigin: PAIR(96, 96)
                *CursorOrigin: PAIR(96, 96)
            }
            *case: LANDSCAPE_CC90
            {
                *PrintableArea: PAIR(4904, 8208)
                *PrintableOrigin: PAIR(96, 96)
                *CursorOrigin: PAIR(96, 8304)
            }
        }	
		*Command: CmdSelect
		{
			*Order: DOC_SETUP.5
			*Cmd: "<1B>&A<02000003>"
		}
	}
	*Option: EXECUTIVE
	{
		*rcNameID: =RCID_DMPAPER_SYSTEM_NAME
		*PageDimensions: PAIR(4350,6300)
        *switch: Orientation
        {
            *case: PORTRAIT
            {
                *PrintableArea: PAIR(4160, 6104)
                *PrintableOrigin: PAIR(96, 96)
                *CursorOrigin: PAIR(96, 96)
            }
            *case: LANDSCAPE_CC90
            {
                *PrintableArea: PAIR(4160, 6104)
                *PrintableOrigin: PAIR(96, 96)
                *CursorOrigin: PAIR(96, 6200)
            }
        }		
		*Command: CmdSelect
		{
			*Order: DOC_SETUP.5
			*Cmd: "<1B>&A<02000007>"
		}
	}
	*Option: Option10
	{
		*Name: "140x240mm"
		*PageDimensions: PAIR(3304,5672)
        *switch: Orientation
        {
            *case: PORTRAIT
            {
                *PrintableArea: PAIR(3112, 5480)
                *PrintableOrigin: PAIR(96, 96)
                *CursorOrigin: PAIR(96, 96)
            }
            *case: LANDSCAPE_CC90
            {
                *PrintableArea: PAIR(3112, 5480)
                *PrintableOrigin: PAIR(96, 96)
                *CursorOrigin: PAIR(96, 5576)
            }
        }	
		*Command: CmdSelect
		{
			*Order: DOC_SETUP.5
			*Cmd: "<1B>x" %l{(PhysPaperWidth)}"<1B>y" %l{(PhysPaperLength)}
		}
	}	
	*%******************************************************************************************
	*%                                      16K 197*273mm
	*%******************************************************************************************
	*Option: Option11
	{
		*Name: "16K 197x273mm"
		*PageDimensions: PAIR(4656, 6448)
		*switch: Orientation
		 {
			 *case: PORTRAIT
			 {
				*PrintableArea: PAIR(4464, 6256)
				*PrintableOrigin: PAIR(96, 96)
				*CursorOrigin: PAIR(96, 96)
			}
			*case: LANDSCAPE_CC90
			{
				*PrintableArea: PAIR(4464, 6256)
				*PrintableOrigin: PAIR(96, 96)
				*CursorOrigin: PAIR(96, 6352)
			}
		}	
		*Command: CmdSelect
		{
			*Order: DOC_SETUP.5
			*Cmd: "<1B>x" %l{(PhysPaperWidth)}"<1B>y" %l{(PhysPaperLength)}
		}
	}
	*%******************************************************************************************
	*%                                      A6 105*148mm
	*%******************************************************************************************
	*Option: Option12
	{
		*Name: "A6"
		*PageDimensions: PAIR(2480, 3496)
		*switch: Orientation
		{
			*case: PORTRAIT
			{
				*PrintableArea: PAIR(2288, 3304)
				*PrintableOrigin: PAIR(96, 96)
				*CursorOrigin: PAIR(96, 96)
			}
			*case: LANDSCAPE_CC90
			{
				*PrintableArea: PAIR(2288, 3304)
				*PrintableOrigin: PAIR(96, 96)
				*CursorOrigin: PAIR(96, 3400)
			}
		}	
		*Command: CmdSelect
		{
			*Order: DOC_SETUP.5
			*Cmd: "<1B>x" %l{(PhysPaperWidth)}"<1B>y" %l{(PhysPaperLength)}
		}
	}
	*%******************************************************************************************
	*%                                      B5 (ISO) 176*250mm
	*%******************************************************************************************
	*Option: Option13
	{
		*Name: "B5 (ISO)"
		*PageDimensions: PAIR(4160, 5904)
		*switch: Orientation
		{
			*case: PORTRAIT
			{
				*PrintableArea: PAIR(3968, 5712)
				*PrintableOrigin: PAIR(96, 96)
				*CursorOrigin: PAIR(96, 96)
			}
			*case: LANDSCAPE_CC90
			{
				*PrintableArea: PAIR(3968, 5712)
				*PrintableOrigin: PAIR(96, 96)
				*CursorOrigin: PAIR(96, 5808)
			}
		}	
		*Command: CmdSelect
		{
			*Order: DOC_SETUP.5
			*Cmd: "<1B>x" %l{(PhysPaperWidth)}"<1B>y" %l{(PhysPaperLength)}
		}
	}
	*Option: CUSTOMSIZE
	{
        *rcNameID: =USER_DEFINED_SIZE_DISPLAY
        *MinSize: PAIR(1800, 3000)
        *MaxSize: PAIR(5100, 8400)
        *MaxPrintableWidth: 4944
        *MinLeftMargin: 96
        *CenterPrintable?: FALSE
        *PageProtectMem: 1692
        *InsertBlock: =PaperConstraints
        *switch: Orientation
        {
            *case: PORTRAIT
            {
                *CustCursorOriginX:  %d{96}
                *CustCursorOriginY:  %d{96}
						    *CustPrintableOriginX:  %d{96}
						    *CustPrintableOriginY:  %d{96}
						    *CustPrintableSizeX:  %d{(((PhysPaperWidth  - 192)+1)/8)*8}
						    *CustPrintableSizeY:  %d{(((PhysPaperLength  - 192)+1)/8)*8}
            }
            *case: LANDSCAPE_CC90
            {
                *CustCursorOriginX:  %d{96}
                *CustCursorOriginY:  %d{(((PhysPaperLength  - 192)+1)/8)*8-96}
						    *CustPrintableOriginX:  %d{96}
						    *CustPrintableOriginY:  %d{96}
						    *CustPrintableSizeX:  %d{(((PhysPaperWidth  - 192)+1)/8)*8}
						    *CustPrintableSizeY:  %d{(((PhysPaperLength  - 192)+1)/8)*8}
            }
        }	   
	   *Command: CmdSelect
	   {
	     *Order: DOC_SETUP.13
	     *Cmd: "<1B>x" %l{(PhysPaperWidth)}"<1B>y" %l{(PhysPaperLength)}
	   }
	}
}

*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
	}
	*Option: HT_PATSIZE_ZY_8x8_M
	{	
		*Name: "ZY 8x8"	
		*HTPatternSize: PAIR(8, 8)	
		*HTNumPatterns: 1	
		*HTCallbackID: 1	
	}
}

*%******************************************************************************************
*%                                      Paper Weight
*% reference
*% Very Heavy 	: 9ppm 120 - 160g
*% Medium Heavy	: 14ppm 80 - 120g
*% Medium		: 18-20ppm 60 - 80g
*% 2024.08.19 Move function to printing preferences
*%******************************************************************************************

*%******************************************************************************************
*%                                      Darkness
*%******************************************************************************************
*Feature: Darkness
{
    *Name: "Darkness"
    *FeatureType: PRINTER_PROPERTY
    *DefaultOption: DarknessMedium
    *Option: DarknessDark
    {
        *Name: "Dark"
        *Command: CmdSelect
         {
             *Order: DOC_SETUP.2
             *Cmd: "<1C1602>B<10>"
         }
    }
    *Option: DarknessMediumDark
    {
        *Name: "Medium Dark"
        *Command: CmdSelect
         {
             *Order: DOC_SETUP.2
             *Cmd: "<1C1602>B<11>"
         }
    }
    *Option: DarknessMedium
    {
        *Name: "Medium"
        *Command: CmdSelect
         {
             *Order: DOC_SETUP.2
             *Cmd: "<1C1602>B<12>"
         }
    }
    *Option: DarknessMediumLight
    {
        *Name: "Medium Light"
        *Command: CmdSelect
         {
             *Order: DOC_SETUP.2
             *Cmd: "<1C1602>B<13>"
         }
    }
    *Option: DarknessLight
    {
        *Name: "Light"
        *Command: CmdSelect
         {
             *Order: DOC_SETUP.2
             *Cmd: "<1C1602>B<14>"
         }
    }
}

*%******************************************************************************************
*%                                      RenderType
*%******************************************************************************************
*Feature: RenderType
{
    *Name: "Render Type"
    *FeatureType: PRINTER_PROPERTY
    *DefaultOption: RenderTypeGraphics
    *Option: RenderTypeGraphics
    {
        *Name: "Graphics"
        *Command: CmdSelect
         {
             *Order: DOC_SETUP.3
             *Cmd: "<1C1603>B<10>"
         }
    }
    *Option: RenderTypeText
    {
        *Name: "Text"
        *Command: CmdSelect
         {
             *Order: DOC_SETUP.3
             *Cmd: "<1C1603>B<11>"
         }
    }
}

*%******************************************************************************************
*%                                      Color Mode
*% Only 1bpp mode is supported, and other modes are shielded.
*% 2022.06.22
*% Add the definitions of DevNumOfPlanes and DevBPP, 
*% and send the bitmap to the print background processing in ImageProcessing
*%******************************************************************************************
*Feature: ColorMode
{
	*rcNameID: =COLOR_PRINTING_MODE_DISPLAY
	*DefaultOption: Mono
	*Option: Mono
	{
		*rcNameID: =MONO_DISPLAY
		*DevNumOfPlanes: 0
		*DevBPP: 0
		*DrvBPP: 1
		*IPCallbackID: 1
		*Color?: FALSE
	}
}

*%******************************************************************************************
*%                                      Doc setup commands
*% 2022.06.22
*% Put the CmdStartPage and CmdEndPage commands into the program for processing
*%******************************************************************************************
*Command: CmdStartJob
{
	*Order: JOB_SETUP.1
	*Cmd: "<1B>&B<1B>%%-98765X"
}

*Command: CmdEnableOEMComp 
{
	*Cmd: ""
}

*%******************************************************************************************
*%                                      Cursor and Page Commands
*%******************************************************************************************
*OutputDataFormat: H_BYTE
*OptimizeLeftBound?: FALSE
*RasterSendAllData?: TRUE
*CursorXAfterSendBlockData: AT_CURSOR_X_ORIGIN
*CursorYAfterSendBlockData: AUTO_INCREMENT

*Command: CmdCR { *Cmd : "" }
*Command: CmdLF { *Cmd : "" }
*Command: CmdFF { *Cmd : "" }

