I am writing a Qt desktop program which need to print receipt after a transaction. For this I need to issue a "cut paper" in the end of each receipt. I understand that the following ascii characters(ascii 27 + ascii 105) need to be sent at the end of the print text to cut paper.
I could not find any documentation on how to send this using QPrinter. I use QPrinter & QPainter to implement printing.
If anyone has tried this please advice how to handle cut paper printer command in Qt.
I found answer to this question and posting this so that it may be useful for others.
I used append(ascii character) command to append the printer commands to the printer.
Here is the sample code I used: