Tech Support > Microsoft Windows > Drivers > Problem printing at lower dpi
Problem printing at lower dpi
Posted by hierro on June 8th, 2005


Hi,
My virtual printer driver (to png image) has problems printing at lower
dpi of say 100 or 200 dpi. There are mainly 2 problems:

1. When printing some documents like Google's home page in color and
100 dpi, there's a blank patch (bitmap data is null) between the last
line of word and the page footer.

2. When printing powerpoint slides in color at 100 or 200 dpi, it says
that it is unable to print due to a problem with the printer setup. No
problems with 300 dpi though.

I'm not sure where the problem is, but it's definitely at the driver
side and not at the image conversion side. Below is my gpd file. Hope
someone can enlighten me. Thanks!


*%
*% Copyright (c) 1997 - 1999 Microsoft Corporation
*% All Rights Reserved.
*%
*GPDSpecVersion: "1.0"
*GPDFileName: "VPDIP.GPD"
*GPDFileVersion: "1.0"
*Include: "StdNames.gpd"
*ModelName: "My Image Printer"
*MasterUnits: PAIR(1200, 1200)
*ResourceDLL: "svrres.dll"
*PrintRate: 2
*PrintRatePPM: 2
*PrintRateUnit: PPM
*PrinterType: PAGE
*rcInstalledOptionNameID: 443 *% Installed
*rcNotInstalledOptionNameID: 444 *% Not Installed
*MaxCopies: 99
*OutputOrderReversed?: FALSE


