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
- Open logo in Paintshop and design bmp image
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)
From the menus, select Image->Invert Colors
From the menus, select Image->Flip/Rotate. The image needs to be rotated by 270 degree
- Save the image as Monocrome bitmap file
From a Linux terminal, run bmplogo logo.bmp . The output will be called out.img
- Send out.img to the docket printer
lpr -P docket out.img
- 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
- Use GIMP to create the design
gimp
From the menus, select Filters->Colors->Value Invert. This needs to be done BEFORE the next step
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
From the menus, select Image->Scale Image
- Ensure the units are in Pixels
- Ensure that the width is no more than 512
From the menus, select Image->Transform->Rotate 90 degrees CCW
- Save the image as a bmp
- 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.
