*GPDSpecVersion: "1.0"
*GPDFileVersion: "1.0"
*GPDFileName: "lp-50.gpd"
*Include: "StdNames.gpd"
*ModelName: "Datecs LP-50"
*MasterUnits: PAIR(203,203)
*ResourceDLL: "unires.dll"
*PrinterType: SERIAL
*rcPersonalityID: =PERSONALITY_ESCP_DISPLAY

*Feature: Orientation
{
    *rcNameID: =ORIENTATION_DISPLAY
    *DefaultOption: PORTRAIT
    *%ConcealFromUI?: TRUE
    *Option: PORTRAIT
    {
        *rcNameID: =PORTRAIT_DISPLAY
        *%Command: CmdSelect { *Order: DOC_SETUP.6 }
    }
    *Option: LANDSCAPE_CC270
    {
        *rcNameID: =LANDSCAPE_DISPLAY
        *%Command: CmdSelect { *Order: DOC_SETUP.6 }
    }
}

*Feature: InputBin
{
  *rcNameID: =PAPER_SOURCE_DISPLAY
  *DefaultOption: TRACTOR
  *%ConcealFromUI?: FALSE
  *Option: TRACTOR
    {
    *%Name: "Roll paper feeder"
    *rcNameID: =TRACTOR_DISPLAY
    *%Command: CmdSelect { *Order: DOC_SETUP.9 }
    }
}

*Feature: AutoCenter
{
  *Name: "Automatic center page"
  *FeatureType: PRINTER_PROPERTY
  *Option: NotInstalled
    {
    *Name: "Not installed"
    *DisabledFeatures: LIST()
    }

  *Option: Installed
    {
    *Name: "Auto center pages"
    *%Command: CmdSelect { *Order: PAGE_SETUP.4  }
    }
}

*Feature: AutoFeed
{
  *Name: "Automatic feed for cutting"
  *DefaultOption: Enabled
  *Option: Disabled
    {
    *Name: "Disabled"
    }

  *Option: Enabled
    {
    *Name: "Enabled"
    }
}

*Feature: PaperSize
{
    *rcNameID: =PAPER_SIZE_DISPLAY
    *DefaultOption: ProportionalA4

    *Option: ProportionalA4
    {
        *%rcNameID: =RCID_DMPAPER_SYSTEM_NAME
        *Name: "Proportional A4 (48mm x 68mm)"
        *PageDimensions: PAIR(384,543)
        *PrintableArea: PAIR(384,543)
        *PrintableOrigin: PAIR(0,0)
        *%CursorOrigin: PAIR(0, 0)
        *%RotateSize?: FALSE
        *switch: AutoCenter
          {
          *case: Installed
            {
            *CenterPrintable?: TRUE
            }
          *default:
            {
            *CenterPrintable?: FALSE
            }
          }
    *%Command: CmdSelect { *Order: DOC_SETUP.13 }
    } *% A4

    *Option: LongA4
    {
        *%rcNameID: =RCID_DMPAPER_SYSTEM_NAME
        *Name: "Proportional Long A4 (48mm x 136mm)"
        *PageDimensions: PAIR(384,1086)
        *PrintableArea: PAIR(384,1086)
        *PrintableOrigin: PAIR(0,0)
        *%CursorOrigin: PAIR(0, 0)
        *%RotateSize?: FALSE
        *switch: AutoCenter
          {
          *case: Installed
            {
            *CenterPrintable?: TRUE
            }
          *default:
            {
            *CenterPrintable?: FALSE
            }
          }
    *%Command: CmdSelect { *Order: DOC_SETUP.13 }
    } *% A4 long

    *Option: CUSTOMSIZE
    {
      *%rcNameID: =USER_DEFINED_SIZE_DISPLAY
      *Name: "Roll continious (48mm wide)"
      *MinSize: PAIR(1,1)
      *MaxSize: PAIR(384,9216)
      *MaxPrintableWidth: 384
      *MinLeftMargin: 0
      *switch: AutoCenter
        {
        *case: Installed
          {
          *CenterPrintable?: TRUE
          }
        *default:
          {
          *CenterPrintable?: FALSE
          }
        }
      *%InsertBlock: =PaperConstraints
      *CursorOrigin: PAIR(0, 0)
      *TopMargin: 0
      *BottomMargin: 0
      *%Command: CmdSelect { *Order: DOC_SETUP.13 }
    } *% CUSTOMSIZE
}

