Look at the Arduino File/Example/02.Digital/Button example, and consider putting much of the stuff in your setup() function into a printLineOnTheThermalPrinter() function per
You might modify the Button example to also call a printLineOnTheThermalPrinter() function ehrn the button is pressed.