*%
*% Copyright (c) 2005 SAGEM Communication
*% All Rights Reserved.
*%
*GPDSpecVersion: "1.0"
*GPDFileName: "LFPCL521.GPD"
*GPDFileVersion: "1.0"
*Include: "StdNames.gpd"
*Include: "ttfsub.gpd"
*ModelName: "OKI B2540(PCL)"
*MasterUnits: PAIR(600, 600)
*ResourceDLL: "LFPCL52K.dll"
*PrintRate: 16
*PrintRatePPM: 16
*PrintRateUnit: PPM
*PrinterType: PAGE
*MaxCopies: 32767
*FontCartSlots: 0

*%----------------------------------------------------------------------------
*% DOC_SETUP
*%----------------------------------------------------------------------------
*%
*% 1 : PageProtect
*% 2 :
*% 3 :
*% 4 : RET
*% 5 : Economode
*% 6 : Resolution
*% 7 : CmdStartDoc
*% 8 : Orientation
*% 9 : Duplex NONE
*% 10 : Duplex HORIZONTAL/VERTICAL
*% 11 : InputBin
*% 12 : PaperSize/MediaType
*% 13 : CmdCopies

*% Orientation
*%----------------------------------------------------------------------------
*Feature: Orientation
{
    *rcNameID: =ORIENTATION_DISPLAY
    *DefaultOption: PORTRAIT
    *Option: PORTRAIT
    {
        *rcNameID: =PORTRAIT_DISPLAY
        *Command: CmdSelect
        {
            *Order: DOC_SETUP.8
            *NoPageEject?: TRUE
            *Cmd: "<1B>&l0o1E"
        }
    }
    *Option: LANDSCAPE_CC90
    {
        *rcNameID: =LANDSCAPE_DISPLAY
        *Command: CmdSelect
        {
            *Order: DOC_SETUP.8
            *NoPageEject?: TRUE
            *Cmd: "<1B>&l1o1E"
        }
    }
}

*% InputBin
*%----------------------------------------------------------------------------
*Feature: InputBin
{
    *rcNameID: =PAPER_SOURCE_DISPLAY
    *DefaultOption: AUTO
    *Option: AUTO
    {
        *rcNameID: =AUTO_DISPLAY
        *Command: CmdSelect
        {
            *Order: DOC_SETUP.11
            *Cmd: "<1B>&l0H"
        }
    }
    *Option: SourceStandard
    {
        *rcNameID: 448
        *Command: CmdSelect
        {
            *Order: DOC_SETUP.11
            *Cmd: "<1B>&l1H"
        }
        *%Constraints: PaperSize.A4
        *%Constraints: PaperSize.B5
        *Constraints: PaperSize.B6
        *%Constraints: PaperSize.A5
        *Constraints: PaperSize.JAPANESE_POSTCARD
        *%Constraints: PaperSize.LETTER
        *%Constraints: PaperSize.LEGAL
        *Constraints: PaperSize.A6
        *Constraints: PaperSize.DBL_JAPANESE_POSTCARD
        *Constraints: PaperSize.ENV_MONARCH
    }
    *Option: MANUAL
    {
        *rcNameID: =MANUAL_FEED_DISPLAY
        *Command: CmdSelect
        {
            *Order: DOC_SETUP.11
            *Cmd: "<1B>&l2H"
        }
    }
}

*% MediaType
*%----------------------------------------------------------------------------
*Feature: MediaType
{
    *rcNameID: =MEDIA_TYPE_DISPLAY
    *DefaultOption: Standard
    *Option: Standard
    {
        *rcNameID: 445
        *Command: CmdSelect
        {
            *Order: DOC_SETUP.12
            *Cmd: "<1B>&l0M"
        }
    }
    *Option: Thick
    {
        *rcNameID: 446
        *Command: CmdSelect
        {
            *Order: DOC_SETUP.12
            *Cmd: "<1B>&l2M"
        }
    }
}