*Feature: Resolution
{
    *rcNameID: =RESOLUTION_DISPLAY
    *DefaultOption: Option203x203
    *ConcealFromUI?: TRUE
    *UpdateQualityMacro?: TRUE
    *Option: Option203x203
    {
        *Name: "203 x 203 " =DOTS_PER_INCH
        *DPI: PAIR(203, 203)
        *PinsPerPhysPass: 1
        *PinsPerLogPass: 1
        *TextDPI: PAIR(203, 203)
        *%MinStripBlankPixels: 32
        EXTERN_GLOBAL: *StripBlanks: LIST(TRAILING)
        *switch: Density
          {
          *case: Density00
            {
            *SpotDiameter: 60
            }
          *case: Density01
            {
            *SpotDiameter: 65
            }
          *case: Density02
            {
            *SpotDiameter: 70
            }
          *case: Density03
            {
            *SpotDiameter: 75
            }
          *case: Density04
            {
            *SpotDiameter: 80
            }
          *case: Density05
            {
            *SpotDiameter: 85
            }
          *case: Density06
            {
            *SpotDiameter: 90
            }
          *case: Density07
            {
            *SpotDiameter: 95
            }
          *case: Density08
            {
            *SpotDiameter: 100
            }
          *case: Density09
            {
            *SpotDiameter: 105
            }
          *case: Density10
            {
            *SpotDiameter: 110
            }
          *case: Density11
            {
            *SpotDiameter: 115
            }
          *case: Density12
            {
            *SpotDiameter: 120
            }
          *case: Density13
            {
            *SpotDiameter: 125
            }
          *case: Density14
            {
            *SpotDiameter: 130
            }
          *case: Density15
            {
            *SpotDiameter: 135
            }
          }
        *Command: CmdSendBlockData { *Cmd : "<1B>G" %2d{RasterDataWidthInBytes} } *%[0,64]RasterDataWidthInBytes
        *%Command: CmdSelect { *Order: DOC_SETUP.4 }
    }

}

*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: Density
{
  *Name: "Density"
  *%FeatureType: PRINTER_PROPERTY
  *DefaultOption: Density08
  *UpdateQualityMacro?: TRUE
  *Option: Density00
    {
    *Name: "Density 0"
    *Command: CmdSelect { *Order: DOC_SETUP.2 
                          *Cmd: "<1B>D00" }
    }
  *Option: Density01
    {
    *Name: "Density 1"
    *Command: CmdSelect { *Order: DOC_SETUP.2
                          *Cmd: "<1B>D01" }
    }
  *Option: Density02
    {
    *Name: "Density 2"
    *Command: CmdSelect { *Order: DOC_SETUP.2
                          *Cmd: "<1B>D02" }
    }
  *Option: Density03
    {
    *Name: "Density 3"
    *Command: CmdSelect { *Order: DOC_SETUP.2
                          *Cmd: "<1B>D03" }
    }
  *Option: Density04
    {
    *Name: "Density 4"
    *Command: CmdSelect { *Order: DOC_SETUP.2
                          *Cmd: "<1B>D04" }
    }
  *Option: Density05
    {
    *Name: "Density 5"
    *Command: CmdSelect { *Order: DOC_SETUP.2
                          *Cmd: "<1B>D05" }
    }
  *Option: Density06
    {
    *Name: "Density 6"
    *Command: CmdSelect { *Order: DOC_SETUP.2
                          *Cmd: "<1B>D06" }
    }
  *Option: Density07
    {
    *Name: "Density 7"
    *Command: CmdSelect { *Order: DOC_SETUP.2
                          *Cmd: "<1B>D07" }
    }
  *Option: Density08
    {
    *Name: "Density 8"
    *Command: CmdSelect { *Order: DOC_SETUP.2
                          *Cmd: "<1B>D08" }
    }
  *Option: Density09
    {
    *Name: "Density 9"
    *Command: CmdSelect { *Order: DOC_SETUP.2
                          *Cmd: "<1B>D09" }
    }
  *Option: Density10
    {
    *Name: "Density 10"
    *Command: CmdSelect { *Order: DOC_SETUP.2
                          *Cmd: "<1B>D10" }
    }
  *Option: Density11
    {
    *Name: "Density 11"
    *Command: CmdSelect { *Order: DOC_SETUP.2
                          *Cmd: "<1B>D11" }
    }
  *Option: Density12
    {
    *Name: "Density 12"
    *Command: CmdSelect { *Order: DOC_SETUP.2
                          *Cmd: "<1B>D12" }
    }
  *Option: Density13
    {
    *Name: "Density 13!"
    *Command: CmdSelect { *Order: DOC_SETUP.2
                          *Cmd: "<1B>D13" }
    }
  *Option: Density14
    {
    *Name: "Density 14!!"
    *Command: CmdSelect { *Order: DOC_SETUP.2
                          *Cmd: "<1B>D14" }
    }
  *Option: Density15
    {
    *Name: "Density 15!!!"
    *Command: CmdSelect { *Order: DOC_SETUP.2
                          *Cmd: "<1B>D15" }
    }
}

