1. A method comprising: receiving, by a processor, data representing an image of text, and data representing the text in non-image form; determining, by the processor, a valid content boundary within the image of the text; for each character of a plurality of characters within the text in the non-image form, determining, by the processor, a location of the character within the image of the text; where the location of the character within the image of the text falls outside the valid content boundary, removing the character from the data representing the text in the non-image form, by the processor.