*% 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)
        *MinStripBlankPixels: 32
        EXTERN_GLOBAL: *StripBlanks: LIST(ENCLOSED,TRAILING)
        *SpotDiameter: 100
        *Command: CmdBeginRaster { *Cmd : "<1B>*r1A" }
        *Command: CmdEndRaster { *Cmd : "<1B>*rB" }
        *Command: CmdSendBlockData { *Cmd : "<1B>*b" %d{NumOfDataBytes}"W" }
        *Command: CmdSelect
        {
            *Order: DOC_SETUP.6
            *Cmd: "@PJL SET RESOLUTION=600<0A>@PJL ENTER LANGUAGE=PCL<0A0D1B>E<1B>*t600R"
        }
    }
}

*% PaperSize
*%----------------------------------------------------------------------------
*Feature: PaperSize
{
    *rcNameID: =PAPER_SIZE_DISPLAY
    *DefaultOption: LETTER
    *Option: A4
    {
        *rcNameID: =RCID_DMPAPER_SYSTEM_NAME
        *PageProtectMem: 4249
        *switch: Orientation
        {
            *case: PORTRAIT
            {
                *PrintableArea: PAIR(4662, 6714)
                *PrintableOrigin: PAIR(150, 150)
                *CursorOrigin: PAIR(150, 150)
                *Command: CmdSelect
                {
                    *Order: DOC_SETUP.12
                    *Cmd: "<1B>&l26a8c1E<1B>*p0x0Y<1B>*c0t5594x8056Y"
                }
            }
            *case: LANDSCAPE_CC90
            {
                *PrintableArea: PAIR(4662, 6714)
                *PrintableOrigin: PAIR(150, 150)
                *CursorOrigin: PAIR(150, 6864)
                *Command: CmdSelect
                {
                    *Order: DOC_SETUP.12
                    *Cmd: "<1B>&l26a8c1E<1B>*p0x0Y<1B>*c0t8056x5594Y"
                }
            }
        }
    }
    *Option: LETTER
    {
        *rcNameID: =RCID_DMPAPER_SYSTEM_NAME
        *PageProtectMem: 4109
        *switch: Orientation
        {
            *case: PORTRAIT
            {
                *PrintableArea: PAIR(4800, 6300)
                *PrintableOrigin: PAIR(150, 150)
                *CursorOrigin: PAIR(150, 150)
                *Command: CmdSelect
                {
                    *Order: DOC_SETUP.12
                    *Cmd: "<1B>&l2a8c1E<1B>*p0x0Y<1B>*c0t5760x7560Y"
                }
            }
            *case: LANDSCAPE_CC90
            {
                *PrintableArea: PAIR(4800, 6300)
                *PrintableOrigin: PAIR(150, 150)
                *CursorOrigin: PAIR(150, 6450)
                *Command: CmdSelect
                {
                    *Order: DOC_SETUP.12
                    *Cmd: "<1B>&l2a8c1E<1B>*p0x0Y<1B>*c0t7560x5760Y"
                }
            }
        }
    }
    *Option: LEGAL
    {
        *rcNameID: =RCID_DMPAPER_SYSTEM_NAME
        *PageProtectMem: 5230
        *switch: Orientation
        {
            *case: PORTRAIT
            {
                *PrintableArea: PAIR(4800, 8100)
                *PrintableOrigin: PAIR(150, 150)
                *CursorOrigin: PAIR(150, 150)
                *Command: CmdSelect
                {
                    *Order: DOC_SETUP.12
                    *Cmd: "<1B>&l3a8c1E<1B>*p0x0Y<1B>*c0t5760x9720Y"
                }
            }
            *case: LANDSCAPE_CC90
            {
                *PrintableArea: PAIR(4800, 8100)
                *PrintableOrigin: PAIR(150, 150)
                *CursorOrigin: PAIR(150, 8250)
                *Command: CmdSelect
                {
                    *Order: DOC_SETUP.12
                    *Cmd: "<1B>&l3a8c1E<1B>*p0x0Y<1B>*c0t9720x5760Y"
                }
            }
        }
    }
    *Option: A5
    {
        *rcNameID: =RCID_DMPAPER_SYSTEM_NAME
        *PageProtectMem: 2119
        *switch: Orientation
        {
            *case: PORTRAIT
            {
                *PrintableArea: PAIR(3198, 4662)
                *PrintableOrigin: PAIR(150, 150)
                *CursorOrigin: PAIR(150, 150)
                *Command: CmdSelect
                {
                    *Order: DOC_SETUP.12
                    *Cmd: "<1B>&l25a8c1E<1B>*p0x0Y<1B>*c0t3837x5594Y"
                }
            }
            *case: LANDSCAPE_CC90
            {
                *PrintableArea: PAIR(3198, 4662)
                *PrintableOrigin: PAIR(150, 150)
                *CursorOrigin: PAIR(150, 4812)
                *Command: CmdSelect
                {
                    *Order: DOC_SETUP.12
                    *Cmd: "<1B>&l25a8c1E<1B>*p0x0Y<1B>*c0t5594x3837Y"
                }
            }
        }
    }
    *Option: B5
    {
        *rcNameID: =RCID_DMPAPER_SYSTEM_NAME
        *PageProtectMem: 3189
        *switch: Orientation
        {
            *case: PORTRAIT
            {
                *PrintableArea: PAIR(4002, 5772)
                *PrintableOrigin: PAIR(150, 150)
                *CursorOrigin: PAIR(150, 150)
                *Command: CmdSelect
                {
                    *Order: DOC_SETUP.12
                    *Cmd: "<1B>&l45a8c1E<1B>*p0x0Y<1B>*c0t4802x6926Y"
                }
            }
            *case: LANDSCAPE_CC90
            {
                *PrintableArea: PAIR(4002, 5772)
                *PrintableOrigin: PAIR(150, 150)
                *CursorOrigin: PAIR(150, 5922)
                *Command: CmdSelect
                {
                    *Order: DOC_SETUP.12
                    *Cmd: "<1B>&l45a8c1E<1B>*p0x0Y<1B>*c0t6926x4802Y"
                }
            }
        }
    }
    *Option: B6
    {
        *rcNameID: 447
        *PageProtectMem: 1594
        *switch: Orientation
        {
            *case: PORTRAIT
            {
                *PageDimensions: PAIR(3036, 4302)
                *PrintableArea: PAIR(2736, 4002)
                *PrintableOrigin: PAIR(150, 150)
                *CursorOrigin: PAIR(150, 150)
                *Command: CmdSelect
                {
                    *Order: DOC_SETUP.12
                    *Cmd: "<1B>&l46a8c1E<1B>*p0x0Y<1B>*c0t3283x4802Y"
                }
            }
            *case: LANDSCAPE_CC90
            {
                *PageDimensions: PAIR(3036, 4302)
                *PrintableArea: PAIR(2736, 4002)
                *PrintableOrigin: PAIR(150, 150)
                *CursorOrigin: PAIR(150, 4152)
                *Command: CmdSelect
                {
                    *Order: DOC_SETUP.12
                    *Cmd: "<1B>&l46a8c1E<1B>*p0x0Y<1B>*c0t4802x3283Y"
                }
            }
        }
    }
    *Option: ENV_MONARCH
    {
        *rcNameID: =RCID_DMPAPER_SYSTEM_NAME
        *PageProtectMem: 1279
        *switch: Orientation
        {
            *case: PORTRAIT
            {
                *PrintableArea: PAIR(2028, 4200)
                *PrintableOrigin: PAIR(150, 150)
                *CursorOrigin: PAIR(150, 150)
                *Command: CmdSelect
                {
                    *Order: DOC_SETUP.12
                    *Cmd: "<1B>&l80a8c1E<1B>*p0x0Y<1B>*c0t2433x5040Y"
                }
            }
            *case: LANDSCAPE_CC90
            {
                *PrintableArea: PAIR(2028, 4200)
                *PrintableOrigin: PAIR(150, 150)
                *CursorOrigin: PAIR(150, 4350)
                *Command: CmdSelect
                {
                    *Order: DOC_SETUP.12
                    *Cmd: "<1B>&l80a8c1E<1B>*p0x0Y<1B>*c0t5040x2433Y"
                }
            }
        }
    }
    *Option: JAPANESE_POSTCARD
    {
        *rcNameID: =RCID_DMPAPER_SYSTEM_NAME
        *PageProtectMem: 1009
        *switch: Orientation
        {
            *case: PORTRAIT
            {
                *PrintableArea: PAIR(2064, 3198)
                *PrintableOrigin: PAIR(150, 150)
                *CursorOrigin: PAIR(150, 150)
                *Command: CmdSelect
                {
                    *Order: DOC_SETUP.12
                    *Cmd: "<1B>&l71a8c1E<1B>*p0x0Y<1B>*c0t2476x3837Y"
                }
            }
            *case: LANDSCAPE_CC90
            {
                *PrintableArea: PAIR(2064, 3198)
                *PrintableOrigin: PAIR(150, 150)
                *CursorOrigin: PAIR(150, 3348)
                *Command: CmdSelect
                {
                    *Order: DOC_SETUP.12
                    *Cmd: "<1B>&l71a8c1E<1B>*p0x0Y<1B>*c0t3837x2476Y"
                }
            }
        }
    }
    *Option: DBL_JAPANESE_POSTCARD
    {
        *rcNameID: =RCID_DMPAPER_SYSTEM_NAME
        *PageProtectMem: 2019
        *switch: Orientation
        {
            *case: PORTRAIT
            {
                *PrintableArea: PAIR(4428, 3198)
                *PrintableOrigin: PAIR(150, 150)
                *CursorOrigin: PAIR(150, 150)
                *Command: CmdSelect
                {
                    *Order: DOC_SETUP.12
                    *Cmd: "<1B>&l72a8c1E<1B>*p0x0Y<1B>*c0t5313x3837Y"
                }
            }
            *case: LANDSCAPE_CC90
            {
                *PrintableArea: PAIR(4428, 3198)
                *PrintableOrigin: PAIR(150, 150)
                *CursorOrigin: PAIR(150, 3348)
                *Command: CmdSelect
                {
                    *Order: DOC_SETUP.12
                    *Cmd: "<1B>&l72a8c1E<1B>*p0x0Y<1B>*c0t3837x5313Y"
                }
            }
        }
    }
    *Option: A6
    {
        *rcNameID: =RCID_DMPAPER_SYSTEM_NAME
        *PageProtectMem: 1059
        *switch: Orientation
        {
            *case: PORTRAIT
            {
                *PageDimensions: PAIR(2481, 3498)
                *PrintableArea: PAIR(2181, 3198)
                *PrintableOrigin: PAIR(150, 150)
                *CursorOrigin: PAIR(150, 150)
                *Command: CmdSelect
                {
                    *Order: DOC_SETUP.12
                    *Cmd: "<1B>&l101a8c1E<1B>*p0x0Y<1B>*c0t2617x3837Y"
                }
            }
            *case: LANDSCAPE_CC90
            {
                *PageDimensions: PAIR(2481, 3498)
                *PrintableArea: PAIR(2181, 3198)
                *PrintableOrigin: PAIR(150, 150)
                *CursorOrigin: PAIR(150, 3348)
                *Command: CmdSelect
                {
                    *Order: DOC_SETUP.12
                    *Cmd: "<1B>&l101a8c1E<1B>*p0x0Y<1B>*c0t3837x2617Y"
                }
            }
        }
    }
}

