Sample Code
Windows Driver Samples/ OEM Printer Customization Plug-in Samples/ C++/ uniuirep/ res/ uniuirep.gpd/
*GPDFileName: "uniuirep.gpd" *GPDFileVersion: "1.0" *GPDSpecVersion: "1.0" *Include: "StdNames.gpd" *ModelName: "OEM Unidrv Full UI Replacement Sample" *MasterUnits: PAIR(1200, 1200) *ResourceDLL: "unires.dll" *PrinterType: PAGE *MaxCopies: 99 *PrintRate: 16 *PrintRateUnit: PPM *PrintRatePPM: 16 *%****************************************************************************************** *% Orientation *%****************************************************************************************** *Feature: Orientation { *rcNameID: =ORIENTATION_DISPLAY *DefaultOption: PORTRAIT *Option: PORTRAIT { *rcNameID: =PORTRAIT_DISPLAY *Command: CmdSelect { *Order: DOC_SETUP.6 *Cmd: "<1B>&l0O" } } *Option: LANDSCAPE_CC90 { *rcNameID: =LANDSCAPE_DISPLAY *Command: CmdSelect { *Order: DOC_SETUP.8 *Cmd: "<1B>&l1O" } } } *%****************************************************************************************** *% Input Bin *%****************************************************************************************** *Feature: InputBin { *rcNameID: =PAPER_SOURCE_DISPLAY *DefaultOption: AUTO *Option: AUTO { *rcNameID: =AUTO_DISPLAY *Command: CmdSelect { *Order: DOC_SETUP.11 *Cmd: "<1B>&l0H" } } *Option: UPPER { *rcNameID: =UPPER_TRAY_DISPLAY *Command: CmdSelect { *Order: DOC_SETUP.11 *Cmd: "<1B>&l1H" } } } *%****************************************************************************************** *% Resolution *%****************************************************************************************** *Feature: Resolution { *rcNameID: =RESOLUTION_DISPLAY *DefaultOption: 300dpi *Option: 600dpi { *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>*v7S<1B>*r1A" } *Command: CmdEndRaster { *Cmd : "<1B>*rC" } *Command: CmdSendBlockData { *Cmd : "<1B>*b" %d{NumOfDataBytes}"W" } *Command: CmdSelect { *Order: DOC_SETUP.7 *Cmd: "@PJL SET RESOLUTION=600<0A>@PJL ENTER LANGUAGE=PCL<0A0D1B>E<1B>*t600R" } } *Option: 300dpi { *Name: "300 x 300" =DOTS_PER_INCH *DPI: PAIR(300, 300) *TextDPI: PAIR(300, 300) *MinStripBlankPixels: 32 EXTERN_GLOBAL: *StripBlanks: LIST(ENCLOSED, TRAILING) *SpotDiameter: 100 *Command: CmdBeginRaster { *Cmd : "<1B>*v7S<1B>*r1A" } *Command: CmdEndRaster { *Cmd : "<1B>*rC" } *Command: CmdSendBlockData { *Cmd : "<1B>*b" %d{NumOfDataBytes}"W" } *Command: CmdSelect { *Order: DOC_SETUP.7 *Cmd: "@PJL SET RESOLUTION=300<0A>@PJL ENTER LANGUAGE=PCL<0A0D1B>E<1B>*t300R" } } *Option: 150dpi { *Name: "150 x 150" =DOTS_PER_INCH *DPI: PAIR(150, 150) *TextDPI: PAIR(150, 150) *MinStripBlankPixels: 32 EXTERN_GLOBAL: *StripBlanks: LIST(ENCLOSED, TRAILING) *SpotDiameter: 100 *Command: CmdBeginRaster { *Cmd : "<1B>*v7S<1B>*r1A" } *Command: CmdEndRaster { *Cmd : "<1B>*rC" } *Command: CmdSendBlockData { *Cmd : "<1B>*b" %d{NumOfDataBytes}"W" } *Command: CmdSelect { *Order: DOC_SETUP.7 *Cmd: "@PJL SET RESOLUTION=150<0A>@PJL ENTER LANGUAGE=PCL<0A0D1B>E<1B>*t150R" } } } *%****************************************************************************************** *% HP-GL/2 Graphics Support *%****************************************************************************************** *Ifdef: WINNT_51 *Personality: =PERSONALITY_HPGL2 *Feature: GraphicsMode { *rcNameID: =GRAPHICSMODE_DISPLAY *DefaultOption: HPGL2MODE *Option: HPGL2MODE { *rcNameID: =GRAPHICSMODE_HPGL2_DISPLAY } *Option: RASTERMODE { *rcNameID: =GRAPHICSMODE_RASTER_DISPLAY *Command: CmdSelect { *Order: DOC_SETUP.5 *Cmd: "@PJL SET LIMAGEENHANCE=OFF<0A>" } } } *Endif: *%****************************************************************************************** *% Paper Size *%****************************************************************************************** *Feature: PaperSize { *rcNameID: =PAPER_SIZE_DISPLAY *DefaultOption: LETTER *Option: LETTER { *rcNameID: =RCID_DMPAPER_SYSTEM_NAME *PageProtectMem: 1028 *switch: Orientation { *case: PORTRAIT { *PrintableArea: PAIR(9500, 12500) *PrintableOrigin: PAIR(400, 400) *CursorOrigin: PAIR(300, 300) *Command: CmdSelect { *Order: DOC_SETUP.12 *Cmd: "<1B>&l2a8c1E<1B>*p0x0Y<1B>*c0t5260x7704Y" } } *case: LANDSCAPE_CC90 { *PrintableArea: PAIR(9500, 12200) *PrintableOrigin: PAIR(450, 300) *CursorOrigin: PAIR(200, 12900) *Command: CmdSelect { *Order: DOC_SETUP.12 *Cmd: "<1B>&l2a8c1E<1B>*p0x0Y<1B>*c0t7332x5880Y" } } } } *Option: LEGAL { *rcNameID: =RCID_DMPAPER_SYSTEM_NAME *PageProtectMem: 1692 *switch: Orientation { *case: PORTRAIT { *PrintableArea: PAIR(9000, 15500) *PrintableOrigin: PAIR(400, 600) *CursorOrigin: PAIR(180, 300) *Command: CmdSelect { *Order: DOC_SETUP.12 *Cmd: "<1B>&l3a8c1E<1B>*p0x0Y<1B>*c0t5880x8900Y" } } *case: LANDSCAPE_CC90 { *PrintableArea: PAIR(9000, 15500) *PrintableOrigin: PAIR(400, 900) *CursorOrigin: PAIR(180, 16500) *Command: CmdSelect { *Order: DOC_SETUP.12 *Cmd: "<1B>&l3a8c1E<1B>*p0x0Y<1B>*c0t8900x5880Y" } } } } *Option: EXECUTIVE { *rcNameID: =RCID_DMPAPER_SYSTEM_NAME *PageProtectMem: 4109 *switch: Orientation { *case: PORTRAIT { *PrintableArea: PAIR(8100, 11500) *PrintableOrigin: PAIR(300, 300) *CursorOrigin: PAIR(300, 200) *Command: CmdSelect { *Order: DOC_SETUP.12 *Cmd: "<1B>&l1a8c1E<1B>*p0x0Y<1B>*c0t4860x7344Y" } } *case: LANDSCAPE_CC90 { *PrintableArea: PAIR(8300, 11500) *PrintableOrigin: PAIR(200, 300) *CursorOrigin: PAIR(200, 12300) *Command: CmdSelect { *Order: DOC_SETUP.12 *Cmd: "<1B>&l1a8c1E<1B>*p0x0Y<1B>*c0t7272x4980Y" } } } } *Option: A4 { *rcNameID: =RCID_DMPAPER_SYSTEM_NAME *PageProtectMem: 4249 *switch: Orientation { *case: PORTRAIT { *PrintableArea: PAIR(9100, 13200) *PrintableOrigin: PAIR(400, 300) *CursorOrigin: PAIR(288, 180) *Command: CmdSelect { *Order: DOC_SETUP.12 *Cmd: "<1B>&l26a8c1E<1B>*p0x0Y<1B>*c0t5594x8201Y" } } *case: LANDSCAPE_CC90 { *PrintableArea: PAIR(9100, 13200) *PrintableOrigin: PAIR(400, 300) *CursorOrigin: PAIR(204, 13824) *Command: CmdSelect { *Order: DOC_SETUP.12 *Cmd: "<1B>&l26a8c1E<1B>*p0x0Y<1B>*c0t8129x5714Y" } } } } *Option: B5 { *rcNameID: =RCID_DMPAPER_SYSTEM_NAME *PageProtectMem: 3198 *switch: Orientation { *case: PORTRAIT { *PrintableArea: PAIR(7900, 11140) *PrintableOrigin: PAIR(352, 300) *CursorOrigin: PAIR(300, 100) *Command: CmdSelect { *Order: DOC_SETUP.12 *Cmd: "<1B>&l12a8c1E<1B>*p0x0Y<1B>*c0t4970x7040Y" } } *case: LANDSCAPE_CC90 { *PrintableArea: PAIR(7760, 11140) *PrintableOrigin: PAIR(300, 400) *CursorOrigin: PAIR(100, 11940) *Command: CmdSelect { *Order: DOC_SETUP.12 *Cmd: "<1B>&l12a8c1E<1B>*p0x0Y<1B>*c0t6780x4970Y" } } } } } *%****************************************************************************************** *% Outputbin *%****************************************************************************************** *Feature: OutputBin { *rcNameID: =OUTPUTBIN_DISPLAY *HelpIndex: 12006 *DefaultOption: Option1 *Option: Option1 { *% Auto Select *Name: "default" *Command: CmdSelect { *Order: DOC_SETUP.4 *Cmd: "@PJL SET OUTBIN=OPTIONALOUTBIN2<0A>@PJL SET FINISH=NONE<0A>" } } *Option: Option14 { *% Stacker *Name: "stacker" *% Stacker *Command: CmdSelect { *Order: DOC_SETUP.4 *Cmd: "@PJL SET OUTBIN=OPTIONALOUTBIN2<0A>@PJL SET FINISH=NONE<0A>" } } } *%****************************************************************************************** *% Media Type *%****************************************************************************************** *Feature: MediaType { *rcNameID: =MEDIA_TYPE_DISPLAY *DefaultOption: PLAIN *Option: PLAIN { *rcNameID: =PLAIN_PAPER_DISPLAY *Command: CmdSelect { *Order: DOC_SETUP.15 *Cmd: "<1B>&n6WdPlain" } } *Option: TRANSPARENCY { *rcNameID: =TRANSPARENCY_DISPLAY *Command: CmdSelect { *Order: DOC_SETUP.15 *Cmd: "<1B>&n13WdTransparency" } } } *%****************************************************************************************** *% HalfTone *%****************************************************************************************** *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 } } *%****************************************************************************************** *% Memory *% *% Note: Unidrv uses the font memory information to estimate when it needs to stop *% downloading fonts for a page, and thus driver writers should err on the conservative *% side. Otherwise, printers will generate "out of memory" device errors for pages with *% a large number of fonts / unique glyphs. *%****************************************************************************************** *Feature: Memory { *rcNameID: =PRINTER_MEMORY_DISPLAY *DefaultOption: 32768KB *Option: 16384KB { *Name: "16MB" *MemoryConfigKB: PAIR(16384, 13950) } *Option: 32768KB { *Name: "32MB" *MemoryConfigKB: PAIR(32768, 28350) } } *%****************************************************************************************** *% Page Protect *%****************************************************************************************** *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=LETTER<0A>" } } *Option: OFF { *rcNameID: =OFF_DISPLAY *Command: CmdSelect { *Order: DOC_SETUP.1 *Cmd: "<1B>%%-12345X@PJL SET PAGEPROTECT=OFF<0A>" } } } *%****************************************************************************************** *% Doc setup commands *%****************************************************************************************** *Command: CmdStartDoc { *Order: DOC_SETUP.7 *Cmd: "<1B>&u1200D<1B>*r0F" } *Command: CmdStartPage { *Order: PAGE_SETUP.1 *Cmd: "<1B>*b0M<0D>" } *Command: CmdEndJob { *Order: JOB_FINISH.1 *Cmd: "<1B>E<1B>%%-12345X@PJL<20>LPORTROTATE<0A><1B>%%-12345X" } *Command: CmdCopies { *Order: DOC_SETUP.13 *Cmd: "<1B>&l" %d{NumOfCopies}"X" } *%****************************************************************************************** *% Cursor, Page and Color Commands *%****************************************************************************************** *RotateCoordinate?: TRUE *RotateRaster?: TRUE *RotateFont?: TRUE *TextCaps: LIST(TC_CR_90,TC_UA_ABLE) *MemoryUsage: LIST(FONT, RASTER, VECTOR) *CursorXAfterCR: AT_PRINTABLE_X_ORIGIN *BadCursorMoveInGrxMode: LIST(X_PORTRAIT,Y_LANDSCAPE) *XMoveThreshold: 0 *YMoveThreshold: 0 *XMoveUnit: 300 *YMoveUnit: 300 *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: CmdDefinePaletteEntry { *Cmd : "<1B>*v" %d{RedValue}"a" %d{GreenValue}"b" %d{BlueValue}"c" + %d{PaletteIndexToProgram} "I" } *Command: CmdSelectPaletteEntry { *Cmd : "<1B>*v" %d{CurrentPaletteIndex}"S" } *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" } *OutputDataFormat: H_BYTE *OptimizeLeftBound?: TRUE *CursorXAfterSendBlockData: AT_GRXDATA_ORIGIN *CursorYAfterSendBlockData: AUTO_INCREMENT *%****************************************************************************************** *% Font Descriptions and Commands *%****************************************************************************************** *DefaultFont: 136 *DefaultCTT: 0 *CharPosition: BASELINE *DeviceFonts: LIST(136,138,146,147,148,149,150,151,152,153,154,155,156,157, + 163,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: 600dpi { *FontFormat: HPPCL_OUTLINE } *case: 300dpi { *FontFormat: HPPCL_OUTLINE } *case: 150dpi { *FontFormat: HPPCL_RES } } *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" } *%******************************************************************************************** *%* Vector Commands. *%******************************************************************************************** *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" }
Our Services
-
What our customers say about us?
Read our customer testimonials to find out why our clients keep returning for their projects.
View Testimonials