Sample Code
Windows Driver Samples/ MSPLOT Plotter Driver Sample/ C++/ mini/ hpgl2pen/ hpgl2pen.txt/
; ; Plotter GPC data file format ; ; 1. All key value(s) for the keyword must enclose by {} brace pair. ; 2. The String must enclosed by "" ; 3. a ';' denote comment to the end of the line ; 4. Types ; a. FLAG - 1 or 0 ; b. WORD - 16 bit number ; c. DWORD - 32 bit number ; d. STRING - ANSI character string, maximum size depends on keyword ; e. FORMSRC - 1. 31 byte string for the name ; 2. 2 DWORDs: size width/height (SIZEL) 1/1000mm ; ** if height is <= 25400 (1 inch) or it greater ; then DeviceSize CY then it assumes that the form ; is variable length and will reset height to ; zero (0) ; 3. 4 DWORDs: Left/Top/Right/Bottom margins in 1/1000mm ; f. CONSTANT - Pick from a set of predefined string in header file ; g. COLORINFO - Windows 2000, Windows XP and Windows Server 2003 DDI COLORINFO data structure (30 DWORDs) ; h. PENDATA - 1. One word specified 1 based pen number ; 2. constant specified predefined pen color PC_IDX_xxxx ; 3. One Word specified thickness in mm. ; ; ; *** if DeivceSize' height is <= 25400 (1 inch) then it assume that the ; device can handle variable length paper and will reset height to ; zero (0) ; ; ; Keyword Type Count Range/Size ; ------------------------------------------------------------------------- ; DeviceName STRING 31 Device name ; DeviceSize DWORD 2 Device cx/cy in 1/1000mm ; DeviceMargin DWORD 4 Device L/T/R/B margin in 1/1000mm ; RasterCap Flag 1 0/1 ; ColorCap Flag 1 0/1 ; BezierCap Flag 1 0/1 ; RasterByteAlign Flag 1 0/1 ; PushPopPal Flag 1 0/1 ; TransparentCap Flag 1 0/1 ; WindingFillCap Flag 1 0/1 ; RollFeedCap Flag 1 0/1 ; PaperTrayCap Flag 1 0/1 has a main paper tray? ; RasterDPI WORD 2 X/Y Dots per Inch ; ROPLevel DWORD 1 0/1/2 ; MaxScale WORD 1 0-10000 (100 times bigger) ; MaxPens WORD 1 Device ; MaxCopies WORD 1 Device ; MaxPolygonPts WORD 1 Device ; MaxQuality WORD 1 Device maximum quality levels ; PaperTraySize DWORD 2 Paper Tray width/height in 1/1000mm ; COLORINFO DWORD 30 COLORINFO data structure ; DevicePelsDPI DWORD 1 Dots Per Inch ; HTPatternSize CONSTANT 1 HT_PATSIZE_xx ; InitString STRING 255 Standard string ; PlotPenData PENDATA 32 (Max) Pen Plotter's definitions ; FormInfo FORMSRC 64 Device supported forms ; ; Following are example values for the PLOTTER characterization data ; DeviceName { "Hewlett-Packard HP-GL/2 Plotter" } DeviceSize { 919000, 15240000 } ; Device Size Max=(36" x 50') DeviceMargin { 5000, 5000, 5000, 36000 } ; Device Margin RasterCap { 0 } ; Raster able plotter ColorCap { 1 } ; Color plotter BezierCap { 0 } ; Can do bezier curve RasterByteAlign { 0 } ; Raster data need byte aligned PushPopPal { 0 } ; raster need push/pop palette TransparentCap { 0 } ; can do transparent mode WindingFillCap { 0 } ; can do winding fill RollFeedCap { 1 } ; can do roll feed PaperTrayCap { 0 } ; has paper input tray RasterDPI { 508, 508 } ; raster X/Y DPI ROPLevel { ROP_LEVEL_0 } ; ROP levels (ROP_LEVEL_0/1) PlotDPI { 1016, 1016 } ; Plotter units MaxScale { 1000 } ; Scale in 1% increment 100=100% MaxPens { 8 } ; Maximum pen it can handle MaxCopies { 1 } ; Maximum copies it can handle MaxPolygonPts { 512 } ; Maximum Polygon points in device MaxQuality { 3 } ; maximum 4 quality levels NoBitmapFont { 1 } ; Pen plotters cant have raster fonts RTLMonoEncode5 { 0 } ; NO RTL Mono Adapt Compression ; ; Only needed if PaperTrayCap = 1, NOT USED NOW ; ;PaperTraySize { 914400, 15240000 } ; paper tray size ; COLORINFO { 6810, 3050, 0, ; xr, yr, Yr 2260, 6550, 0, ; xg, yg, Yg 1810, 500, 0, ; xb, yb, Yb 2000, 2450, 0, ; xc, yc, Yc 5210, 2100, 0, ; xm, ym, Ym 4750, 5100, 0, ; xy, yy, Yy 3324, 3474, 10000, ; xw, yw, Yw 10000, 10000, 10000, ; RGB gamma 1422, 952, 787, ; Dye correction datas 495, 324, 248 } DevicePelsDPI { 0 } ; effective device DPI (default) HTPatternSize { HT_PATSIZE_6x6_M } ; GDI Halftone pattern size InitString { "\003;BP;IN;SP0;" } FormInfo { "ANSI A 8.5 x 11 in", 215900, 279400, 0, 0, 0, 0 } FormInfo { "ANSI B 11 x 17 in", 279400, 431800, 0, 0, 0, 0 } FormInfo { "ANSI C 17 x 22 in", 431800, 558800, 0, 0, 0, 0 } FormInfo { "ANSI D 22 x 34 in", 558800, 863600, 0, 0, 0, 0 } FormInfo { "ANSI E 34 x 44 in", 863600, 1117600, 0, 0, 0, 0 } FormInfo { "ISO A4 210 x 297 mm", 210000, 297000, 0, 0, 0, 0 } FormInfo { "ISO A3 297 x 420 mm", 297000, 420000, 0, 0, 0, 0 } FormInfo { "ISO A2 420 x 594 mm", 420000, 594000, 0, 0, 0, 0 } FormInfo { "ISO A1 594 x 841 mm", 594000, 841000, 0, 0, 0, 0 } FormInfo { "ISO A0 841 x 1189 mm", 841000, 1189000, 0, 0, 0, 0 } FormInfo { "ISO OS A2 480 x 625 mm", 480000, 625000, 0, 0, 0, 0 } FormInfo { "ISO OS A1 625 x 900 mm", 625000, 900000, 0, 0, 0, 0 } FormInfo { "JIS B4 257 x 364 mm", 257000, 364000, 0, 0, 0, 0 } FormInfo { "JIS B3 364 x 515 mm", 364000, 515000, 0, 0, 0, 0 } FormInfo { "JIS B2 515 x 728 mm", 515000, 728000, 0, 0, 0, 0 } FormInfo { "JIS B1 728 x 1030 mm", 728000, 1030000, 0, 0, 0, 0 } FormInfo { "Arch A 9 x 12 in", 228600, 304800, 0, 0, 0, 0 } FormInfo { "Arch B 12 x 18 in", 304800, 457200, 0, 0, 0, 0 } FormInfo { "Arch C 18 x 24 in", 457200, 609600, 0, 0, 0, 0 } FormInfo { "Arch D 24 x 36 in", 609600, 914400, 0, 0, 0, 0 } FormInfo { "Arch E 36 x 48 in", 914400, 1219200, 0, 0, 0, 0 } FormInfo { "Arch E1 30 x 42 in", 762000, 1066800, 0, 0, 0, 0 } FormInfo { "ISO B4 250 x 353 mm", 250000, 353000, 0, 0, 0, 0 } FormInfo { "ISO B3 353 x 500 mm", 353000, 500000, 0, 0, 0, 0 } FormInfo { "ISO B2 500 x 707 mm", 500000, 707000, 0, 0, 0, 0 } FormInfo { "ISO B1 707 x 1000 mm", 707000, 1000000, 0, 0, 0, 0 } FormInfo { "ISO OS A0 900 x 1245 mm", 900000, 1245000, 0, 0, 0, 0 } FormInfo { "Arch E3 27 x 39 in", 685800, 990600, 0, 0, 0, 0 } FormInfo { "Arch E2 26 x 38 in", 660400, 965200, 0, 0, 0, 0 } FormInfo { "DIN C4 229 x 324 mm", 229000, 324000, 0, 0, 0, 0 } FormInfo { "DIN C3 324 x 458 mm", 324000, 458000, 0, 0, 0, 0 } FormInfo { "DIN C2 458 x 648 mm", 458000, 648000, 0, 0, 0, 0 } FormInfo { "DIN C1 648 x 917 mm", 648000, 917000, 0, 0, 0, 0 } FormInfo { "DIN C0 917 x 1297 mm", 917000, 1297000, 0, 0, 0, 0 } FormInfo { "Roll Paper 36 in (914 mm)", 914400, 0, 25400, 0, 25400, 0 } FormInfo { "Roll Paper 24 in (610 mm)", 609600, 0, 25400, 0, 25400, 0 } FormInfo { "Roll Paper A0 (841 mm)", 841000, 0, 25400, 0, 25400, 0 } FormInfo { "Roll Paper A1 (594 mm)", 594000, 0, 25400, 0, 25400, 0 } ; ; Only allowed if RasterCap = 0, and must defined all pens (MaxPens) ; PlotPenData { 1, PC_BLACK } PlotPenData { 2, PC_RED } PlotPenData { 3, PC_GREEN } PlotPenData { 4, PC_YELLOW } PlotPenData { 5, PC_BLUE } PlotPenData { 6, PC_MAGENTA } PlotPenData { 7, PC_CYAN } PlotPenData { 8, PC_VIOLET } ;
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