A method for determining a working gap, comprising: a first recording step for ejecting ink from a recording head onto a first recording medium having a known medium thickness to record a test pattern (53, 55); a first imaging step for capturing the test pattern (53, 55) recorded on the first recording medium in each of a state where a distance between the recording head and the first recording medium is a first distance, and a state where a distance between the recording head and the first recording medium is a second distance; wherein, at the first distance, the test pattern (53, 55) is enlarged or reduced to a predetermined size using a zoom lens of an imaging unit; a height setting step for adjusting a distance between the first recording medium and the recording head from the first distance to the second distance; wherein a distance between a recording medium and the recording head is adjusted by raising and lowering an entire recording unit including a carriage, on which carriage the recording head and an imaging unit for capturing a test pattern (53, 55) are mounted, a function calculating step for calculating, based on the number of pixels of the test pattern (53, 55) captured at the first distance and the number of pixels of the test pattern (53, 55) captured at the second distance, a function to determine the distance from the number of pixels of the captured test pattern (53, 55); a second recording step for recording the test pattern (53, 55) on a second recording medium having an unknown medium thickness; a second imaging step for capturing, at the predetermined size, the test pattern (53, 55) recorded on the second recording medium; and a working gap determining step for determining, based on the number of pixels of the captured test pattern (53, 55) recorded on the second recording medium, and the function, a distance between the recording head and the second recording medium. a first recording step for ejecting ink from a recording head onto a first recording medium having a known medium thickness to record a test pattern (53, 55); a first imaging step for capturing the test pattern (53, 55) recorded on the first recording medium in each of a state where a distance between the recording head and the first recording medium is a first distance, and a state where a distance between the recording head and the first recording medium is a second distance; wherein, at the first distance, the test pattern (53, 55) is enlarged or reduced to a predetermined size using a zoom lens of an imaging unit; a height setting step for adjusting a distance between the first recording medium and the recording head from the first distance to the second distance; wherein a distance between a recording medium and the recording head is adjusted by raising and lowering an entire recording unit including a carriage, on which carriage the recording head and an imaging unit for capturing a test pattern (53, 55) are mounted, a function calculating step for calculating, based on the number of pixels of the test pattern (53, 55) captured at the first distance and the number of pixels of the test pattern (53, 55) captured at the second distance, a function to determine the distance from the number of pixels of the captured test pattern (53, 55); a second recording step for recording the test pattern (53, 55) on a second recording medium having an unknown medium thickness; a second imaging step for capturing, at the predetermined size, the test pattern (53, 55) recorded on the second recording medium; and a working gap determining step for determining, based on the number of pixels of the captured test pattern (53, 55) recorded on the second recording medium, and the function, a distance between the recording head and the second recording medium.