Unidrv's function order?! - SendFontCmd() & SendBlockData()

Mar 23, 2006 1 Replies

Hi all



I have some questions about Unidrv (GPD's minidriver + OEMDLL). Could somebody please answer my question?



Now I'm making Unidrv driver for miniprinter (like Epson's TM88III) with ESC/POS command. I completed printing with only image (maybe raster data), so I added device font in it.



Then I have got bad print result, which I am, researching driver's action and its execution sequence.



My driver does execute device font module first and then image. Exactly, like below


  1. When I print test_RASTERFIRST.doc to my miniprinter, functions' order is like below. - This is NG. Because of this order, coordinate Y is mismatch with real data's coordinate. SendFontCmd() OutputCharStr() SendFontCmd() OutputCharStr() SendFontCmd() OutputCharStr() :

SendBlockData() : :


  1. When I print test_DEVICEFONTfirst.doc to my miniprinter, functions' order is like below. - This is OK because device font module processed first.

SendFontCmd() OutputCharStr() SendFontCmd() OutputCharStr() SendFontCmd() OutputCharStr() : SendBlockData() : :



My minidrvier's peculiar things are... (GPD is attached)



*PrinterType: PAGE
*
MasterUnits: PAIR(180, 180)

SendFontCmd() and OutputCharStr() work printing device font with command in UFM's SelectFont. Is the function call order related with something? I think printertype doesn't have relation with this problem, am I right?



I am now very discouraged and confused. T-T If among you a person who knows this, Please kind and concrete answer.


// //-->> below is my gpd, please refer //



*GPDSpecVersion: "1.0"
*
GPDFileName: "test.GPD"
*GPDFileVersion: "1.0"
*
Include: "StdNames.gpd"
*ModelName: "Somthing"
*
MasterUnits: PAIR(180, 180)
*Personality: "ESC/POS"
*ResourceDLL: "test.dll"
*
PrintRate: 250
*PrintRatePPM: 2
*
PrintRateUnit: PPM
*PrinterType: PAGE
*
% PrinterType: SERIAL


*Feature: Orientation { *rcNameID: =ORIENTATION_DISPLAY *DefaultOption: PORTRAIT *Option: PORTRAIT { *rcNameID: =PORTRAIT_DISPLAY *Command: CmdSelect { *Order: DOC_SETUP.4 *CallbackID: 1141 } } *Option: LANDSCAPE_CC90 { *rcNameID: =LANDSCAPE_DISPLAY *Command: CmdSelect { *Order: DOC_SETUP.4 *CallbackID: 1142 } } }


*Feature: InputBin { *rcNameID: =PAPER_SOURCE_DISPLAY *DefaultOption: AUTO *Option: AUTO { *rcNameID: 268 *% =AUTO_DISPLAY *OptionID: 268 *Command: CmdSelect { *Order: DOC_SETUP.9 *CallbackID: 1165 } } }


*Feature: Resolution { *rcNameID: =RESOLUTION_DISPLAY *DefaultOption: Option1 *Option: Option1 { *Name: "180 x 180 " =DOTS_PER_INCH *DPI: PAIR(180, 180) *TextDPI: PAIR(180, 180) MinStripBlankPixels: 180 *SpotDiameter: 200 *PinsPerLogPass: 180 *PinsPerPhysPass: 180 *% should be multiple of 8 EXTERN_GLOBAL: *StripBlanks: LIST(TRAILING) *% (LEADING,ENCLOSED,TRAILING) } }


*Feature: PaperSize { *rcNameID: =PAPER_SIZE_DISPLAY *DefaultOption: Option1 *Option: Option1 { *rcNameID: 260 *OptionID: 260 *PageDimensions: PAIR(567, 2104) *switch: Orientation { *case: PORTRAIT { *PrintableArea: PAIR(514, 1794) *PrintableOrigin: PAIR(19, 155) *Command: CmdSelect { *Order: DOC_SETUP.10 *CallbackID: 1151 } } *case: LANDSCAPE_CC90 { *PrintableArea: PAIR(514, 1794) *PrintableOrigin: PAIR(19, 155) *Command: CmdSelect { *Order: DOC_SETUP.10 *CallbackID: 1152 } } } } }


