Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Font color

edited March 2005 in General
Hi,

I had problem for the font color when print to my HP Laser Jet 4 plus. I
set all my label/dbtext font color to like Grayscale color, like
clBtnShadow, even more bright like clBtnFace, but when print out, it still
print in BLACK color. what's going on?

William

Comments

  • edited March 2005

    RB tries to determine whether the printer can handle gray scale text and if
    not, sets the font color to black.

    See ppPrintr.Pas, the methods TppPrinterCanvas.UpdateDeviceContext and
    CustomPrinter.CanGrayScale and CustomPrinter.DeviceContextChanged.


    --
    Nard Moseley
    Digital Metaphors Corporation
    http://www.digital-metaphors.com


    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited March 2005
    Hi, Nard

    Then there seems something went wrong in the methods. I was using the same
    Gray Color to write a text in the MS Word and it prints correct. Could you
    please give me some hints to get it work?

    Willima

  • edited March 2005
    Hi,

    The logic to check if the printer CanGrayScale or not is not very right,
    since the printer can print the color image into gray scale properly, why
    the font color can not be grayed?

    William

  • edited March 2005

    True, but images and text are not rendered using the same Win API commands.

    There is a Win API function called GrayString, check out the definition for
    it in the Windows SDK help. Why would this function be needed if gray text
    worked properly? This function basically draws the text to a bitmap and then
    draws that to the printer. MS Word probably does that too.

    What we have implemented now, is not based upon any formal MS docs that we
    could find, but is based on what we encountered from ourselves and
    customers.

    Windows printer drivers handle color in many different ways, what works on
    one, might not work another. So we have things implemented on the
    conservative side of things. We need to have things work for as many drivers
    as is possible. No one likes to get a report printed with blank text. :)



    --
    Nard Moseley
    Digital Metaphors Corporation
    http://www.digital-metaphors.com


    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
This discussion has been closed.