ZPL will only print EITHER my logo OR my label

T Thomas Murray 3 years 7 months ago
51 0 0

Hi,

I am having a bit of trouble getting my company logo to print at the top of my label. The strange thing is, I am able to get either the logo to print or the label if I remove one or the other.

Can someone take a look at my ZPL and see if I am missing something or overlooking a bit of code?

***EDIT
I have figured out that if i cut my ZPL command about 1/3 of the way down it prints the logo and the 1/3 of text. This is when the bufferArray being sent to the printer is under 4000. Is there a limit on what can be send in one go? I have highlighted the point in the ZPL that if i remove from there down (leaving the ^XZ command) it will print the image and the text down to that point.

Thanks

Tom

var setLang = "! U1 setvar \'device.languages\' \'zpl\'\r\n";
var printCommand = '^XA^POI' +
'^FO50,240^GFB,3136,3136,32,';
var img = '0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000070000000000000000000000000000000000000000000000000000000000000007800000000000000000000000000000000000000000000000000000000000000F800000000000000000000000000000000000000000000000000000000000000FC00000000000000000000000000000000000000000000000000000000000001FC00000000000000000000000000000000000000000000000000000000000001FC00000000000000000000000000000000000000000000000000000000000003FE00000000000000000000000000000000000000000000000000000000000003FE00000000000000000000000000000000000000000000000000000000000003FF00000000000000000000000000000000000000000000000000000000000007FF0000000000000000000000000000000000000000000000000000000000000FFF8000000000000000000000000000000000000000000000000000000000000FE08000000000000000000000000000000000000000000000000000000000001FC04000000000000000000000000000000000000000000000000000000000001F804000000000000000000000000000000000000000000000000000000000001F802000000000000000000000000000000000000000000000000000000000003F002000000000000000000000000000000000000000000000000000000000003F002000000000000000000000000000000000000000000000000000000000003F002000000000000000000000000000000000000000000000000000000000003F002000000000000000000000000000000000000000000000000000000000003F802000000000000000000000000000000000000000000000000000000000003F802000000000000000000000000000000000000000000000000000000000003FC06000000000000000000000000000000000000000000000000000000000001FE0E000000000000000000000000000000000000000000000000000000000001FFFC00000000000000000000000000000FFFC0000000000000000000001FFF80FFF80000000000000000000000000000FFFFC0000000000000000000001FFF807FF00000000000000000000000000003FFFFC0000000000000000000001FFF801FC00000000000000000000000000007FFFFC0000000000000000000001FFF800000000000000000000000000000000FFFFFC0000000000000000000001FFF800000000000000000000000000000000FFFFFC0000000000000000000001FFF800000000000000000000000000000001FFFFFC0000000000000000000001FFF800000000000000000000000000000001FFFFF80000000000000000000001FFF80000000FFFC000000000000000000001FFFE000000000000000000000001FFF80000000FFFC000000000000000000001FFF8000000000000000000000001FFF80000000FFFC000000000000000000001FFF8000000000000000000000001FFF80000000FFFC000000000000000000001FFF8000000000000000000000001FFF80000000FFFC000000000000000000001FFF8000000000000000000000001FFF80000000FFFC00000000000000000003FFFFFFC0FFF81FF00FFFC0007FFE1FFF803FFC1FFFFFFFF80003FFFF00000007FFFFFFC1FFF8FFFE0FFFE0007FFE1FFF807FFE1FFFFFFFFC003FFFFFF0000007FFFFFFC1FFF9FFFF0FFFE000FFFE1FFF807FFE1FFFFFFFFC00FFFFFFFC000007FFFFFFC1FFFBFFFF87FFF000FFFE1FFF807FFE1FFFFFFFFC03FFFFFFFE000007FFFFFFC1FFFFFFFF87FFF000FFFC1FFF807FFE1FFFFFFFFC07FFFFFFFF000007FFFFFFC1FFFFFFFFC3FFF000FFFC1FFF807FFE1FFFFFFFFC07FFFFFFFF800007FFFFFFC1FFFFFFFFC3FFF001FFFC1FFF807FFE1FFFFFFFFC0FFFFFFFFFC00007FFFFFFC1FFFFFFFFC3FFF801FFFC1FFF807FFE1FFFFFFFFC0FFFFFFFFFC00003FFFFFFC1FFFF9FFFC1FFF801FFF81FFF807FFE1FFFFFFFF81FFFC00FFFE000001FFF8001FFFE07FFC1FFF801FFF81FFF807FFE00FFFC00001FFF8007FFE000001FFF8001FFFC07FFC0FFFC03FFF81FFF807FFE00FFFC00001FFF8007FFE000001FFF8001FFFC07FFC0FFFC03FFF01FFF807FFE00FFFC00001FFF8007FFE000001FFF8001FFFC07FFC0FFFC03FFF01FFF807FFE00FFFC00003FFFFFFFFFE000001FFF8001FFFC07FFC07FFE03FFF01FFF807FFE00FFFC00003FFFFFFFFFE000001FFF8001FFF803FFC07FFE07FFE01FFF807FFE00FFFC00003FFFFFFFFFF000001FFF8001FFF80000007FFE07FFE01FFF807FFE00FFFC00003FFFFFFFFFF000001FFF8001FFF80000003FFF07FFE01FFF807FFE00FFFC00003FFFFFFFFFF000001FFF8001FFF80000003FFF07FFC01FFF807FFE00FFFC00003FFFFFFFFFF000001FFF8001FFF80000001FFF0FFFC01FFF807FFE00FFFC00003FFF8000000000001FFF8001FFF80000001FFF8FFFC01FFF807FFE00FFFC0FFF3FFF8000000000001FFF8001FFF80000001FFF8FFFC01FFF807FFE00FFFC0FFF3FFF8000000000001FFF8001FFF80000000FFF9FFF801FFF807FFE00FFFC0FFF1FFF8003FFE000001FFF8001FFF80000000FFFDFFF801FFF807FFE00FFFC0FFF1FFF8007FFF000001FFF8001FFFC00000007FFDFFF801FFF807FFE00FFFC1FFF1FFFC007FFF000001FFF8001FFFC00000007FFDFFF001FFF807FFE00FFFF3FFE1FFFE01FFFE000001FFF8001FFFC00000007FFFFFF001FFF807FFE00FFFFFFFE0FFFFFFFFFE000001FFF8001FFFC00000003FFFFFF001FFF807FFE00FFFFFFFE0FFFFFFFFFE000001FFF8001FFFC00000003FFFFFE001FFF807FFE00FFFFFFFE07FFFFFFFFC000001FFF8001FFFC00000001FFFFFE001FFF807FFE007FFFFFFC03FFFFFFFF8000001FFF8001FFFC00000001FFFFFE001FFF807FFE003FFFFFF801FFFFFFFF0000001FFF8001FFFC00000001FFFFFC001FFF807FFE001FFFFFF0007FFFFFFE0000001FFF8001FFFC00000000FFFFFC001FFF807FFE0007FFFFC0001FFFFFF00000000000000080000000000001FFFC00000000000000007FFC0000007FFC000000000000000000000000000001FFFC000000000000000000000000000000000000000000000000000000000001FFF8000000000000000000000000000000000000000000000000000000000001FFF8000000000000000000000000000000000000000000000000000000000003FFF8000060000000000000003000C00000000000000000000000000000000007FFF0000070000000000000007000E000600000000000000000000000000001BFFFF0000C60000000030000007000C000600000000000000000000000000003FFFFE0000E60000000038000007000C010000000000000000000000000000003FFFFE0001F7E3E07E3F7D99F3F303CFC7C63CF80000000000000000000000003FFFFC0001F7E7E07F7F7999E7F303CFEFE67DFC0000000000000000000000003FFFF80000E667F067733999C673070ECE6661FC0000000000000000000000003FFFF00000E66760667731998673070CEE6661D80000000000000000000000003FFFC00000E677E0677F39F9C7F303CCE7E67DF80000000000000000000000003FFF000000C663E0663F31F183F301CCE7C63CF800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000';
var printCommand2 = "^FS^CF0,60"+
"^FO310,260^FDINVOICE^FS"+
"^CFA,20"+
"^FO50,350^FDxxxxxxxxxxxx^FS"+
"^FO50,375^FDxxxxxxxxxxxx^FS"+
"^FO50,400^FDxxxxxxxxxxxx^FS"+
"^FO50,425^FDxxxxxxxxxxxx^FS"+
"^FO50,450^FDxxxxxxxxxxxx^FS"+
"^FO50,475^FDxxxxxxxxxxxx^FS"+
"^FO480,425^FDTel: xxxxxxxxxxxx^FS"+
"^FO480,450^FDFax: xxxxxxxxxxxx^FS"+
"^FO480,475^FDVAT Reg No: xxxxxxxxxxxx^FS"+
"^FO50,550^FDCustomer Account No.: ^FS"+
"^FO310,550^FDD230^FS"+
"^FO50,575^FDCustomer Name:^FS"+
"^FO230,575^FDxxxxxxxxxxxx^FS"+
"^FO50,600^FDxxxxxxxxxxxx^FS"+
"^FO50,625^FDxxxxxxxxxxxx^FS"+
"^FO50,650^FDxxxxxxxxxxxx^FS"+
"^FO50,675^FDxxxxxxxxxxxx^FS"+
"^FO480,700^FDDepot:^FS"+
"^FO560,700^FDxxxxxxxxxxxx^FS"+
"^FO50,725^FDPO:^FS"+
"^FO90,725^FDfhej^FS"+
"^FO480,725^FDDate:^FS"+
"^FO545,725^FD02/03/18 12:09^FS"+
"^FO50,775^FDInvoice Number:^FS"+
"^FO235,775^FDxxxxxxxxxxxx^FS"+
"^CFB,25"+
"^FO50,825^FDDeliveries^FS"+
"^CF0,30,33"+
"^FO50,860^FDProduct^FS"+
"^FO200,860^FDDescription^FS"+
"^FO450,860^FDQty^FS"+
"^FO550,860^FDUnit^FS"+
"^FO650,860^FDPrice^FS"+
"^CFB,10"+
"^FO50,885^FDxxxxxxxxxx^FS"+
"^FO200,885^FDxxxxxxxxxx^FS"+
"^FO450,885^FD4^FS"+
"^FO550,885^FD00.000^FS"+
"^FO650,885^FD00.000^FS"+
"^CFA,20,10"+
"^FO550,920^FDSub:^FS"+
"^FO550,945^FDVAT:^FS"+
"^FO550,970^FDTotal:^FS"+
"^FO650,920^FD00.000^FS"+
"^FO650,945^FD0.000^FS"+
"^FO650,970^FD00.000GBP^FS"+
"^CFB,25"+
"^FO50,990^FDReturns^FS"+
"^CF0,30,33"+
"^FO50,1025^FDProduct^FS"+
"^FO200,1025^FDDescription^FS"+
"^FO450,1025^FDQty^FS"+
"^FX Listed items in a return"+
"^CFB,10"+
"^FO50,1050^FDxxxxxxxxxx^FS"+
"^FO200,1050^FDxxxxxxxxx^FS"+
"^FO450,1050^FD100^FS"+
"^FX Section for Payments"+
"^CFB,25"+
"^FO50,1115^FDPayments^FS"+
"^CF0,30,35"+
"^FO50,1150^FDCash Recieved:^FS"+
"^FO50,1180^FDCheques Recieved:^FS"+
"^CFA,20,15"+
"^FO400,1150^FD00.000GBP^FS"+
"^FO400,1180^FD00.000GBP^FS"+
"^CFA,20"+
"^FO25,1230^FDBookman Signature:^FS"+
"^FO25,1370^FDReceived Signature:^FS"+
"^FO40,1500^FB700,3^FDBy signing this self declaration, this signatory declares that the following requirement are met^FS"+
"^FO40,1550^GB720,350,3^FS"+
"^FO100,1550^GB1,350,2^FS"+
"^FO160,1550^GB1,350,2^FS"+
"^FO100,1625^GB660,1,2^FS"+
"^FO100,1685^GB660,1,2^FS"+
"^FO40,1750^GB720,1,2^FS"+
"^FO40,1810^GB720,1,2^FS"+
"^FO55,1575^FD1.^FS"+
"^FO55,1760^FD2.^FS"+
"^FO55,1820^FD3.^FS"+
"^FO105,1640^FD(A)^FS"+
"^FO105,1700^FD(B)X^FS"+
"^CFA,15"+
"^FO170,1560^FB560,3^FDxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx^FS"+
"^FO170,1640^FB560,3^FDxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx^FS"+
"^FO170,1690^FB560,3^FDxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx^FS"+
"^FO170,1760^FB560,3^FDxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx^FS"+
"^FO170,1820^FB560,3^FDxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx^FS"+
"^CF0,190"+
"^XZ";

//GeopalPrint will conver the string to Hex and my slice will remove the 0D0A from the end as it messes up the image
var stringtoPrint = GeopalPrint.getPrintString(printCommand);
stringtoPrint = stringtoPrint.slice(0, -4);
var stringtoPrint2 = GeopalPrint.getPrintString(printCommand2);
stringtoPrint2 = stringtoPrint2.slice(0, -4);

//GeopalPrint.printHex gets the bufferArray, calls the printer and passes the data
GeopalPrint.printHex(setLang + stringtoPrint + img + stringtoPrint2);

CONTACT
Can’t find what you’re looking for?