LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

print buffer line by line without ejecting paper

I need to print a buffer to a matrix printer. I have achieved it using the PrintTextBuffer, but now I want to print serveral buffers in the same page. I have used the attribute ATTR_EJECT_PAPER=0, but it doesn't work. The printer don't print anything till the ATTR_EJECT_PAPER is set to 1 again.
Thanks for all.
0 Kudos
Message 1 of 4
(3,400 Views)
This seems to be the correct behavior. I was able to replicate the issue. However, if you look into the SetPrintAttribute (ATTR_EJECT_AFTER, 0), it says:
Specifies whether to eject the paper from the printer after the next call to a printing function. If ATTR_EJECT_AFTER is set to zero, outputs are printed on the same page until ATTR_EJECT_AFTER is set to one.
So it won't print anything until you specify the end of the page. It won't print until that call where you set it back to 1. I made a very small sample program that shows how to use it properly. If you experience problems on your machine, please post back. Thanks.
0 Kudos
Message 2 of 4
(3,400 Views)
Thanks, but what I need is to print one buffer and wait x seconds for the next printing and so on continuosly. So is not valid for me save several buffers and then print all at the same time. I would like to know if is possible to make this with the functions PrintTextBuffer, SetPrintAttributte,..... or I need a specific instrument like nireport.fp or another one.

Regards,
0 Kudos
Message 4 of 4
(3,400 Views)
Hi there,

If you set the attribute to ATTR_EJECT_PAPER right after you're done printing, it should work.
I have attached some simple code that shows how to send several text buffers on one page.

Regards,

Azucena
NI
0 Kudos
Message 3 of 4
(3,400 Views)