Method for generating a print image composed of sections on a printing material by means of two inkjet print heads, wherein the print image is composed in the y direction of a first print image section and a second print image section essentially at a y coordinate Y1 and wherein a first print head (3 a) generates the first section and a second print head generates the second section, comprising the steps of - selecting a data strip extending in the x direction and of a width DY about the location Y1 in the data of the print image, - examining the data of the print image in the selected strip to find whether a data patch of an extension dx in the x direction and dy in the y direction is present in which edge detection is possible, - selecting the data patch and establishing the x coordinate x1 and the y coordinate y1 of the data patch, - generating the print image (2, 2a, 2b), - recording an image of a measurement patch correlating with the data patch on the printing material by means of a camera, the image being recorded at a location x1, y1 and at least having a size dx * dy, - implementing edge detection in the data of the image of the measurement patch, and - correcting the y position of at least one of the two print heads (3a, 3b) in the case of a detected edge, wherein in the examination of the data of the print image the data is examined to find whether the data patch has a homogeneous color density or wherein in the examination of the data of the print image the data is examined to find whether the data patch has no or only a slight to medium gradation of the color density or the respective grey value, in particular a gradation to which applies: the gradient of the color density gradation or of the respective grey value gradation of the print image in the patch is between approximately 0 and approximately 0.5, preferably between approximately 0.05 and approximately 0.25 and particularly preferably at approximately 0.1. - selecting a data strip extending in the x direction and of a width DY about the location Y1 in the data of the print image, - examining the data of the print image in the selected strip to find whether a data patch of an extension dx in the x direction and dy in the y direction is present in which edge detection is possible, - selecting the data patch and establishing the x coordinate x1 and the y coordinate y1 of the data patch, - generating the print image (2, 2a, 2b), - recording an image of a measurement patch correlating with the data patch on the printing material by means of a camera, the image being recorded at a location x1, y1 and at least having a size dx * dy, - implementing edge detection in the data of the image of the measurement patch, and - correcting the y position of at least one of the two print heads (3a, 3b) in the case of a detected edge, wherein in the examination of the data of the print image the data is examined to find whether the data patch has a homogeneous color density or wherein in the examination of the data of the print image the data is examined to find whether the data patch has no or only a slight to medium gradation of the color density or the respective grey value, in particular a gradation to which applies: the gradient of the color density gradation or of the respective grey value gradation of the print image in the patch is between approximately 0 and approximately 0.5, preferably between approximately 0.05 and approximately 0.25 and particularly preferably at approximately 0.1.