Patent ID: 8136915

Claim:
A liquid ejecting apparatus comprising: a roller that feeds a medium in a sub-scanning direction; a carriage that performs a first main scan and a second main scan in a main-scanning direction; a print head that is provided on the carriage, the print head ejecting liquid while the carriage is in motion; and a sensor that is provided on the carriage, the sensor outputting an output value while the print head is ejecting the liquid, the output value changing when the sensor passes across a position of an edge of the medium; wherein the roller feeds the medium at least once between the first main scan and the second main scan, the second main scan being performed after the first main scan; wherein, in a case where the position of the edge is detected based on the output value in the second main scan, the print head ejects the liquid from a start position to an end position in the main-scanning direction in accordance with the position of the edge detected based on the output value in the second main scan; and wherein, in a case where the position of the edge is not detected based on the output value in the second main scan, the print head ejects the liquid from a start position to an end position in accordance with the position of the edge detected based on the output value in the first main scan.