*Feature: Speed
{
  *Name: "Printing Speed"
  *DefaultOption: Normal
  *Option: Slow
    {
    *Name: "25 mm/sec" *% 1 IPS
    *Command: CmdSelect
      {
      *Order: JOB_SETUP.5
      *Cmd: "<1B>S0"
      }
    }
  *Option: Normal
    {
    *Name: "50 mm/sec" *% 1.5 IPS
    *Command: CmdSelect
      {
      *Order: JOB_SETUP.5
      *Cmd: "<1B>S1"
      }
    }
  *Option: Fast
    {
    *Name: "75 mm/sec" *% 2 IPS
    *Command: CmdSelect
      {
      *Order: JOB_SETUP.5
      *Cmd: "<1B>S2"
      }
    }
}

*MaxCopies: 99

*PrintRate: 24000 *% 8dots/mm, <=50mm/sec -> 8*50*60 as result ~ 500 ppm
*PrintRateUnit: LPM
*PrintRatePPM: 50      *% more relayable speed

*StripBlanks: LIST(TRAILING)

*Command: CmdStartPage
{
  *Order: PAGE_SETUP.1
  *Cmd: "<1B>B<1B>n001"
}
*IgnoreBlock *%Command: CmdCopies
{
  *Order: PAGE_SETUP.2
  *Cmd: "<1B>n" %3d{NumOfCopies}
}
*Command: CmdEndPage
{
  *Order: PAGE_FINISH.10
  *Cmd: "<1B>E<1B>P" %2d{NumOfCopies} *% put 00 for <1b>n command counter
}
*Command: CmdStartJob
{
  *Order: JOB_SETUP.2
  *Cmd: "_<0A>"
}
*switch: AutoFeed
  {
  *case: Enabled
    {
      *Command: CmdEndJob
      {
        *Order: JOB_FINISH.5
        *Cmd: "<1B>X<0A>"
      }
    }
  *default:
    {
      *Command: CmdEndJob
      {
        *Order: JOB_FINISH.5
        *Cmd: "<0A>"
      }
    }
  }

*RotateCoordinate?: FALSE
*RotateRaster?: FALSE
*RotateFont?: FALSE
*%RasterSendAllData?: TRUE
*%CursorXAfterCR: AT_CURSOR_X_ORIGIN
*YMoveAttributes: LIST(SEND_CR_FIRST)
*XMoveThreshold: 1
*YMoveThreshold: 1
*XMoveUnit: 203
*YMoveUnit: 203
*%Command: CmdXMoveAbsolute { *Cmd : "<1B>$" %l{DestX} }
*%Command: CmdXMoveRelLeft { *Cmd : "<1B><5C>" %l{DestXRel} }
*%Command: CmdXMoveRelRight { *Cmd : "<1B><5C>" %l{-DestXRel} }
*%Command: CmdYMoveRelDown { *Cmd : "<1B>J" %c[0,255]{max_repeat(DestYRel/4)} } dont use!
*%Command: CmdSetLineSpacing { *Cmd : "<1B>3" %c[0,255]{LinefeedSpacing} }
*Command: CmdCR { *Cmd : "<0D>" }
*Command: CmdLF { *Cmd : "<0A>" }
*Command: CmdFF { *Cmd : "<0C>" }
*EjectPageWithFF?: FALSE
*OutputDataFormat: H_BYTE
*%MirrorRasterByte?: TRUE
*%OptimizeLeftBound?: never allow it!!! or write!!!
*SendMultipleRows?: FALSE
*CursorXAfterSendBlockData: AT_CURSOR_X_ORIGIN
*CursorYAfterSendBlockData: AUTO_INCREMENT
