Printing positive from 2000 but negative from XP



Hi,

I have a custom thermal printer for which I tried to make a custom driver
using unidrv technology.
The data that goes to the printer has to consist in a start block command
which is CD AB 20 00 followed by 1728 bytes of data corresponding to the
actual pixels that have to be printed (00 or FF) followed 2368 bytes of FF.
This structure is repeated over and over again till the end of the page.
The problem is however that the bytes values corresponding to pixels are
reversed in Windows XP, in other words for white pixels the driver generates
FFs while in Windows 2000 white pixels corresponds to 00. This turns into XP
printing white on black (negative). That doesn't happend all the time though,
for example printing from Notepad is always negative, Word sometimes negative
and sometimes positive and Paint mostly positive.
I've been spending 2 weeks on this issue, my idea would be that the GPD is
incomplete, some instructions/directives are missing.

Here is the inf gdp file and I must say any suggestion is appreciated.
*%
*% KEL USB Printer Minidriver
*% Part no. D409-04269
*%
*% Copyright (c) 2006 Knudsen Engineering Limited
*% All Rights Reserved.
*%

*% Root Attributes
*GPDSpecVersion: "1.0"
*GPDFileName: "ECHOPRNT.GPD"
*GPDFileVersion: "1.0"
*Include: "stdnames.gpd"

*ModelName: "KEL EchoPrinter"

*% 216 used because it is a factor of 1728
*MasterUnits: PAIR(216, 216)
*PrinterType: SERIAL

*% Only one source of paper
*Feature: InputBin
{
*rcNameID: =PAPER_SOURCE_DISPLAY
*Option: AUTO
{
*Name: "Auto"
}
}

*% 216 pixels per inch; this is an uneducated guess which works for the moment
*Feature: Resolution
{
*rcNameID: =RESOLUTION_DISPLAY
*DefaultOption: Option1
*Option: Option1
{
*Name: "216 x 216 " =DOTS_PER_INCH
*DPI: PAIR(216, 216)
*TextDPI: PAIR(216, 216)
*SpotDiameter: 100

*% The driver always sends data blocks of size 4080 for some
reason,
*% so the the rest needs to be padded in to fit
*Command: CmdEndBlockData {
*Cmd: "<FF><FF><FF><FF><FF><FF><FF><FF><FF><FF><FF><FF><FF><F
..... string truncated....
F><FF><FF><FF><FF><FF><FF><FF><FF><FF><FF>"
}

}
}

*% 1728 pixels wide and however much long it takes
*% to make the right proportion
*Feature: PaperSize
{
*rcNameID: =PAPER_SIZE_DISPLAY
*DefaultOption: LETTER
*Option: LETTER
{
*rcNameID: =RCID_DMPAPER_SYSTEM_NAME
*PrintableArea: PAIR(1728, 2376)
*PrintableOrigin: PAIR(0, 0)
}
}

*% 8-bit colour mode
*Feature: ColorMode
{
*rcNameID: =COLOR_PRINTING_MODE_DISPLAY
*DefaultOption: 32Levels

*% The following options are colour depth modes which
*% can be selected by the User in Printer Properties->
*% Printing Preferences-> Paper/Quality-> Advanced...->
*% Color Printing Mode.
*Option: 32Levels
{
*Name: "32 Levels"
*Color?: TRUE
*DevNumOfPlanes: 1
*DevBPP: 8
*DrvBPP: 8
*PaletteSize: 256
*PaletteProgrammable? : TRUE
*Command: CmdSendBlockData {
*Cmd: "<CD><AB><20><00>"}
*Command: CmdSelect
{
*Order: DOC_SETUP.16
*Cmd:""
}
}

}

*Feature: Orientation
{
*rcNameID: =ORIENTATION_DISPLAY
*DefaultOption: PORTRAIT
*Option: PORTRAIT
{
*rcNameID: =PORTRAIT_DISPLAY
*Command: CmdSelect
{
*Order: DOC_SETUP.60
*Cmd: =ORIENT_PORTRAIT_CMD
}
}
*Option: LANDSCAPE_CC270
{
*rcNameID: =LANDSCAPE_DISPLAY
*Command: CmdSelect
{
*Order: DOC_SETUP.60
*Cmd: =ORIENT_PORTRAIT_CMD
}
}
}

*% General Attributes
*% Unidrv needs these defined to operate correctly
*RotateCoordinate?: FALSE
*RotateRaster?: FALSE
*RotateFont?: FALSE

*XMoveThreshold: 0
*YMoveThreshold: 0
*XMoveUnit: 8
*YMoveUnit: 8
*Command: CmdCR { *Cmd : ""
}

*Command: CmdLF { *Cmd : "<0A>" }
*Command: CmdFF { *Cmd : "<0C>" }
*Command: CmdDefinePaletteEntry {*Cmd: ""}
*Command: CmdSelectPaletteEntry {*Cmd: ""}
*Command: CmdBackSpace { *Cmd : "<08>" }


.



Relevant Pages

  • Re: Work Menu - Word:mac 2008
    ... Word developers know it's a BAD feature on whatever platform ... Certainly not because they're saying 'Well if you'd only ... individual items from the list... ... command, but there are a few points to consider here: ...
    (microsoft.public.mac.office.word)
  • Re: Terminal Emulator Security Issues
    ... > Would stripping escape sequences from the window title work? ... any such sequences in the title/icon name in 0.9.2 anyway...but I ... Since the UNIX command line is indistinguishable ... like me who would always rather do a feature right than not do it at ...
    (Bugtraq)
  • [Full-Disclosure] Re: Terminal Emulator Security Issues
    ... > Would stripping escape sequences from the window title work? ... any such sequences in the title/icon name in 0.9.2 anyway...but I ... Since the UNIX command line is indistinguishable ... like me who would always rather do a feature right than not do it at ...
    (Full-Disclosure)
  • Re: [RFC] ethtool semantics
    ... I find the c) feature very convenient. ... the configuration of the switch, something which is usually (pick your ... Command line parameters of the bcm5700 driver do implement c) (among ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)
  • Re: [LogoForum] The FILL Command
    ... Subject: The FILL Command ... setpos first:p seth last:p op:c end ... between this number and the enclosed area is not simple! ... When the FILL command is called to fill in an enclosed space, does it return a value representing the number of pixels that were filled? ...
    (comp.lang.logo)