In view of this, by determining the start position or the end position based on a position of an end that was detected in the past according to such a method as described above in a case where the edge position was not detected, it becomes possible to prevent a blank space from unintentionally being created on the print paper.