A method for producing a document (500, 700) having a document body and a visually imperceptible security feature connected to the document body, said method comprising: - providing an inkjet printer which includes at least a first tank containing a dye-based ink and a second tank containing a pigment-based ink, wherein the absorption spectrum of the dye-based ink and the absorption spectrum of the pigment-based ink are so similar to one another that an inkjet print with the dye-based ink and an inkjet print with the pigment-based ink are indistinguishable to the human eye under illumination by light in the visible spectral range, wherein the inkjet printer includes at least also a third tank containing a further dye-based ink and a fourth tank containing a further pigment-based ink, wherein the absorption spectrum of the further dye-based ink and the absorption spectrum of the further pigment-based ink are so similar to one another that this further dye-based ink, under illumination by light in the visible spectral range, is chromatically indistinguishable by the human eye from the further pigment-based ink but is chromatically distinguishable from the inks in the first and second tank; - providing a digital graphical pattern which is formed from one or more first areas (408.1, 408.2) and one or more second areas (406.1, 406.2); and - providing a further digital graphical pattern containing one or more third areas and one or more fourth areas; - providing a digital image to be connected to the document; - superimposing the graphical pattern and the digital image; - superimposing the further graphical pattern and the digital image; - printing the digital image onto the or into the document body by means of the inkjet printer in such a way that the dye-based ink, but not the pigment-based ink is used for printing the regions (414.1, 414.2) of the digital image superimposed with the first areas, and in such a way that the pigment-based ink, but not the dye-based ink is used for printing the regions (412.1, 412.2) of the digital image superimposed with the second areas, wherein the printing is performed such that the further dye-based ink, but not the further pigment-based ink is used for printing the regions of the digital image superimposed with the third areas, and such that the further pigment-based ink, but not the further dye-based ink is used for printing the regions of the digital image superimposed with the fourth areas, wherein the distribution of the dye-based ink, the pigment-based ink, the further dye-based ink and the further pigment-based ink in the printed image is the security feature. - providing an inkjet printer which includes at least a first tank containing a dye-based ink and a second tank containing a pigment-based ink, wherein the absorption spectrum of the dye-based ink and the absorption spectrum of the pigment-based ink are so similar to one another that an inkjet print with the dye-based ink and an inkjet print with the pigment-based ink are indistinguishable to the human eye under illumination by light in the visible spectral range, wherein the inkjet printer includes at least also a third tank containing a further dye-based ink and a fourth tank containing a further pigment-based ink, wherein the absorption spectrum of the further dye-based ink and the absorption spectrum of the further pigment-based ink are so similar to one another that this further dye-based ink, under illumination by light in the visible spectral range, is chromatically indistinguishable by the human eye from the further pigment-based ink but is chromatically distinguishable from the inks in the first and second tank; - providing a digital graphical pattern which is formed from one or more first areas (408.1, 408.2) and one or more second areas (406.1, 406.2); and - providing a further digital graphical pattern containing one or more third areas and one or more fourth areas; - providing a digital image to be connected to the document; - superimposing the graphical pattern and the digital image; - superimposing the further graphical pattern and the digital image; - printing the digital image onto the or into the document body by means of the inkjet printer in such a way that the dye-based ink, but not the pigment-based ink is used for printing the regions (414.1, 414.2) of the digital image superimposed with the first areas, and in such a way that the pigment-based ink, but not the dye-based ink is used for printing the regions (412.1, 412.2) of the digital image superimposed with the second areas, wherein the printing is performed such that the further dye-based ink, but not the further pigment-based ink is used for printing the regions of the digital image superimposed with the third areas, and such that the further pigment-based ink, but not the further dye-based ink is used for printing the regions of the digital image superimposed with the fourth areas, wherein the distribution of the dye-based ink, the pigment-based ink, the further dye-based ink and the further pigment-based ink in the printed image is the security feature.