LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

printtextbuffer

Hi all,

i'm using printtextbuffer to print data in the buffer in a printer. The problem is that this function is adding caracters to the buffer which has an impact ti the data that i want to print. So, it's caused by the cal of this function?

best regards 

0 Kudos
Message 1 of 2
(2,826 Views)

From the help I must point out the following caveats:

 

  • Newline/carriage-return characters are honored.
  • Tabs expand according to the current state of the ATTR_TAB_INTERVAL attribute. You can modify this attribute with SetPrintAttribute. The default tab interval is four.
  • Text that extends beyond the end of the paper either truncates or wraps, depending on the state of the ATTR_TEXT_WRAP attribute. You can modify this attribute with SetPrintAttribute. The default is wrap.
  • An ASCII NUL byte marks the end of the buffer.

The last one there could be of importance. Is your buffer null terminated (The last character in the string is a ASCII NUL or 0)? If not, then the function may be reading past the end of your string into garbage data until it hits a ASCII NUL character.

National Instruments
Message 2 of 2
(2,811 Views)