Re: Printer Driver Question

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hi,
I am also facing the same problem.

Assuming you are doing this BMP-capture in ImageProcessing(), what value are
you returning and to what are you setting ppbResult?
Yes, i am using ImageProcessing but i am not setting any values for
ppbResult. I only need the bitmap so what i do is create a bitmap file in the
Windows temp directory from pSrcBitmap. Later on in the Destruction of
IOemUni (IOemUni::~IOemUni()) class i check to see if there are any bitmap
files created. If so i popup a dialog for the user to preview the bitmaps and
then can convert that bitmap to a TIFF.
Everything works fine till this for resolution 150, but when i add options
for another resolution i get the bitmap cut, i.e i only get some part of the
whole page. I think that this is the problem with my GPD file. If you can
help me this is the GPD file that i am using

----------
*GPDSpecVersion: "1.0"
*Include: "StdNames.gpd"
*ModelName: "ABS Printer Driver"
*MasterUnits: PAIR(1200, 1200)
*ResourceDLL: "unires.dll"
*PrinterType: PAGE
*MaxCopies: 1

*PrintRate: 8
*PrintRateUnit: PPM
*PrintRatePPM: 8

*Feature: Orientation
{
*rcNameID: =ORIENTATION_DISPLAY
*DefaultOption: PORTRAIT
*Option: PORTRAIT
{
*rcNameID: =PORTRAIT_DISPLAY
*Command: CmdSelect
{
*Order: DOC_SETUP.6
*Cmd: ""
}
}
*Option: LANDSCAPE_CC90
{
*rcNameID: =LANDSCAPE_DISPLAY
*Command: CmdSelect
{
*Order: DOC_SETUP.6
*Cmd: ""
}
}
}
*Feature: InputBin
{
*rcNameID: =PAPER_SOURCE_DISPLAY
*DefaultOption: UPPER
*Option: UPPER
{
*rcNameID: =UPPER_TRAY_DISPLAY
*Command: CmdSelect
{
*Order: DOC_SETUP.9
*Cmd: ""
}
}
}
*Feature: Resolution
{
*rcNameID: =RESOLUTION_DISPLAY
*DefaultOption: Option2
*Option: Option2
{
*Name: "150 x 150 " =DOTS_PER_INCH
*DPI: PAIR(150, 150)
*TextDPI: PAIR(300, 300)
*SpotDiameter: 100
*Command: CmdBeginRaster { *Cmd : "" }
*Command: CmdEndRaster { *Cmd : "" }
*Command: CmdSendBlockData { *Cmd : "" }
*Command: CmdSelect
{
*Order: DOC_SETUP.4
*Cmd: ""
}
}
*Option: Option3
{
*Name: "300 x 300 " =DOTS_PER_INCH
*DPI: PAIR(300, 300)
*TextDPI: PAIR(600, 600)
*SpotDiameter: 100
*Command: CmdBeginRaster { *Cmd : "" }
*Command: CmdEndRaster { *Cmd : "" }
*Command: CmdSendBlockData { *Cmd : "" }
*Command: CmdSelect
{
*Order: DOC_SETUP.4
*Cmd: ""
}
}

}

