added format conversion

This function can be used by the printer to adjust the printer head and
print on the paper