Adding Logo in a Docket

If the customer wants their Docket Printer to print their company logo in each docket they print. For this we have to get a logo from customer ( preferably soft copy not hard copy/ better if we don't have to scan), then we will customize the logo in our format and send it to printer memory.

Using MS Paint

  1. Open logo in Paintshop and design bmp image
  2. From the menus, select Image->Attribute.

    • Units = Pixels
    • Set the Width to a value 512 or lower. You will need to adjust the height value accordingly.
    • Colors = Black and white (This is a must. This changes the image to 1-bit colour)
  3. From the menus, select Image->Invert Colors

  4. From the menus, select Image->Flip/Rotate. The image needs to be rotated by 270 degree

  5. Save the image as Monocrome bitmap file
  6. From a Linux terminal, run  bmplogo logo.bmp . The output will be called out.img

  7. Send out.img to the docket printer
    lpr -P docket out.img 
  8. Test the logo by printing a special file with the correct control characters to the same printer
    lpr -P docket /home/usr/danny/mods/docket-logo/logo-print.prn 

Using Gimp

  1. Use GIMP to create the design
    gimp 
  2. From the menus, select Filters->Colors->Value Invert. This needs to be done BEFORE the next step

  3. From the menus, select Image->Mode->Indexed

    • Choose "Use black and white (1-bit) palette" option
    • If image is BLACK/WHITE select COlor Dithering to be none
  4. From the menus, select Image->Scale Image

    • Ensure the units are in Pixels
    • Ensure that the width is no more than 512
  5. From the menus, select Image->Transform->Rotate 90 degrees CCW

  6. Save the image as a bmp
  7. Perform Steps 6-8 from the "Using MS Paint" instructions

Note: to test print in other machine

eg : cat logo-print.prn | ssh ccc@servername "cat>/dev/lp0"

Things that can go wrong

If some reason, the printer crashes or power failure , make sure you have backup of out.img file to resend it printer again.

If using GIMP, it is imperative that you invert the colours before converting to 1-bit pallette. Otherwise, you can invert the colours all youwant, but the printout will not be affected !! These printers accept the logo in units of 8 pixels. If your bitmap's width is not a multiple of 8, bmplogo will "pad" the right side of the logo by repeating the last column. If the last column is blank, this will not matter. Otherwise just make sure the width is a multiple of 8.

Docket_Logo (last edited 2013-09-18 06:09:34 by localhost)