Tray information for bth copy is read from a RAM. Next, print data is read from the RAM, and format data corresponding to a macro ID for the bth copy is read from the RAM. Then, image data is generated by combining the print data and the format data. Finally, based on the image data, an image is formed on a recording medium that was supplied from a tray designated by the tray information for the bth copy.