1. A device comprising: a setting component configured to set a density of a barcode; a synthesizing component configured to synthesize, with document information, the barcode having a density set by the setting component; and an outputting component configured to output an image synthesized by the synthesizing component, wherein, when a density of the document information is higher than a first threshold value, the setting component increases the density of the barcode, and when the density of the document information is lower than the first threshold value, the setting component decreases the density of the barcode, and wherein at least part of the barcode is printed at a position that overlaps a position at which content printed based on the document information is printed.