*Feature: Orientation
{
*rcNameID: =ORIENTATION_DISPLAY
*DefaultOption: PORTRAIT
*Option: PORTRAIT
{
*rcNameID: =PORTRAIT_DISPLAY
*Command: CmdSelect
{
*Order: DOC_SETUP.6
*Cmd: "<1B>&l0O"
}
}
*Option: LANDSCAPE_CC90
{
*rcNameID: =LANDSCAPE_DISPLAY
*Command: CmdSelect
{
*Order: DOC_SETUP.6
*Cmd: "<1B>&l1O"
}
}
}
*Feature: InputBin
{
*rcNameID: =PAPER_SOURCE_DISPLAY
*DefaultOption: MANUAL
*Option: MANUAL
{
*rcNameID: =MANUAL_FEED_DISPLAY
*Command: CmdSelect
{
*Order: DOC_SETUP.9
*Cmd: "<1B>&l2H"
}
}
}
*Feature: PaperSize
{
*rcNameID: =PAPER_SIZE_DISPLAY
*DefaultOption: LETTER
*Option: LETTER
{
*rcNameID: =RCID_DMPAPER_SYSTEM_NAME
*PageProtectMem: 4109
*switch: Orientation
{
*case: PORTRAIT
{
*PrintableArea: PAIR(9592, 12648)
*PrintableOrigin: PAIR(300, 300)
*CursorOrigin: PAIR(300, 180)
*Command: CmdSelect
{
*Order: DOC_SETUP.10
*Cmd: "<1B>&l2a8c1E<1B>*p0x0Y<1B>*c0t5760x7704Y"
}
}
*case: LANDSCAPE_CC90
{
*switch: Resolution
{
*case: Option1
{
*PrintableArea: PAIR(9754, 12710)
*PrintableOrigin: PAIR(200, 250)
}
*case: Option2
{
*PrintableArea: PAIR(9752, 12708)
*PrintableOrigin: PAIR(200, 252)
}
}
*CursorOrigin: PAIR(200, 12960)
*Command: CmdSelect
{
*Order: DOC_SETUP.10
*Cmd: "<1B>&l2a8c1E<1B>*p0x0Y<1B>*c0t7632x5880Y"
}
}
}
}
*Option: LEGAL
{
*rcNameID: =RCID_DMPAPER_SYSTEM_NAME
*PageProtectMem: 5230
*switch: Orientation
{
*case: PORTRAIT
{
*PrintableArea: PAIR(9592, 16248)
*PrintableOrigin: PAIR(300, 300)
*CursorOrigin: PAIR(300, 180)
*Command: CmdSelect
{
*Order: DOC_SETUP.10
*Cmd: "<1B>&l3a8c1E<1B>*p0x0Y<1B>*c0t5760x9864Y"
}
}
*case: LANDSCAPE_CC90
{
*switch: Resolution
{
*case: Option1
{
*PrintableArea: PAIR(9754, 16310)
*PrintableOrigin: PAIR(200, 250)
}
*case: Option2
{
*PrintableArea: PAIR(9752, 16308)
*PrintableOrigin: PAIR(200, 252)
}
}
*CursorOrigin: PAIR(200, 16560)
*Command: CmdSelect
{
*Order: DOC_SETUP.10
*Cmd: "<1B>&l3a8c1E<1B>*p0x0Y<1B>*c0t9792x5880Y"
}
}
}
}
*Option: A3
{
*rcNameID: =RCID_DMPAPER_SYSTEM_NAME
*switch: Orientation
{
*case: PORTRAIT
{
*PrintableArea: PAIR(13428, 19308)
*PrintableOrigin: PAIR(300, 300)
*switch: Resolution
{
*case: Option2
{
*PrintableArea: PAIR(13424, 19304)
*PrintableOrigin: PAIR(304, 304)
}
}
*CursorOrigin: PAIR(300, 180)
*Command: CmdSelect
{
*Order: DOC_SETUP.10
*Cmd: "<1B>&l27a8c1E<1B>*p0x0Y<1B>*c0t8057x11693Y"
}
}
*case: LANDSCAPE_CC90
{
*PrintableArea: PAIR(13588, 19368)
*PrintableOrigin: PAIR(200, 240)
*switch: Resolution
{
*case: Option2
{
*PrintableArea: PAIR(13584, 19368)
}
}
*CursorOrigin: PAIR(200, 19608)
*Command: CmdSelect
{
*Order: DOC_SETUP.10
*Cmd: "<1B>&l27a8c1E<1B>*p0x0Y<1B>*c0t11621x8177Y"
}
}
}
}

*Option: A4
{
*rcNameID: =RCID_DMPAPER_SYSTEM_NAME
*PageProtectMem: 4249
*switch: Orientation
{
*case: PORTRAIT
{
*PrintableArea: PAIR(9274, 12778)
*PrintableOrigin: PAIR(300, 600)
*switch: Resolution
{
*case: Option2
{
*PrintableArea: PAIR(9272, 12776)
}
}
*CursorOrigin: PAIR(300, 180)
*Command: CmdSelect
{
*Order: DOC_SETUP.10
*Cmd: "<1B>&l26a8c1E<1B>*p0x0Y<1B>*c0t5594x8201Y"
}
}
*case: LANDSCAPE_CC90
{
*PrintableArea: PAIR(9444, 12728)
*PrintableOrigin: PAIR(230, 650)
*switch: Resolution
{
*case: Option2
{
*PrintableArea: PAIR(9440, 12724)
*PrintableOrigin: PAIR(232, 652)
}
}
*CursorOrigin: PAIR(200, 13788)
*Command: CmdSelect
{
*Order: DOC_SETUP.10
*Cmd:
"<1B>&l26a8c1e-500Z<1B>*p0x0Y<1B>*c0t8129x5714Y"
}
}
}
}
*Option: ENV_10
{
*rcNameID: =RCID_DMPAPER_SYSTEM_NAME
*PageProtectMem: 4109
*switch: Orientation
{
*case: PORTRAIT
{
*PrintableArea: PAIR(4356, 10200)
*PrintableOrigin: PAIR(300, 300)
*CursorOrigin: PAIR(300, 160)
*Command: CmdSelect
{
*Order: DOC_SETUP.10
*Cmd:
"<1B>&l81a8c1e230Z<1B>*p0x0Y<1B>*c0t2614x6648Y "
}
}
*case: LANDSCAPE_CC90
{
*PrintableArea: PAIR(4356, 10200)
*PrintableOrigin: PAIR(300, 300)
*CursorOrigin: PAIR(200, 11100)
*Command: CmdSelect
{
*Order: DOC_SETUP.10
*Cmd:
"<1B>&l81a8c1e-220Z<1B>*p0x0Y<1B>*c0t6480x2734Y"
}
}
}
}
*Option: ENV_DL
{
*rcNameID: =RCID_DMPAPER_SYSTEM_NAME
*PageProtectMem: 4109
*switch: Orientation
{
*case: PORTRAIT
{
*PrintableArea: PAIR(4596, 9192)
*PrintableOrigin: PAIR(300, 300)
*CursorOrigin: PAIR(300, 160)
*Command: CmdSelect
{
*Order: DOC_SETUP.10
*Cmd:
"<1B>&l90a8c1e230Z<1B>*p0x0Y<1B>*c0t2758x6043Y "
}
}
*case: LANDSCAPE_CC90
{
*PrintableArea: PAIR(4596, 9192)
*PrintableOrigin: PAIR(300, 300)
*CursorOrigin: PAIR(200, 10092)
*Command: CmdSelect
{
*Order: DOC_SETUP.10
*Cmd:
"<1B>&l90a8c1e-220Z<1B>*p0x0Y<1B>*c0t5875x2878Y"
}
}
}
}
*Option: ENV_C5
{
*rcNameID: =RCID_DMPAPER_SYSTEM_NAME
*PageProtectMem: 4109
*switch: Orientation
{
*case: PORTRAIT
{
*PrintableArea: PAIR(7056, 9624)
*PrintableOrigin: PAIR(300, 300)
*CursorOrigin: PAIR(300, 200)
*Command: CmdSelect
{
*Order: DOC_SETUP.10
*Cmd:
"<1B>&l91a8c1e230Z<1B>*p0x0Y<1B>*c0t4234x6254Y "
}
}
*case: LANDSCAPE_CC90
{
*PrintableArea: PAIR(7056, 9624)
*PrintableOrigin: PAIR(300, 300)
*CursorOrigin: PAIR(200, 10524)
*Command: CmdSelect
{
*Order: DOC_SETUP.10
*Cmd:
"<1B>&l91a8c1e-220Z<1B>*p0x0Y<1B>*c0t6134x4354Y"
}
}
}
}
*Option: TABLOID
{
*rcNameID: =RCID_DMPAPER_SYSTEM_NAME
*switch: Orientation
{
*case: PORTRAIT
{
*PrintableArea: PAIR(12600, 19800)
*PrintableOrigin: PAIR(300, 220)
*switch: Resolution
{
*case: Option2
{
*PrintableArea: PAIR(12592, 19792)
*PrintableOrigin: PAIR(304, 220)
}
}
*CursorOrigin: PAIR(300, 200)
*Command: CmdSelect
{
*Order: DOC_SETUP.10
*Cmd: "<1B>&l6a8c1E<1B>*p0x0Y<1B>*c0t7560x12000Y"
}
}
*case: LANDSCAPE_CC90
{
*PrintableArea: PAIR(12600, 19800)
*PrintableOrigin: PAIR(300, 220)
*switch: Resolution
{
*case: Option2
{
*PrintableArea: PAIR(12592, 19792)
*PrintableOrigin: PAIR(304, 220)
}
}
*CursorOrigin: PAIR(200, 20100)
*Command: CmdSelect
{
*Order: DOC_SETUP.10
*Cmd: "<1B>&l6a8c1E<1B>*p0x0Y<1B>*c0t11880x7680Y"
}
}
}
}
*Option: CUSTOMSIZE
{
*rcNameID: =USER_DEFINED_SIZE_DISPLAY
*MinSize: PAIR(4680, 9000)
*MaxSize: PAIR(14040, 32767)
*MaxPrintableWidth: 14040
*MinLeftMargin: 100
*CenterPrintable?: FALSE
*PageProtectMem: 1692
*switch: Orientation
{
*case: PORTRAIT
{
*Command: CmdSelect
{
*Order: DOC_SETUP.12
*Cmd: "<1B>&l101a4d1e" %d{((PhysPaperWidth - 14040)
/ 20) }"u" %d{(PhysPaperLength / 300) - 1}
+ "F<1B>*p0x0Y<1B>*p0x0Y<1B>*c0t" %d{(((PhysPaperWidth - 598) * 6) /
10) }"x" %d{(((PhysPaperLength - 440) * 6) / 10) }
+ "Y"
}
}
*case: LANDSCAPE_CC90
{
*Command: CmdSelect
{
*Order: DOC_SETUP.12
*Cmd: "<1B>&l101a4d1e" %d{(PhysPaperLength / 300) -
1}"f" %d{((PhysPaperWidth - 14040) / 20) + 10}
+ "u" %d{(((PhysPaperLength - 21240) * 6) / 10) +
10}"Z<1B>*p0x0Y<1B>*c0t" %d{(((PhysPaperLength - 600) * 6) / 10) }
+ "x" %d{(((PhysPaperWidth - 600) * 6) / 10) }"Y"
}
}
}
}

}
*Feature: Resolution
{
*rcNameID: =RESOLUTION_DISPLAY
*DefaultOption: Option4
*Option: Option1
{
*Name: "600 x 600 " =DOTS_PER_INCH
*DPI: PAIR(600, 600)
*TextDPI: PAIR(600, 600)
*MinStripBlankPixels: 32
*SpotDiameter: 100
*Command: CmdBeginRaster { *Cmd : "<1B>*r1A" }
*Command: CmdEndRaster { *Cmd : "<1B>*rB" }
*Command: CmdSelect
{
*Order: DOC_SETUP.4
*Cmd: "@PJL SET RESOLUTION=600<0A>@PJL ENTER
LANGUAGE=PCL<0A0D1B>E<1B>*t600R"
}
}
*Option: Option2
{
*Name: "300 x 300 " =DOTS_PER_INCH
*DPI: PAIR(300, 300)
*TextDPI: PAIR(300, 300)
*MinStripBlankPixels: 32
*SpotDiameter: 140
*Command: CmdBeginRaster { *Cmd : "<1B>*v7S<1B>*r1A" }
*Command: CmdEndRaster { *Cmd : "<1B>*rC" }
*Command: CmdSelect
{
*Order: DOC_SETUP.4
*Cmd: "@PJL SET RESOLUTION=300<0A>@PJL ENTER
LANGUAGE=PCL<0A0D1B>E<1B>*t300R"
}
}
*Option: Option3
{
*Name: "200 x 200 " =DOTS_PER_INCH
*DPI: PAIR(200, 200)
*TextDPI: PAIR(200, 200)
*MinStripBlankPixels: 32
*SpotDiameter: 100
*Command: CmdBeginRaster { *Cmd : "<1B>*v7S<1B>*r1A" }
*Command: CmdEndRaster { *Cmd : "<1B>*rC" }
*Command: CmdSelect
{
*Order: DOC_SETUP.4
*Cmd: "@PJL SET RESOLUTION=200<0A>@PJL ENTER
LANGUAGE=PCL<0A0D1B>E<1B>*t200R"
}
}
*Option: Option4
{
*Name: "100 x 100 " =DOTS_PER_INCH
*DPI: PAIR(100, 100)
*TextDPI: PAIR(100, 100)
*MinStripBlankPixels: 32
*SpotDiameter: 100
*Command: CmdBeginRaster { *Cmd : "<1B>*v7S<1B>*r1A" }
*Command: CmdEndRaster { *Cmd : "<1B>*rC" }
*Command: CmdSelect
{
*Order: DOC_SETUP.4
*Cmd: "@PJL SET RESOLUTION=100<0A>@PJL ENTER
LANGUAGE=PCL<0A0D1B>E<1B>*t100R"
}
}


}
*Feature: ColorMode
{
*rcNameID: =COLOR_PRINTING_MODE_DISPLAY
*DefaultOption: 24bpp
*Option: Mono
{
*rcNameID: =MONO_DISPLAY
*DevNumOfPlanes: 1
*DevBPP: 1
*Color? : FALSE
}


*Option: 24bpp
{
*rcNameID: =24BPP_DISPLAY
*DevNumOfPlanes: 1
*DevBPP: 24
*DrvBPP: 24
*PaletteSize: 256
*PaletteProgrammable? : FALSE
*Command: CmdSetSrcBmpWidth { *Cmd : "<1B>*r"
%d{RasterDataWidthInBytes / 3}"S" }
*Command: CmdSelect
{
*Order: DOC_SETUP.16
*Cmd:
"<1B>*v1N<1B>*v1O<1B>*l184O<1B>*t13J<1B>*v18W<0003 0808080800FF00FF00FF0000000000>"
+ "<001B>*v0a0b0c7i255a255b255c0I"
}
}
}

