nsafabulous.blogg.se

Print .zpl file zebra printer
Print .zpl file zebra printer








String bitmapFilePath = // file is attached to this support article

print .zpl file zebra printer

declare what the bitmap information is, since we are working A simple search online for 'bitmap format' should yield how to extract the following data in order to proceed. that a developer understands the basic bitmap format and bitmap height, width, bitsPerPixel, etc. information about that bitmap from the header Given a monochrome bitmap file, one can read String comandoCompleto = "~DG" + nomeImagem + ".GRF,0" + bitmapDataLength.ToString() + ",0" + widthInBytes.ToString() + "," + ZPLImageDataString String ZPLImageDataString = BitConverter.ToString(bitmap).Replace("-", string.Empty) Create ASCII ZPL string of hexadecimal bitmap data This represents the bitmap data without the header information.īyte bitmap = new byte īuffer.BlockCopy(bitmapFileData, bitmapDataOffset, bitmap, 0, (bitmapDataLength)) įor (int i = 0 i < bitmapDataLength i++) Copy over the actual bitmap data from the bitmap file.

print .zpl file zebra printer

Int bitmapDataLength = fileSize - 62 // 8160 ĭouble widthInBytes = Math.Ceiling(width / 8.0) Int bitmapDataOffset = 62 // 62 = header of the image

print .zpl file zebra printer

to determine this information for bitmaps besides the given test.bmp. The following is known about test.bmp.

print .zpl file zebra printer

Это мой код: string bitmapFilePath = // file is attached to this support articleīyte bitmapFileData = System.IO.File.ReadAllBytes(bitmapFilePath) īitmap ImgTemp = new Bitmap(bitmapFilePath)










Print .zpl file zebra printer