Arduino + Adafruit Thermal Printer

Hi, i would like to seek guidance on how to print the bitmap on the center of paper.
im using adafruit mini receipt thermal printer >> Click here

I am now able to print the bitmap but it prints on the left side of the paper, the bitmap is my logo and i wanted to put it on the center. I use the Adafruit library provided by the link above,

i already tried the command where justification is on the center but the bitmap is not affected.
i also tried to check the new line feed command on the program.

   printer.begin();
   printer.feed(1);
   printer.justify('C');
   printer.printBitmap(cleanlogo_width, cleanlogo_height, cleanlogo_data);
   printer.boldOn();
   printer.setSize('L');
   printer.print(F("IVSMS"));
   printer.boldOff();

the parameters of the printbitmap is already defined on the other window of the sketch.
so the printing was… Logo on the left - next line - IVSMS (centered).

here’s the cpp of the adafruit program, and i searched the printbitmap command, is there any code below does made the next text prints on the next line?? please help me…

void Adafruit_Thermal::printBitmap(
 int w, int h, const uint8_t *bitmap, bool fromProgMem) {
  int rowBytes, rowBytesClipped, rowStart, chunkHeight, chunkHeightLimit,
      x, y, i;

  rowBytes        = (w + 7) / 8; // Round up to next byte boundary
  rowBytesClipped = (rowBytes >= 48) ? 48 : rowBytes; // 384 pixels max width

  // Est. max rows to write at once, assuming 256 byte printer buffer.
  if(dtrEnabled) {
    chunkHeightLimit = 255; // Buffer doesn't matter, handshake!
  } else {
    chunkHeightLimit = 256 / rowBytesClipped;
    if(chunkHeightLimit > maxChunkHeight) chunkHeightLimit = maxChunkHeight;
    else if(chunkHeightLimit < 1)         chunkHeightLimit = 1;
  }

  for(i=rowStart=0; rowStart < h; rowStart += chunkHeightLimit) {
    // Issue up to chunkHeightLimit rows at a time:
    chunkHeight = h - rowStart;
    if(chunkHeight > chunkHeightLimit) chunkHeight = chunkHeightLimit;

    writeBytes(ASCII_DC2, '*', chunkHeight, rowBytesClipped);

    for(y=0; y < chunkHeight; y++) {
      for(x=0; x < rowBytesClipped; x++, i++) {
        timeoutWait();
        stream->write(fromProgMem ? pgm_read_byte(bitmap + i) : *(bitmap+i));
      }
      i += rowBytes - rowBytesClipped;
    }
    timeoutSet(chunkHeight * dotPrintTime);
  }
  prevByte = '\n';
}

void Adafruit_Thermal::printBitmap(int w, int h, Stream *fromStream) {
  int rowBytes, rowBytesClipped, rowStart, chunkHeight, chunkHeightLimit,
      x, y, i, c;

  rowBytes        = (w + 7) / 8; // Round up to next byte boundary
  rowBytesClipped = (rowBytes >= 48) ? 48 : rowBytes; // 384 pixels max width

  // Est. max rows to write at once, assuming 256 byte printer buffer.
  if(dtrEnabled) {
    chunkHeightLimit = 255; // Buffer doesn't matter, handshake!
  } else {
    chunkHeightLimit = 256 / rowBytesClipped;
    if(chunkHeightLimit > maxChunkHeight) chunkHeightLimit = maxChunkHeight;
    else if(chunkHeightLimit < 1)         chunkHeightLimit = 1;
  }

  for(rowStart=0; rowStart < h; rowStart += chunkHeightLimit) {
    // Issue up to chunkHeightLimit rows at a time:
    chunkHeight = h - rowStart;
    if(chunkHeight > chunkHeightLimit) chunkHeight = chunkHeightLimit;

    writeBytes(ASCII_DC2, '*', chunkHeight, rowBytesClipped);

    for(y=0; y < chunkHeight; y++) {
      for(x=0; x < rowBytesClipped; x++) {
        while((c = fromStream->read()) < 0);
        timeoutWait();
        stream->write((uint8_t)c);
      }
      for(i = rowBytes - rowBytesClipped; i>0; i--) {
        while((c = fromStream->read()) < 0);
      }
    }
    timeoutSet(chunkHeight * dotPrintTime);
  }
  prevByte = '\n';
}

void Adafruit_Thermal::printBitmap(Stream *fromStream) {
  uint8_t  tmp;
  uint16_t width, height;

  tmp    =  fromStream->read();
  width  = (fromStream->read() << 8) + tmp;

  tmp    =  fromStream->read();
  height = (fromStream->read() << 8) + tmp;

  printBitmap(width, height, fromStream);
}

I have a silly idea. Create a bitmap that is the width of the paper, with the logo in the middle.

If you want to move where the bitmap data is printed, dig into the library, to figure out how to add an offset to the physical location where the pixel is going to be printed.