*Command: CmdStartDoc
{
*Order: DOC_SETUP.5
*Cmd: "<1B>&u600D<1B>*r0F"
}
*Command: CmdStartPage
{
*Order: PAGE_SETUP.1
*Cmd: "<1B>*b0M<0D>"
}
*Command: CmdEndJob
{
*Order: JOB_FINISH.1
*Cmd: "<1B>E<1B>%%-12345X"
}
*RotateCoordinate?: TRUE
*RotateRaster?: TRUE
*RotateFont?: TRUE
*TextCaps: LIST(TC_CR_90,TC_UA_ABLE)
*CursorXAfterCR: AT_PRINTABLE_X_ORIGIN
*BadCursorMoveInGrxMode: LIST(X_PORTRAIT,Y_LANDSCAPE)
*XMoveThreshold: 0
*YMoveThreshold: 0
*XMoveUnit: 600
*YMoveUnit: 600
*Command: CmdXMoveAbsolute { *Cmd : "<1B>*p" %d{(DestX / 2) }"X" }
*Command: CmdXMoveRelRight { *Cmd : "<1B>*p+"
%d[0,9600]{max_repeat((DestXRel / 2) )}"X" }
*Command: CmdXMoveRelLeft { *Cmd : "<1B>*p-"
%d[0,9600]{max_repeat((DestXRel / 2) )}"X" }
*Command: CmdYMoveAbsolute { *Cmd : "<1B>*p" %d{(DestY / 2) }"Y" }
*Command: CmdYMoveRelDown { *Cmd : "<1B>*p+" %d{(DestYRel / 2) }"Y" }
*Command: CmdYMoveRelUp { *Cmd : "<1B>*p-" %d{(DestYRel / 2) }"Y" }
*Command: CmdCR { *Cmd : "<0D>" }
*Command: CmdLF { *Cmd : "<0A>" }
*Command: CmdFF { *Cmd : "<0C>" }
*Command: CmdBackSpace { *Cmd : "<08>" }
*Command: CmdUniDirectionOn { *Cmd : "<00>" }
*Command: CmdUniDirectionOff { *Cmd : "<00>" }
*Command: CmdPushCursor { *Cmd : "<1B>&f0S" }
*Command: CmdPopCursor { *Cmd : "<1B>&f1S" }
*Command: CmdSetSimpleRotation { *Cmd : "<1B>&a"
%d{PrintDirInCCDegrees}"P" }
*EjectPageWithFF?: TRUE
*Command: CmdSelectBlackColor { *Cmd : "<1B>*v7S" }
*Command: CmdSelectRedColor { *Cmd : "<1B>*v6S" }
*Command: CmdSelectGreenColor { *Cmd : "<1B>*v5S" }
*Command: CmdSelectYellowColor { *Cmd : "<1B>*v4S" }
*Command: CmdSelectBlueColor { *Cmd : "<1B>*v3S" }
*Command: CmdSelectMagentaColor { *Cmd : "<1B>*v2S" }
*Command: CmdSelectCyanColor { *Cmd : "<1B>*v1S" }
*Command: CmdSelectWhiteColor { *Cmd : "<1B>*v0S" }
*Command: CmdDefinePaletteEntry { *Cmd : "<1B>*v" %d{RedValue}"a"
%d{GreenValue}"b" %d{BlueValue}"c" %d{PaletteIndexToProgram}
+ "I" }
*Command: CmdSelectPaletteEntry { *Cmd : "<1B>*v"
%d{CurrentPaletteIndex}"S" }
*Command: CmdEnableTIFF4 { *Cmd : "<1B>*b2M" }
*Command: CmdDisableCompression { *Cmd : "<1B>*b0M" }
*Command: CmdEnableDRC { *Cmd : "<1B>*b3M" }
*OutputDataFormat: H_BYTE
*%*OptimizeLeftBound?: TRUE

