LEADTOOLS Support
Document
Document SDK Questions
Color printing to a postscript driver doesn't work
This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Monday, June 20, 2005 2:38:08 AM(UTC)
Groups: Registered
Posts: 2
I was trying to print to a postscript color printer. Creating a device context and painting a bitmap generates a black and white output.
Investigating the Device Caps I see Differences:
BITSPERPIXEL: Postscript-Driver: 1, Other: 24
NUMCOLORS: Postscript-Driver: 8, Other: 16384
=> L_PaintDC dithers the output to black and white.
Is there a way to paint a bitmap in color to a device context with BITSPERPIXEL = 1? How is it possible to print to a postscript driver in color?
With Microsoft Word I can print a color bitmap.
From the Adobe Forum I get the answer that they know the problem, but they (or Microsoft) will not change the postscript drivers.
#2
Posted
:
Tuesday, June 21, 2005 3:08:18 AM(UTC)
Groups: Registered, Tech Support
Posts: 20
Article 58LHQ in the FAQ section of our support site explains this.
I'm copying it here:
Why does my color Post Script printer only print black and white when I print a color image with LEADTOOLS?
Most PostScript printer drivers return a value of 1 for BITSPIXEL and 1 for PLANES in calls to the Windows function GetDeviceCaps for the DC. One can calculate device bits per pixel as BITSPIXEL * PLANES and the result should be 1 for an EPS printer. This results in 1-bit printing, as our paint function will try to pre-process the image to match the driver.
The workaround is to call the L_SetDisplayMode (DLL) function and turn off the Dither Paint and Index paint for a color EPS printer. You should reset the display mode after painting to the printer DC in order for LEAD to properly paint images to your display DC.
Example:
L_UINT32 uiOldFlags;
//Before printing
uiOldFlags = L_SetDisplayMode(DISPLAYMODE_INDEXEDPAINT | DISPLAYMODE_DITHEREDPAINT, 0);
//Do your printing
L_SetDisplayMode(DISPLAYMODE_RESETPOSITIONS, uiOldFlags);
Amin Dodin
LEADTOOLS Technical Support
#3
Posted
:
Tuesday, June 21, 2005 4:14:31 AM(UTC)
Groups: Registered
Posts: 2
LEADTOOLS Support
Document
Document SDK Questions
Color printing to a postscript driver doesn't work
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.