Patent attributes
In a printing apparatus which prints by serial scanning, a control command and image data formed from a plurality of rasters as a unit that are received from a connected host apparatus are stored in a reception buffer. Whether to perform marginless printing of printing on the entire surface of a printing medium is determined on the basis of information on the size of image data and information on the size of the printing medium that are contained in the control command. When marginless printing is performed, the amount of unnecessary image data is calculated by using a plurality of rasters as a unit on the basis of the length of the printing medium in the conveyance direction and the length of the image data in the conveyance direction. The printing start position of the printing medium in the conveyance direction is aligned by a distance corresponding to the number of rasters as a remainder of the calculation. Accordingly, the start position of marginless printing on the printing medium in the conveyance direction can be accurately controlled when marginless printing is executed.