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.
27. The non-transitory The storage device of claim 19 , wherein classifying the document as belonging to the document class of the set of document classes further includes classifying the document into a graphical-only document, a text-only document, or a combination text and graphical document.