*% Economode
*%----------------------------------------------------------------------------
*Feature: Economode
{
    *rcNameID: 377
    *DefaultOption: Option1
    *Option: Option1
    {
        *rcNameID: 265
    }
    *Option: Option2
    {
        *rcNameID: 266
        *Command: CmdSelect
        {
            *Order: DOC_SETUP.5
            *Cmd: "@PJL SET ECONOMODE=OFF<0A>"
        }
    }
    *Option: Option3
    {
        *rcNameID: 267
        *Command: CmdSelect
        {
            *Order: DOC_SETUP.5
            *Cmd: "@PJL SET ECONOMODE=ON<0A>"
        }
    }
}

*% RET
*%----------------------------------------------------------------------------
*Feature: RET
{
    *rcNameID: 378
    *DefaultOption: Option1
    *Option: Option1
    {
        *rcNameID: 293
    }
    *Option: Option2
    {
        *rcNameID: 297
        *Command: CmdSelect
        {
            *Order: DOC_SETUP.4
            *Cmd: "@PJL SET RET=LIGHT<0A>"
        }
    }
    *Option: Option3
    {
        *rcNameID: 298
        *Command: CmdSelect
        {
            *Order: DOC_SETUP.4
            *Cmd: "@PJL SET RET=MEDIUM<0A>"
        }
    }
    *Option: Option4
    {
        *rcNameID: 299
        *Command: CmdSelect
        {
            *Order: DOC_SETUP.4
            *Cmd: "@PJL SET RET=DARK<0A>"
        }
    }
    *Option: Option5
    {
        *rcNameID: 300
        *Command: CmdSelect
        {
            *Order: DOC_SETUP.4
            *Cmd: "@PJL SET RET=OFF<0A>"
        }
    }
}

