19. A non-transitory storage device having instructions for classifying a document image based on its content stored thereon that, when executed by data processing apparatus, cause the data processing apparatus to perform operations comprising: accessing a set of features stored in memory; analyzing the document image to determine blocks layout; recognizing the document image to obtain digital content data representing text content or the potential graphical content; calculating, based on one or more features from the set of features accessed in the memory, feature values of the document image for the one or more features from the set of features, wherein the feature values are based on the digital content data and the blocks layout; and classifying the document image as belonging to a document class from a set of document classes based on the calculated feature values.
19. A non-transitory storage device having instructions for classifying a document image based on its content stored thereon that, when executed by data processing apparatus, cause the data processing apparatus to perform operations comprising: accessing a set of features stored in memory; analyzing the document image to determine blocks layout; recognizing the document image to obtain digital content data representing text content or the potential graphical content; calculating, based on one or more features from the set of features accessed in the memory, feature values of the document image for the one or more features from the set of features, wherein the feature values are based on the digital content data and the blocks layout; and classifying the document image as belonging to a document class from a set of document classes based on the calculated feature values. 26. The non-transitory storage device of claim 19 , wherein accessing the set of features includes accessing a library of at least one of: relative spatial positioning of text content, a frequency of word occurrence, an amount of numbers in an image, an amount of lexicalized words on a page, an amount of present barcodes, an amount of vertical/horizontal separators, a ratio of objects in the page, a vertical text orientation, at least one key word, and a location of an object within the image, as at least one of the set of features.