1. An image forming apparatus that changes image data into document data comprising: a character recognition unit configured to recognize a character from the image data; a font matching unit configured to perform matching so as to determine which of a plurality of fonts and a plurality of character sizes correspond to the recognized character; and a character attribute data setting unit configured to set, in the document data, a font and a character size based on the matching by the font matching unit, the character attribute data setting unit being further configured to set an origin of drawing, a character width, and a side bearing as a drawing position of the character so that the origin of drawing, the character width, and the side bearing correspond to the image data.