A method for determining a working gap (WG), comprising: a first recording step (S101) for ejecting ink from a recording head onto a first recording medium (W1) having a known medium thickness to record a test pattern ; a first imaging step (S102) for capturing the test pattern recorded on the first recording medium (W1) in each of a state where a distance between the recording head and the first recording medium (W1) is a first distance (WG1), and a state where a distance between the recording head and the first recording medium (W1) is a second distance (WG2); wherein, at the first distance (WG1), the test pattern 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 (W1) and the recording head from the first distance (WG1) to the second distance (WG2); 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 are mounted, a function calculating step (S103) for calculating, based on the number of pixels (NP1) of the test pattern captured at the first distance (WG1) and the number of pixels (NP2) of the test pattern captured at the second distance (WG2), a function (WN) to determine the distance from the number of pixels of the captured test pattern ; a second recording step (S104) for recording the test pattern on a second recording medium (W2) having an unknown medium thickness; a second imaging step (S105) for capturing, at the predetermined size, the test pattern recorded on the second recording medium (W2); and a working gap (WG) determining step for determining, based on the number of pixels (NP3) of the captured test pattern recorded on the second recording medium (W2), and the function (WN), a distance (WG3) between the recording head and the second recording medium (W2). a first recording step (S101) for ejecting ink from a recording head onto a first recording medium (W1) having a known medium thickness to record a test pattern ; a first imaging step (S102) for capturing the test pattern recorded on the first recording medium (W1) in each of a state where a distance between the recording head and the first recording medium (W1) is a first distance (WG1), and a state where a distance between the recording head and the first recording medium (W1) is a second distance (WG2); wherein, at the first distance (WG1), the test pattern 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 (W1) and the recording head from the first distance (WG1) to the second distance (WG2); 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 are mounted, a function calculating step (S103) for calculating, based on the number of pixels (NP1) of the test pattern captured at the first distance (WG1) and the number of pixels (NP2) of the test pattern captured at the second distance (WG2), a function (WN) to determine the distance from the number of pixels of the captured test pattern ; a second recording step (S104) for recording the test pattern on a second recording medium (W2) having an unknown medium thickness; a second imaging step (S105) for capturing, at the predetermined size, the test pattern recorded on the second recording medium (W2); and a working gap (WG) determining step for determining, based on the number of pixels (NP3) of the captured test pattern recorded on the second recording medium (W2), and the function (WN), a distance (WG3) between the recording head and the second recording medium (W2). <EOS>