A computer components & hardware forum. HardwareBanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » HardwareBanter forum » General Hardware & Peripherals » Printers
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

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



 
 
Thread Tools Display Modes
  #1  
Old March 23rd 06, 08:11 AM posted to comp.periphs.printers
external usenet poster
 
Posts: n/a
Default [oemuni] Unidrv's function order?! - SendFontCmd() & SendBlockData()

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()
:
:

2. 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

*Featu 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
}
}
}

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

*Featu 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)
}
}

*Featu 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
}
}
}
}
}

*Featu 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,RasterDataHeightInPixe ls)
*% Params: LIST(NumOfDataBytes)
*CallbackID: 2182
*% Cmd : "1B*!" %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 : "1B$" %l{(DestX) }
}

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

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

*Command: CmdCR { *Cmd : "0D" }
*Command: CmdLF { *Cmd : "0A" }
*Command: CmdFF { *Cmd : "0C" }


*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()
}
}

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Update on Athlon 2600 Ghz discrepancy David Simmons Overclocking AMD Processors 7 August 27th 04 08:56 PM
LITEON's dark secret? No Longer a LiteOn Customer Homebuilt PC's 49 April 15th 04 04:41 AM
Happy Birthday America SST Overclocking 333 November 27th 03 07:54 PM
Happy Birthday America SST Overclocking AMD Processors 326 November 27th 03 07:54 PM
Get the Serial Number with Visual Basic Michael Wittmann General 15 November 15th 03 06:03 PM


All times are GMT +1. The time now is 07:58 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 HardwareBanter.
The comments are property of their posters.