Sample Code
Windows Driver Samples/ USB Host-Based Print Driver Sample/ C++/ usb_host_based_sample.gpd/
*% *% This file is a sample GPD demonstrating basic printer features/options *% *% *%****************************************************************************** *%: The following root-level attributes should be modified to suit your printer *%****************************************************************************** *GPDFileName: "usb_host_based.GPD" *GPDFileVersion: "1.0" *GPDSpecVersion: "1.0" *Include: "StdNames.gpd" *%************************************************** *% V4 GPD-based printer drivers must include msxpsinc.GPD file *%************************************************** *Include: "msxpsinc.gpd" *ModelName: "Microsft USB Host Based Sample Driver" *MasterUnits: PAIR(1200, 1200) *PrinterType: PAGE *MaxCopies: 1 *Command: CmdSendBlockData { *Cmd : "" } *PrintSchemaPrivateNamespaceURI: "http://www.microsoft.com/USBHostBasedSample" *%****************************************************************************** *% Orientation *%****************************************************************************** *Feature: Orientation { *rcNameID: =ORIENTATION_DISPLAY *DefaultOption: PORTRAIT *Option: PORTRAIT { *rcNameID: =PORTRAIT_DISPLAY } *Option: LANDSCAPE_CC270 { *rcNameID: =LANDSCAPE_DISPLAY } } *%****************************************************************************** *% 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 } } *%****************************************************************************** *% Input Bin *%****************************************************************************** *Feature: InputBin { *rcNameID: =PAPER_SOURCE_DISPLAY *DefaultOption: FORMSOURCE *Option: FORMSOURCE { *rcNameID: =AUTO_DISPLAY } *Option: UPPER { *rcNameID: =UPPER_TRAY_DISPLAY } } *%****************************************************************************** *% Paper Size *%****************************************************************************** *Feature: PaperSize { *rcNameID: =PAPER_SIZE_DISPLAY *DefaultOption: LETTER *Option: LETTER { *rcNameID: =RCID_DMPAPER_SYSTEM_NAME *% 1000 *switch: Orientation { *case: PORTRAIT { *PrintableArea: PAIR(9000, 12600) *PrintableOrigin: PAIR(200, 200) *CursorOrigin: PAIR(0, 0) } *case: LANDSCAPE_CC270 { *PrintableArea: PAIR(9000, 12600) *PrintableOrigin: PAIR(200, 200) *CursorOrigin: PAIR(0, 0) } } } *Option: A4 { *rcNameID: =RCID_DMPAPER_SYSTEM_NAME *% 1008 *switch: Orientation { *case: PORTRAIT { *PrintableArea: PAIR(9000, 12600) *PrintableOrigin: PAIR(200, 200) *CursorOrigin: PAIR(0, 0) } *case: LANDSCAPE_CC270 { *PrintableArea: PAIR(9000, 12600) *PrintableOrigin: PAIR(200, 200) *CursorOrigin: PAIR(0, 0) } } } } *%****************************************************************************** *% Cursor Commands *% The following cursor commands are mandatory *% *% Learn more: Cursor Commands *% http://msdn.microsoft.com/en-us/library/ff547223(VS.85).aspx *%****************************************************************************** *Command: CmdCR { *Cmd : "" } *Command: CmdLF { *Cmd : "" } *Command: CmdFF { *Cmd : "" }
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