BUG: SetTextJustification Fails To Justify On Some Printers

Last reviewed: May 14, 1997
Article ID: Q168426
The information in this article applies to:
  • Microsoft Win32 Software Development Kit (SDK) on the following platform: - Windows NT version 4.0

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 versions of the Microsoft products listed at the beginning of this article.


Keywords : GdiFnt GdiPrn kbprint
Version : 4.0
Platform : NT WINDOWS
Issue type : kbprb


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: May 14, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.