*Feature: PaperSize
{
*rcNameID: =PAPER_SIZE_DISPLAY
*DefaultOption: LETTER
*Option: LETTER
{
*rcNameID: =RCID_DMPAPER_SYSTEM_NAME
*switch: Orientation
{
*case: PORTRAIT
{
*%(9600, 12648)
*% *PrintableArea: PAIR(9600, 12648)
*PrintableArea: PAIR(9564, 12600)
*% *PrintableArea: PAIR(5000,5000)
*PrintableOrigin: PAIR(300, 300)
*% *PrintableOrigin: PAIR(300, 500)
*CursorOrigin: PAIR(300, 180)
*switch: Resolution
{
*case: Option2
{
*% Warning: the following printable width is adjusted (9600->9592) so it is
divisible by the resolution X scale.
*% Warning: the following printable length is adjusted (12648->12640) so it
is divisible by the resolution Y scale.
*PrintableArea: PAIR(9592, 12640)
*% Warning: the following printable origin X is adjusted (300->304) so it is
divisible by the resolution X scale.
*% Warning: the following printable origin Y is adjusted (300->304) so it is
divisible by the resolution Y scale.
*PrintableOrigin: PAIR(304, 304)
}
*case: Option3
{
*PrintableArea: PAIR(9592, 12640)
*PrintableOrigin: PAIR(100, 604)
}
}
*Command: CmdSelect
{
*%5760 -- 7560
*Order: DOC_SETUP.10
*Cmd: ""
}
}
*case: LANDSCAPE_CC90
{
*%(9720, 12648)
*PrintableArea: PAIR(9760, 12688)
*PrintableOrigin: PAIR(200, 272)
*CursorOrigin: PAIR(200, 12960)
*Command: CmdSelect
{
*Order: DOC_SETUP.10
*Cmd: ""
}
}
}
}
*Option: LEGAL
{
*rcNameID: =RCID_DMPAPER_SYSTEM_NAME
*switch: Orientation
{
*case: PORTRAIT
{
*PrintableArea: PAIR(9540, 16248)
*PrintableOrigin: PAIR(300, 300)
*switch: Resolution
{
*case: Option2
{
*% Warning: the following printable width is adjusted (9600->9592) so it is
divisible by the resolution X scale.
*% Warning: the following printable length is adjusted (16248->16240) so it
is divisible by the resolution Y scale.
*PrintableArea: PAIR(9592, 16240)
*% Warning: the following printable origin X is adjusted (300->304) so it is
divisible by the resolution X scale.
*% Warning: the following printable origin Y is adjusted (300->304) so it is
divisible by the resolution Y scale.
*PrintableOrigin: PAIR(304, 304)
}
}
*CursorOrigin: PAIR(300, 180)
*Command: CmdSelect
{
*Order: DOC_SETUP.10
*Cmd: ""
}
}
*case: LANDSCAPE_CC90
{
*PrintableArea: PAIR(9760, 16288)
*PrintableOrigin: PAIR(200, 272)
*CursorOrigin: PAIR(200, 16560)
*Command: CmdSelect
{
*Order: DOC_SETUP.10
*Cmd: ""
}
}
}
}
*Option: EXECUTIVE
{
*rcNameID: =RCID_DMPAPER_SYSTEM_NAME
*switch: Orientation
{
*case: PORTRAIT
{
*PrintableArea: PAIR(8100, 12000)
*PrintableOrigin: PAIR(300, 300)
*switch: Resolution
{
*case: Option2
{
*% Warning: the following printable width is adjusted (8100->8096) so it is
divisible by the resolution X scale.
*% Warning: the following printable length is adjusted (12000->11992) so it
is divisible by the resolution Y scale.
*PrintableArea: PAIR(8096, 11992)
*% Warning: the following printable origin X is adjusted (300->304) so it is
divisible by the resolution X scale.
*% Warning: the following printable origin Y is adjusted (300->304) so it is
divisible by the resolution Y scale.
*PrintableOrigin: PAIR(304, 304)
}
}
*CursorOrigin: PAIR(300, 180)
*Command: CmdSelect
{
*Order: DOC_SETUP.10
*Cmd: ""
}
}
*case: LANDSCAPE_CC90
{
*PrintableArea: PAIR(8200, 12080)
*PrintableOrigin: PAIR(240, 280)
*CursorOrigin: PAIR(200, 12360)
*Command: CmdSelect
{
*Order: DOC_SETUP.10
*Cmd: ""
}
}
}
}
*Option: A4
{
*rcNameID: =RCID_DMPAPER_SYSTEM_NAME
*switch: Orientation
{
*case: PORTRAIT
{
*PrintableArea: PAIR(9324, 13476)
*PrintableOrigin: PAIR(300, 300)
*switch: Resolution
{
*case: Option2
{
*% Warning: the following printable width is adjusted (9324->9320) so it is
divisible by the resolution X scale.
*% Warning: the following printable length is adjusted (13476->13472) so it
is divisible by the resolution Y scale.
*PrintableArea: PAIR(9320, 13472)
*% Warning: the following printable origin X is adjusted (300->304) so it is
divisible by the resolution X scale.
*% Warning: the following printable origin Y is adjusted (300->304) so it is
divisible by the resolution Y scale.
*PrintableOrigin: PAIR(304, 304)
}
}
*CursorOrigin: PAIR(300, 180)
*Command: CmdSelect
{
*Order: DOC_SETUP.10
*Cmd: ""
}
}
*case: LANDSCAPE_CC90
{
*PrintableArea: PAIR(9464, 13516)
*PrintableOrigin: PAIR(220, 272)
*switch: Resolution
{
*case: Option2
{
*% Warning: the following printable width is adjusted (9464->9456) so it is
divisible by the resolution X scale.
*% Warning: the following printable length is adjusted (13516->13512) so it
is divisible by the resolution Y scale.
*PrintableArea: PAIR(9456, 13512)
*% Warning: the following printable origin X is adjusted (220->224) so it is
divisible by the resolution X scale.
*PrintableOrigin: PAIR(224, 272)
}
}
*CursorOrigin: PAIR(200, 13788)
*Command: CmdSelect
{
*Order: DOC_SETUP.10
*Cmd: ""
}
}
}
}
*Option: A3
{
*rcNameID: =RCID_DMPAPER_SYSTEM_NAME
*switch: Orientation
{
*case: PORTRAIT
{
*PrintableArea: PAIR(13428, 19308)
*PrintableOrigin: PAIR(300, 300)
*switch: Resolution
{
*case: Option2
{
*% Warning: the following printable width is adjusted (13428->13424) so it
is divisible by the resolution X scale.
*% Warning: the following printable length is adjusted (19308->19304) so it
is divisible by the resolution Y scale.
*PrintableArea: PAIR(13424, 19304)
*% Warning: the following printable origin X is adjusted (300->304) so it is
divisible by the resolution X scale.
*% Warning: the following printable origin Y is adjusted (300->304) so it is
divisible by the resolution Y scale.
*PrintableOrigin: PAIR(304, 304)
}
}
*CursorOrigin: PAIR(300, 180)
*Command: CmdSelect
{
*Order: DOC_SETUP.10
*Cmd: ""
}
}
*case: LANDSCAPE_CC90
{
*PrintableArea: PAIR(13588, 19368)
*PrintableOrigin: PAIR(200, 240)
*switch: Resolution
{
*case: Option2
{
*% Warning: the following printable width is adjusted (13588->13584) so it
is divisible by the resolution X scale.
*PrintableArea: PAIR(13584, 19368)
}
}
*CursorOrigin: PAIR(200, 19608)
*Command: CmdSelect
{
*Order: DOC_SETUP.10
*Cmd: ""
}
}
}
}
*Option: TABLOID
{
*rcNameID: =RCID_DMPAPER_SYSTEM_NAME
*switch: Orientation
{
*case: PORTRAIT
{
*% *PrintableArea: PAIR(12600, 19800)
*PrintableArea: PAIR(12540, 19740)
*PrintableOrigin: PAIR(300, 300)
*switch: Resolution
{
*case: Option2
{
*% Warning: the following printable width is adjusted (12600->12592) so it
is divisible by the resolution X scale.
*% Warning: the following printable length is adjusted (19800->19792) so it
is divisible by the resolution Y scale.
*PrintableArea: PAIR(12592, 19792)
*% Warning: the following printable origin X is adjusted (300->304) so it is
divisible by the resolution X scale.
*% Warning: the following printable origin Y is adjusted (300->304) so it is
divisible by the resolution Y scale.
*PrintableOrigin: PAIR(304, 304)
}
}
*CursorOrigin: PAIR(300, 200)
*Command: CmdSelect
{
*Order: DOC_SETUP.10
*Cmd: ""
}
}
*case: LANDSCAPE_CC90
{
*PrintableArea: PAIR(12600, 19800)
*PrintableOrigin: PAIR(300, 300)
*switch: Resolution
{
*case: Option2
{
*% Warning: the following printable width is adjusted (12600->12592) so it
is divisible by the resolution X scale.
*% Warning: the following printable length is adjusted (19800->19792) so it
is divisible by the resolution Y scale.
*PrintableArea: PAIR(12592, 19792)
*% Warning: the following printable origin X is adjusted (300->304) so it is
divisible by the resolution X scale.
*% Warning: the following printable origin Y is adjusted (300->304) so it is
divisible by the resolution Y scale.
*PrintableOrigin: PAIR(304, 304)
}
}
*CursorOrigin: PAIR(200, 20100)
*Command: CmdSelect
{
*Order: DOC_SETUP.10
*Cmd: ""
}
}
}
}
}
*Feature: MediaType
{
*rcNameID: =MEDIA_TYPE_DISPLAY
*DefaultOption: STANDARD
*Option: STANDARD
{
*rcNameID: =PLAIN_PAPER_DISPLAY
*DefaultQuality: BETTERQUALITY
*Command: CmdSelect
{
*Order: DOC_SETUP.14
*Cmd: ""
}
}
*Option: TRANSPARENCY
{
*rcNameID: =TRANSPARENCY_DISPLAY
*DefaultQuality: BETTERQUALITY
*Command: CmdSelect
{
*Order: DOC_SETUP.14
*Cmd: ""
}
}
}
*Feature: ColorMode
{
*rcNameID: =COLOR_PRINTING_MODE_DISPLAY
*HelpIndex: 12004
*DefaultOption: 24bpp
*Option: 24bpp
{
*rcNameID: =24BPP_DISPLAY

*DevNumOfPlanes: 1
*DevBPP: 24
*DrvBPP: 24
*IPCallbackID: 7
*PaletteSize: 256
*PaletteProgrammable?:TRUE
*Command: CmdDefinePaletteEntry { *Cmd : "" }
*Command: CmdSelectPaletteEntry { *Cmd : ""}
*RasterMode: DIRECT

EXTERN_GLOBAL: *RasterSendAllData? : TRUE
}
}
*Feature: Halftone
{
*rcNameID: =HALFTONING_DISPLAY
*HelpIndex: 12005
*DefaultOption: HT_PATSIZE_AUTO
*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: CmdStartDoc
{
*Order: DOC_SETUP.5
*Cmd: ""
}
*Command: CmdStartPage
{
*Order: PAGE_SETUP.1
*Cmd: ""
}
*Command: CmdEndJob
{
*Order: JOB_FINISH.1
*Cmd: ""
}
*Command: CmdCopies
{
*Order: DOC_SETUP.11
*Cmd : ""
}
*RotateCoordinate?: TRUE
*RotateRaster?: TRUE
*RotateFont?: TRUE
*TextCaps: LIST(TC_CR_90,TC_UA_ABLE)
*MemoryUsage: LIST(FONT)
*CursorXAfterCR: AT_PRINTABLE_X_ORIGIN
*BadCursorMoveInGrxMode: LIST(X_PORTRAIT,Y_LANDSCAPE)
*XMoveThreshold: 0
*YMoveThreshold: 0
*XMoveUnit: 300
*YMoveUnit: 300
*Command: CmdXMoveAbsolute { *Cmd : "" }
*Command: CmdXMoveRelRight { *Cmd : "" }
*Command: CmdXMoveRelLeft { *Cmd : "" }
*Command: CmdYMoveAbsolute { *Cmd : "" }
*Command: CmdYMoveRelDown { *Cmd : "" }
*Command: CmdYMoveRelUp { *Cmd : "" }
*Command: CmdCR { *Cmd : "" }
*Command: CmdLF { *Cmd : "" }
*Command: CmdFF { *Cmd : "" }
*Command: CmdDefinePaletteEntry { *Cmd : "" }
*Command: CmdSelectPaletteEntry { *Cmd : "" }
*Command: CmdBackSpace { *Cmd : "" }
*Command: CmdUniDirectionOn { *Cmd : "" }
*Command: CmdUniDirectionOff { *Cmd : "" }
*Command: CmdPushCursor { *Cmd : "" }
*Command: CmdPopCursor { *Cmd : "" }
*Command: CmdSetSimpleRotation { *Cmd : "" }
*EjectPageWithFF?: TRUE
*OutputDataFormat: H_BYTE
*OptimizeLeftBound?: FALSE
*CursorXAfterSendBlockData: AT_GRXDATA_ORIGIN
*CursorYAfterSendBlockData: AUTO_INCREMENT

*DefaultFont: 136
*DefaultCTT: 0
*CharPosition: BASELINE
*TTFSEnabled?: TRUE
*DeviceFonts:
LIST(134,135,136,137,138,139,140,146,147,148,149,150,151,152,153,154,
+ 155,156,157,164,165,166,196,197,198,199,200,201,202,203,209,210,
+ 211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,
+ 227,228,229,230)

*MinFontID: 16534
*MaxFontID: 32768
*FontFormat: HPPCL_OUTLINE
*% When the %f format is implemented we can remove the /100 part of
*% CmdSelectFontHeight and CmdSelectFontWidth
*% NOTE: MasterUnits.x is hardcoded here!
*% NOTE: THIS dividing by 200 because I want to /100 and then /2 for now.
*% The number 60000 may look strange, but it's 1200/2 * 100.
*Command: CmdSelectFontHeight { *Cmd : "" }
*Command: CmdSelectFontWidth { *Cmd : "" }
*Command: CmdSetFontID { *Cmd : "" }
*Command: CmdSelectFontID { *Cmd : "" }
*Command: CmdSetCharCode { *Cmd : "" }
*Command: CmdUnderlineOn { *Cmd : "" }
*Command: CmdUnderlineOff { *Cmd : "" }
*Command: CmdWhiteTextOn { *Cmd : "" }
*Command: CmdWhiteTextOff { *Cmd : "" }
*MinGrayFill: 1
*MaxGrayFill: 100
*Command: CmdSetRectWidth { *Cmd : "" }
*Command: CmdSetRectHeight { *Cmd : "" }
*Command: CmdRectGrayFill { *Cmd : "" }
*Command: CmdRectWhiteFill { *Cmd : "" }
*Command: CmdRectBlackFill { *Cmd : "" }

Can you also tell me how this different numbers ie, in the PAIR for
PrintableArea and PrintableOrigin is related to the different resolution and
the MasterUnits.

Thanks in advance,
Jobby


"Bart" wrote:

Assuming you are doing this BMP-capture in ImageProcessing(), what value are
you returning and to what are you setting ppbResult?

"Nitin" <nitinp@xxxxxxxxxxxxxxxxx> wrote in message
news:erj33Tg$EHA.4004@xxxxxxxxxxxxxxxxxxxxxxx
Hi,
I am also trying to develop a bitmap printer driver. I am getting only a
part of the image and the size of the image is also too big. I think, I am
doing some mistake in GPD file. Can you please send me the GPD file that
you
are using.

Thanks,
Nitin

"Vijji" <vijji_kama@xxxxxxxxxxxxxx> wrote in message
news:1105870689.669207.115800@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hello All,

I am developing a bitmap driver based on universal mini printer driver.
I used the sample GPD and OEMUNI rendering plug-in in DDK. I get a full
image when I use the resolution to be 150 DPI and only a half image
when I use 300 DPI.

Is there any additional setting or options to be included in my GPD to
get complete image at 300 DPI?
Any help in this regard??

Thanks in Advance.

Regards,
Vijji






.



Relevant Pages

  • Printer Driver(OEMUNI): Black Output
    ... *Command: CmdSelect ... *Feature: Resolution ... so itis divisible by the resolution Y scale. ...
    (microsoft.public.development.device.drivers)
  • unidrv resolution issue (Please help)
    ... print in an higher resolution like 300X300. ... *Feature: Orientation ... *Command: CmdSelect ...
    (microsoft.public.development.device.drivers)
  • Re: Printer Driver Question
    ... I only need the bitmap so what i do is create a bitmap file in the ... Everything works fine till this for resolution 150, ... *Feature: Orientation ... is divisible by the resolution Y scale. ...
    (microsoft.public.development.device.drivers)
  • Re: Simplifying thinking of scale/chord relationships over ii V I progressions
    ... F major scale throughout the entire a section. ... resolving it, usually. ... on this chord and does not need any resolution. ...
    (rec.music.makers.guitar.jazz)
  • Printer Driver(OEMUNI): Black Output
    ... *Feature: Orientation ... it isdivisible by the resolution X scale. ... so itis divisible by the resolution Y scale. ... *Command: CmdStartPage ...
    (microsoft.public.development.device.drivers)