*%*StripBlanks: LIST(ENCLOSED,TRAILING)
*Command: CmdSendBlockData { *Cmd : "<1B>*b" %d{NumOfDataBytes}"W" }

*CursorXAfterSendBlockData: AT_GRXDATA_ORIGIN
*CursorYAfterSendBlockData: AUTO_INCREMENT
*RasterSendAllData? : TRUE
*DefaultFont: 136
*DefaultCTT: 0
*CharPosition: BASELINE
*TTFSEnabled?: TRUE
*MinFontID: 16534
*MaxFontID: 32768
*FontFormat: HPPCL_OUTLINE
*Command: CmdSetFontID { *Cmd : "<1B>*c" %d{NextFontID}"D" }
*Command: CmdSelectFontID { *Cmd : "<1B>(" %d{CurrentFontID}"X" }
*Command: CmdSetCharCode { *Cmd : "<1B>*c" %d{NextGlyph}"E" }
*Command: CmdUnderlineOn { *Cmd : "<1B>&dD" }
*Command: CmdUnderlineOff { *Cmd : "<1B>&d@" }
*Command: CmdWhiteTextOn { *Cmd : "<1B>*v1o1T" }
*Command: CmdWhiteTextOff { *Cmd : "<1B>*v0o0T" }
*MinGrayFill: 1
*MaxGrayFill: 100
*Command: CmdSetRectWidth { *Cmd : "<1B>*c" %d{(RectXSize / 2) }"A" }
*Command: CmdSetRectHeight { *Cmd : "<1B>*c" %d{(RectYSize / 2) }"B" }
*Command: CmdRectGrayFill { *Cmd : "<1B>*c" %d{GrayPercentage }"g2P" }
*Command: CmdRectWhiteFill { *Cmd : "<1B>*c1P" }
*Command: CmdRectBlackFill { *Cmd : "<1B>*c0P" }

