LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

What print attr is req'd for 'PrintTextFile ()' to recognize the form-feed char?

I have generated a text report and saved it to disk. If I print the file via windows, the embedded form-feed characters are recognized by the printer. However, if I print the file from CVI using 'PrintTextFile ()', then the embedded form-feed characters are not recognized. What print attributes are required in order for the embedded form-feed characters to be recognized?
0 Kudos
Message 1 of 3
(2,891 Views)
Hi,

Looking in the help for PrintTextFile() it states that "Newline/carriage-return characters are honored" however it does not talks about form-feed characters. It is possible that it does not process form-feed commands.

There is the chance that changing the ATTR_EJECT_AFTER attribute in the SetPrintAttribute() will cause the form-feed to be honored. You may want to give this a try. Otherwise; you can read the text file into memory, separate the buffer into blocks devided by the form-feed characters and then use the PrintTextBuffer() function.

I hope this helps, let me know if you have any furhter questions.

Regards,

Juan Carlos
N.I.
Message 2 of 3
(2,891 Views)
This process worked great. The PrintTextBuffer function does an automatic page eject. However, the code to perform this functionality (55 lines) could have been reduced to one line if NI had honored the form feed character.
0 Kudos
Message 3 of 3
(2,891 Views)