*Feature: Halftone { *rcNameID: =HALFTONING_DISPLAY *DefaultOption: HT_PATSIZE_AUTO *DefaultOption: NONE_2x2 *Option: NONE_2x2 { *rcNameID: =NONE_DISPLAY } *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 } }


*% *Command: CmdStartJob
*% {
*
% *Order: JOB_SETUP.1
*
% *CallbackID: 1
*
% }


*Command: CmdStartDoc { *Order: DOC_SETUP.7 *CallbackID: 1000 }



*Command: CmdStartPage { *Order: PAGE_SETUP.1 *CallbackID: 2000 }


*
Command: CmdEndPage { *Order: PAGE_FINISH.1 *CallbackID: 2999 }



*Command: CmdEndDoc { *Order: DOC_FINISH.1 *CallbackID: 1999 }


*
% *Command: CmdEndJob



*% {
*
% *Order: JOB_FINISH.1
*
% *CallbackID: 999
*
% }


*CursorXAfterSendBlockData: AT_GRXDATA_ORIGIN



*CursorYAfterSendBlockData: NO_MOVE
*
OutputDataFormat: H_BYTE
*SendMultipleRows?: TRUE
*
RasterSendAllData?: FALSE


*Command: CmdBeginRaster { *CallbackID: 2180 }



*Command: CmdEndRaster { *CallbackID: 2181 }


*Command: CmdSendBlockData { *Params: LIST(RasterDataWidthInBytes,RasterDataHeightInPixels) *% Params: LIST(NumOfDataBytes) *CallbackID: 2182 *% Cmd : "*!" %l{NumOfDataBytes / 3} }


*XMoveThreshold: 0
*
YMoveThreshold: 0
*XMoveUnit: 180
*
YMoveUnit: 180


*CursorXAfterCR: AT_PRINTABLE_X_ORIGIN



*% YMoveAttributes: LIST(FAVOR_LF)
*
MaxLineSpacing: 180


*Command: CmdXMoveAbsolute { *Params: LIST(DestX) *CallbackID: 2002 *% Cmd : "$" %l{(DestX) } }


*Command: CmdYMoveAbsolute { *Params: LIST(DestY) *CallbackID: 2003 }


*
% Command: CmdYMoveRelDown



*% {
*
% *Cmd : "J" %c[1,255]{max_repeat((DestYRel) )}
*
% }


*Command: CmdCR { *Cmd : "" }



*Command: CmdLF { *Cmd : "" }
*Command: CmdFF { *Cmd : "" }


*RotateCoordinate?: FALSE



*RotateRaster?: FALSE
*
RotateFont?: FALSE


*CharPosition: BASELINE



*DefaultCTT: -1
*
DefaultFont: 11
*% LockAheadRegion: 180 *% for only SERIAL PRINTER, for ordering text and bitmap data


*ReselectFont: LIST(AFTER_GRXDATA, AFTER_XMOVE, AFTER_FF)



*switch: Orientation { *case: PORTRAIT { *TextCaps: LIST(TC_OP_CHARACTER,TC_SA_DOUBLE,TC_EA_DOUBLE, TC_RA_ABLE) } *case: LANDSCAPE_CC90 { *TextCaps: LIST(TC_RA_ABLE) } }


*
switch: Orientation { *case: PORTRAIT { *DeviceFonts: LIST(1,2,3,4,5,6,7,8,9,10,11,13,15,17,21,31,33,35,37,41) } *case: LANDSCAPE_CC90 { *DeviceFonts: LIST() } }



Betty,

I think you are looking for the Windows Embedded Point of Service newsgroup.

microsoft.public.windows.embedded.pointofservice

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required