Posted by hierro on June 8th, 2005


I've fixed the first problem by adding the following code in
OEMStartPage:

if (pso->iBitmapFormat==BMF_24BPP)
{
long lW=pso->sizlBitmap.cx*3;
if (lW%4)
lW+=4-(lW%4);

memset(pso->pvBits,0xFF,pso->sizlBitmap.cy * lW);
}

The original code did it for monochrome but not 24bit color, so I'm not
sure if there's any particular reason for not doing so.

But that's that for now. Anyone can help with my second problem?

Posted by hierro on June 8th, 2005


I've also found the cause to the second problem but not the answer. I
need to add to Letter's Landscape settings the PrintableArea and
PrintableOrigin for 100 and 200 dpi. For 200 dpi, I used back the
settings for Option2 and it works. However, the image for 100 dpi is
messed up.

*case: LANDSCAPE_CC90
{
*switch: Resolution
{
*case: Option1
{
*PrintableArea: PAIR(9754, 12710)
*PrintableOrigin: PAIR(200, 250)
}
*case: Option2
{
*PrintableArea: PAIR(9752, 12708)
*PrintableOrigin: PAIR(200, 252)
}
*case: Option3
{
*PrintableArea: PAIR(9752, 12708)
*PrintableOrigin: PAIR(200, 252)
}

What should I set for 100dpi (Option4)?