Printing positive from 2000 but negative from XP
- From: Florin <Florin@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 23 May 2006 10:22:02 -0700
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>" }
.
- Prev by Date: Re: <memory access error> debugging a 64bit target from a 32 bit host
- Next by Date: GDI clean up problem
- Previous by thread: Re: Stoping drivers in XP 64 bit using ControlService Api
- Next by thread: GDI clean up problem
- Index(es):
Relevant Pages
|
|