Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Monday, June 20, 2005 2:38:08 AM(UTC)
michael.baenziger

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.

 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Tuesday, June 21, 2005 3:08:18 AM(UTC)

support  
support

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)
michael.baenziger

Groups: Registered
Posts: 2


Thanks a lot. It works.

 
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.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.098 seconds.