1. An image forming apparatus comprising: a scanner that obtains an image file by document scanning; a character recognition processor that obtains a text string from each line of text by performing character recognition on the image file, the image file being obtained by the scanner; a text string splitter that splits each the text string into a plurality of short text strings in accordance with a predetermined rule, the each text string being obtained from each line of text by the character recognition processor; a font size determining portion that determines a uniform font size for each the text string, the each text string being obtained from each line of text by the character recognition processor; a position determining portion that determines x-axis positions for the short text strings to be embedded in the image file, on the basis of the x-coordinates of the characters at the forefront in the respective short text strings, the short text strings each having its x-axis in the forward and backward reading directions; and an embedding portion that embeds text data of the short text strings in the image file at the respective x-axis positions in the uniform font size for the entire text string, the x-axis positions being determined by the position determining portion, the uniform font size being determined by the font size determining portion.