this converts the data to a suitable format for the printer