How to disable margin top when printing an image?

B Bryan Sanchez 3 years 7 months ago
25 0 0

Hi i am using an iMZ 320 to print an image, i manage to connect with my app and print an image, but i am having a default margin top that i dont know how to delete it. Anyone can share some command or configuration? Pleaaaseeeeeeeeee.
 
Here is the code i am using
 
     var view = this.Window.DecorView;
     view.DrawingCacheEnabled = true;
     Bitmap bitmap = view.GetDrawingCache(true);
     Bitmap resizeBitMap = Bitmap.CreateScaledBitmap(bitmap, 896, 672, true);
 
     // ZPL Commands
     string setLanguageCommand = "\r\n! U1 setvar \"device.languages\" \"zpl\"\r\n";
     string printerCommand = "^XA^FO0,0^XGR:IMAGE.GRF^XZ";
     string labelLenghtCommand = "\r\n! U1 setvar \"zpl.label_length\" \"1000\"\r\n";
 
     // Send command to printer to configure it
     byte[] responseSetLenguage = printer.Connection.SendAndWaitForResponse(Encoding.ASCII.GetBytes(setLanguageCommand), 500, 500);
     byte[] responseLabelLenghtCommand = printer.Connection.SendAndWaitForResponse(Encoding.ASCII.GetBytes(labelLenghtCommand), 500, 500);
 
     // Store image to print
     printer.StoreImage("R:IMAGE.GRF", resizeBitMap, 580, 1000);
 
     // Print image stored with ZPL Command
     byte[] responsePrinterCommand = printer.Connection.SendAndWaitForResponse(Encoding.ASCII.GetBytes(printerCommand), 500, 500);
 
     // Response of printer
     string response1string = Encoding.ASCII.GetString(responseSetLenguage);
     string response2string = Encoding.ASCII.GetString(responsePrinterCommand);
 
And here is the image of the problem
 

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