BUG: SetTextJustification Fails to Justify on Some Printers

ID: Q168426


The information in this article applies to:
  • Microsoft Win32 Software Development Kit (SDK)
    on the following platforms: NT


SYMPTOMS

The SetTextJustification() function does not affect text output on some printers even though it works correctly on a screen device context or A PostScript printer.


RESOLUTION

This bug exists in some printer drivers shipped with Windows NT 4.0. One workaround to this problem would be to use the ExtTextOut() function to precisely specify the advancement of the string's characters via the lpDX parameter. The lpDX parameter specifies the inter-character spacing of each character in the string. Write a function that is similar to SetTextJustification(), in that it identifies the break characters of a string. It needs to expand the advancement of each break character by an appropriate amount that would result in the desired justification of the string.

Another potential workaround is to compose the text of the printed page in a 1 bpp memory device context, and transfer the result to the printer device context via the BitBlt() function. This approach has two disadvantages: it restricts the available fonts to the system fonts, and it increases the size and print time of the print job because of the bitmap.


STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article.

Additional query words:

Keywords : kbprint kbNTOS400bug kbSDKWin32 kbDSupport
Version : WINDOWS:
Platform : WINDOWS
Issue type : kbbug


Last Reviewed: June 25, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.