Printing qr/barcode #1
-
Hello Friends, |
Beta Was this translation helpful? Give feedback.
Answered by
simphonydeveloper
Apr 1, 2024
Replies: 3 comments 12 replies
-
You just need to merge the two codes. |
Beta Was this translation helpful? Give feedback.
8 replies
-
My dear Friends. This worked for me. I did code for QR Code as shown below byte[] qrdatacontent = Encoding.UTF8.GetBytes("This is Qr Data Content from Dll testing App:Futuristic");
byte[] storeQRCode = new byte[] { 0x1D, 0x28, 0x6B, (byte)(qrdatacontent.Length + 3), 0x00, 0x31, 0x50, 0x30 };
byte[] modQRCode = { 0x1D, 0x28, 0x6B, 0x04, 0x00, 0x31, 0x41, 0x32, 0x00 };
byte[] sizeQRCode = new byte[] { 0x1D, 0x28, 0x6B, 0x03, 0x00, 0x31, 0x43, 0x04 };
byte[] printQRCode = new byte[] { 0x1D, 0x28, 0x6B, 0x03, 0x00, 0x31, 0x51, 0x30 };
byte[] centerPrint = new byte[] { 0x1b, 0x61, 0x01 };
byte[] lastbuffer = new byte[] { 27, 97, 48 };
byte[] buffer = new byte[storeQRCode.Length + modQRCode.Length + sizeQRCode.Length + printQRCode.Length + lastbuffer.Length + qrdatacontent.Length + centerPrint.Length];
storeQRCode.CopyTo(buffer, 0);
qrdatacontent.CopyTo(buffer, storeQRCode.Length);
modQRCode.CopyTo(buffer, storeQRCode.Length + qrdatacontent.Length);
sizeQRCode.CopyTo(buffer, storeQRCode.Length + qrdatacontent.Length + modQRCode.Length);
centerPrint.CopyTo(buffer, storeQRCode.Length + qrdatacontent.Length + modQRCode.Length + sizeQRCode.Length);
printQRCode.CopyTo(buffer, storeQRCode.Length + qrdatacontent.Length + modQRCode.Length + sizeQRCode.Length + centerPrint.Length);
lastbuffer.CopyTo(buffer, storeQRCode.Length + qrdatacontent.Length + modQRCode.Length + sizeQRCode.Length + centerPrint.Length + printQRCode.Length);
OpsCustomReceiptEventArgs args = new OpsCustomReceiptEventArgs()
{
TrailerAction = CustomPrintType.Append,
CustomTrailer = buffer
};
List<int> checkDetailLinks = new List<int>();
for (int i = 0; i < this.OpsContext.CheckDetail.Count; i++)
{
checkDetailLinks.Add(this.OpsContext.CheckDetail[i].DetailLink);
}
bool customerReceipt = true;
DbTenderMedia temd = new DbTenderMedia()
{
ObjectNumber = 902
};
this.OpsContext.PrintReceipt(args, checkDetailLinks, customerReceipt, temd); |
Beta Was this translation helpful? Give feedback.
4 replies
-
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
hi friend. you can test the code. i'm ok.