Can't print image

Jul 27, 2016 at 1:06 AM
I Cant print image
Here is the code i'm using

PrinterSettings ps = new PrinterSettings();
        ps.PrinterName = "ZDesigner S4M-203dpi ZPL";
        ps.Width = 203 * 4;
        ps.Length = 203 * 6;
        ps.Darkness = 30;

        List<byte> page = new List<byte>();
        page.AddRange(ZPLCommands.ClearPrinter(ps));
        page.AddRange(ZPLCommands.GraphicStore( (System.Drawing.Bitmap)System.Drawing.Bitmap.FromFile("C:\\Users\\marce_000\\OneDrive\\DQT\\Clientes\\I4d\\Artleaser\\temp\\logo_artlaser.bmp"), 'E', "SAMPLE"));
        page.AddRange(ZPLCommands.TextWrite(10, 10, ElementDrawRotation.NO_ROTATION, ZebraFont.STANDARD_NORMAL, 15,10, "Hello World!",1252));
        page.AddRange(ZPLCommands.TextWrite(190, 10, ElementDrawRotation.NO_ROTATION, ZebraFont.STANDARD_NORMAL, 15, 10, "NOW !", 1252));
        page.AddRange(ZPLCommands.PrintBuffer(1));

        new SpoolPrinter(ps).Print(page.ToArray());
Coordinator
Jul 27, 2016 at 3:38 AM
Edited Jul 27, 2016 at 3:38 AM
graphicstore uploads the image to your printer's flash. You only want to do this once (per printer).

In order to use the image on a label, use GraphicWrite

page.AddRange(ZPLCommands.GraphicWrite(10, 40, "SAMPLE", 'E'));