*% Memory
*%----------------------------------------------------------------------------
*Feature: Memory
{
    *rcNameID: =PRINTER_MEMORY_DISPLAY
    *DefaultOption: 32768KB

    *MemConfigKB: PAIR(32768, 16384)
}

*% PageProtect
*%----------------------------------------------------------------------------
*Feature: PageProtect
{
    *rcNameID: =PAGE_PROTECTION_DISPLAY
    *DefaultOption: OFF
    *Option: ON
    {
        *rcNameID: =ON_DISPLAY
        *Command: CmdSelect
        {
            *Order: DOC_SETUP.1
            *Cmd: "<1B>%%-12345X@PJL SET PAGEPROTECT=ON<0A>"
        }
    }
    *Option: OFF
    {
        *rcNameID: =OFF_DISPLAY
        *Command: CmdSelect
        {
            *Order: DOC_SETUP.1
            *Cmd: "<1B>%%-12345X@PJL SET PAGEPROTECT=AUTO<0A>"
        }
    }
}
*Command: CmdStartDoc
{
    *Order: DOC_SETUP.7
    *Cmd: "<1B>&u600D<1B>*r0F"
}
*Command: CmdStartPage
{
    *Order: PAGE_SETUP.1
    *Cmd: "<1B>*b0M<0D>"
}
*Command: CmdEndJob
{
    *Order: JOB_FINISH.1
    *Cmd: "<1B>E<1B>%%-12345X"
}
*Command: CmdCopies
{
    *Order: DOC_SETUP.13
    *Cmd: "<1B>&l" %d[1,32767]{NumOfCopies}"X"
}
*RotateCoordinate?: TRUE
*RotateRaster?: TRUE
*RotateFont?: TRUE
*TextCaps: LIST(TC_CR_90,TC_UA_ABLE)
*MemoryUsage: LIST(FONT)
*CursorXAfterCR: AT_PRINTABLE_X_ORIGIN
*BadCursorMoveInGrxMode: LIST(X_PORTRAIT,Y_LANDSCAPE)
*XMoveThreshold: 0
*YMoveThreshold: 0
*XMoveUnit: 600
*YMoveUnit: 600
*Command: CmdXMoveAbsolute { *Cmd : "<1B>*p" %d{(DestX) }"X" }
*Command: CmdXMoveRelRight { *Cmd : "<1B>*p+" %d[0,9600]{max_repeat((DestXRel) )}"X" }
*Command: CmdXMoveRelLeft { *Cmd : "<1B>*p-" %d[0,9600]{max_repeat((DestXRel) )}"X" }
*Command: CmdYMoveAbsolute { *Cmd : "<1B>*p" %d{(DestY) }"Y" }
*Command: CmdYMoveRelDown { *Cmd : "<1B>*p+" %d{(DestYRel) }"Y" }
*Command: CmdYMoveRelUp { *Cmd : "<1B>*p-" %d{(DestYRel) }"Y" }
*Command: CmdCR { *Cmd : "<0D>" }
*Command: CmdLF { *Cmd : "<0A>" }
*Command: CmdFF { *Cmd : "<0C>" }
*Command: CmdBackSpace { *Cmd : "<08>" }
*Command: CmdUniDirectionOn { *Cmd : "<00>" }
*Command: CmdUniDirectionOff { *Cmd : "<00>" }
*Command: CmdPushCursor { *Cmd : "<1B>&f0S" }
*Command: CmdPopCursor { *Cmd : "<1B>&f1S" }
*Command: CmdSetSimpleRotation { *Cmd : "<1B>&a" %d{PrintDirInCCDegrees}"P" }
*EjectPageWithFF?: TRUE
*Command: CmdEnableTIFF4 { *Cmd : "<1B>*b2M" }
*Command: CmdDisableCompression { *Cmd : "<1B>*b0M" }
*Command: CmdEnableDRC { *Cmd : "<1B>*b3M" }
*OutputDataFormat: H_BYTE
*OptimizeLeftBound?: TRUE
*CursorXAfterSendBlockData: AT_GRXDATA_ORIGIN
*CursorYAfterSendBlockData: AUTO_INCREMENT
*DefaultFont: 136
*DefaultCTT: 0
*CharPosition: BASELINE
*TTFSEnabled?: TRUE
*DeviceFonts: LIST(136,138,146,147,148,149,150,151,152,153,154,155,156,157,164,165,
+                   166,196,197,198,199,200,201,202,203,209,210,211,212,213,214,215,
+                   216,217,218,219,220,221,222,223,224,225,226,227,228,229,230)
*MinFontID: 16534
*MaxFontID: 32768
*switch: Resolution
{
    *case: Option1
    {
        *FontFormat: HPPCL_OUTLINE
    }
}
*Command: CmdSetFontID { *Cmd : "<1B>*c" %d{NextFontID}"D" }
*Command: CmdSelectFontID { *Cmd : "<1B>(" %d{CurrentFontID}"X" }
*Command: CmdSetCharCode { *Cmd : "<1B>*c" %d{NextGlyph}"E" }
*Command: CmdUnderlineOn { *Cmd : "<1B>&dD" }
*Command: CmdUnderlineOff { *Cmd : "<1B>&d@" }
*Command: CmdWhiteTextOn { *Cmd : "<1B>*v1o1T" }
*Command: CmdWhiteTextOff { *Cmd : "<1B>*v0o0T" }
*MinGrayFill: 1
*MaxGrayFill: 100
*Command: CmdSetRectWidth { *Cmd : "<1B>*c" %d{(RectXSize) }"A" }
*Command: CmdSetRectHeight { *Cmd : "<1B>*c" %d{(RectYSize) }"B" }
*Command: CmdRectGrayFill { *Cmd : "<1B>*c" %d{GrayPercentage }"g2P" }
*Command: CmdRectWhiteFill { *Cmd : "<1B>*c1P" }
*Command: CmdRectBlackFill { *Cmd : "<1B>*c0P" }
