I want to print QR code on receipt but it gives an error
Printing of text works fine but unable to print the bitmap image or bitmap memory.
It throws an error when i use
1. PrintBitmap
printer.PrintBitmap(PrinterStation.Receipt, filePath, PosPrinter.PrinterBitmapAsIs, PosPrinter.PrinterBitmapCenter);
"Method PrintBitmap threw an exception. The device cannot perform the requested procedure."
2. PrintMemoryBitmap
System.Drawing.Bitmap bm = QRGen(text);
printer.PrintMemoryBitmap(PrinterStation.Receipt, bm, PosPrinter.PrinterBitmapAsIs, PosPrinter.PrinterBitmapCenter);
"Method PrintMemoryBitmap threw an exception. The Control cannot communicate with the Service Object. Most likely, a setup or configuration error must be corrected."