11-12-2025 05:30 AM
I had a VI that print a text to a ticket printer (it is a 80mm roll paper printer, the model is Custom Kube 2):
I used the Easy Text Report.VI and all is ok till Labview version 2017.
From Labview 2018 this VI does not accept The 'Standard Report' type, only HTML,Word,Excel. Now I'm using Labview 2023.
If I select the HTML format the output on the printer is an A4 sheet with big font and a lot of paper roll out from the printer.
Is there any way to print a text on the printer?
Regards.
Massimo Ponte
11-12-2025 02:27 PM
@seica1 wrote:
Is there any way to print a text on the printer?
Hello, Massimo.
Have you looked at the LabVIEW functions on the File I/O palette?
You would use "Create File" (one of the options on Open/Create/Replace File) to establish your File "Wire" that, with the Error Line, ties most of your File I/O functions together. I'm guessing that you want to write lines of text, possibly header information followed by lines of data formatted with spaces or tabs or something else to get a "Row and Column" organization of Human-Readable Data. Note that human-readable data = Text File. For each line of Header or Data you want to write, you can format it (to get column spacing along with formatting of data however you wish to see it). You'll probably write Header first (either a single Write Text File function or multiple lines of text in a For or While loop), then feed your data into a subsequent For or While Loop to write a line at a time) the data to the file, again using "Write Text File". When you are all done and exit the Loop, use Close File to close the file and dispense with the File Wire.
If you are unsure how the various File functions work, stick them down in your Block Diagram, wire them up as you'd guess they should be wired, and try it out. You can also click on a function and use the LabVIEW Help to show you the inputs and outputs, what they mean (detailed view), and often where to find examples that ship with LabVIEW.
Bob Schor
11-12-2025 04:40 PM
This page lists a procedure you can follow to restore Standard Reports to LabVIEW. Note that this procedure is not officially supported by NI.
11-13-2025 01:16 AM
Hello, I was speaking about printing text on a printer not to a file.
Thank you.
11-13-2025 01:26 AM
Hello, I want to print text to my printer (no matter if it's text or HTML) the problem is that my printer is a Roll printer not standard A4 printer. My problem is that I'm not able to set the correct format for the data to the printer, seems that labview prints always an entire A4 sheet even if the data are few text rows. The results is that I have my fwe rows printed with very big font (even if I set a specific size) and the rest of the A4 sheet blank that feeds out a lot of paper from the printer.
Certainly I can use the procedure you suggested me but if there is another 'standard' way I will prefer that.
This is the printer
Thank you very much.