Click to See Complete Forum and Search --> : DrawText fails on some DeskJets


Robert Starr
March 31st, 1999, 08:08 PM
I output some text using DrawText (in order to use the WORDBREAK feature).

I am using Arial Font, created with a CreateFontIndirect call.


The application prints correctly on HP laser jet printers and on the DeskJet

1600, but fails (prints blank) for some low-end desk jets (the 695 and 870).

I am using the latest drivers.


If I output the same text (and same font) with TextOut instead of DrawText

it prints correctly no matter what printer I use. (The test case is a short

string so it fits on one line; TextOut works but DrawText is blank.)


Does anyone have any idea why the DrawText fails on some DeskJets?

Robert Starr
March 31st, 1999, 09:08 PM
I found a related symptom. Here is another case where the low-end Desk Jets

fail but the laser printers work:


If I use CDC::Rectange to draw a gray background and then print text over that

background the text will not show. This occurs even if the "gray" is completely

white, i.e. RGB(255,255,255). The DrawText documentation says it uses the DC's

current background color when printing, whereas TextOut apparently uses no

background color.


So the "bad" printers seem unable to print when a background color is involved

even if the background color is set to white: RGB(255,255,255).


Any insight on how to deal with this problem will be helpful. Thanks.

Jay
April 1st, 1999, 03:24 AM
I 've got similar problems with tilted text !


On print preview, and all other printers it works correctly.

I print rotated text by a specified angle (e.g. clockwise 40 degree).

only on that damned Hp Desk Jets the text is tilted counterclockwise

so that i had to write a crude "workaround" that asks the user if

he uses a Deskjet printer...


seems to be the printer driver ...

Any suggestions ?


Greets

Jay