LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

'SetPrintAttributes' ignores font specification

In my TestStand OperatorInterface I display the test report in a list control after the test is finished. Also in this panel is a button that allows me to 'print' the report.

The print report function sets the desired printer attributes via the following statements:

// Set printing attributes
SetPrintAttribute (ATTR_ORIENTATION, VAL_LANDSCAPE);
SetPrintAttribute (ATTR_PRINT_FONT_NAME, "Courier");
SetPrintAttribute (ATTR_PRINT_POINT_SIZE, 14);
SetPrintAttribute (ATTR_TAB_INTERVAL, 8);
SetPrintAttribute (ATTR_TEXT_WRAP, FALSE);

And then enters a loop to process each entry in the list control. The printout is in landscape as specified.

The printout, however is NOT monospaced. When I change the font size to 10 and look at the printout, the vertical characteristics have shrunk accordingly but the horizontal characteristics remain exactly as they were with the original 14 point size.

How can I get the printout to follow the attributes that I've specified?
0 Kudos
Message 1 of 6
(3,781 Views)
Just a guess, but have you tried "Courier New"? That is a TrueType font, and in my experience behaves better than the old "Courier" font.
Message 2 of 6
(3,772 Views)
My screen worked fine with 'Courier'. With 'Courier New' they work great.
Thanks.
0 Kudos
Message 3 of 6
(3,760 Views)
We had a problem with this years ago.
Changing the font at ATTR_PRINT_FONT_NAME to "Courier new" solved the problem. Before that no one, even from NI could help us because some printers recognized "courier", ours did not. This should have been the default type font.
-wfc
Message 4 of 6
(3,723 Views)
Yes, 'Courier New' does th job correctly.

Hurst
0 Kudos
Message 5 of 6
(3,709 Views)

Using SetPrintAttribute("ATTR_PRINT_FONT_NAME, "Courier New") did not work fix the problem for me.

I can't get any of "ATTR_PRINT_{POINT_SIZE,ITALIC, TEXT_WRAP}"  to work on my default Brother QL-810 label printer. It is only from Labwindows printer attributes can't be changed. Using P-Touch Editor works fine to change printer preferences (font type, size, etc).

0 Kudos
Message 6 of 6
(2,634 Views)