LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

PB with SetPrintAttribute (ATTR_PRINT_FONT_NAME, "Courier New");

I use CVI 5.5 with W98 or WNT 4.0.

I have A DESKJET 840C HP PRINTER.

I want to print a table with the instruction "SetPrintAttribute".

I use the policy "Courier New". This policy is not proportional but the next result is bad :

/*******/
SetPrintAttribut(ATTR_PRINT_FONT_NAME, "Courier New");
PrintTextBuffer ("----------:----------:", "");
PrintTextBuffer (" 4567 : ABCDEF :", "");
PrintTextBuffer (" azer : wxcvt- :", "");
PrintTextBuffer ("----------:----------:", "");
/*********/

The columns aren't alined.

This exemple is working with HP LaserJet 4m and the others printers. Is it normal ?

Sorry for my bad english.
0 Kudos
Message 1 of 3
(3,166 Views)
Hi Azerty-

I tried your example on my machine (CVI 5.5.1, Win 2000, HP LJ 4000TN) and it worked fine.

SetPrintAttribute will be able to print any font that Microsoft Word or your printer supports - can you print a similar string with the same font from Word? Probably not.
Try it and see. If you can, make sure that your font name is spelled and capitalized in the same way.

I think I answered your question...right?

ben schulte
national instruments
0 Kudos
Message 2 of 3
(3,166 Views)
It's working with HP laserjet 8000 but it's not working with HP 815 HP 660C HP 840 C. Is it normal ?
0 Kudos
Message 3 of 3
(3,166 Views)