1. A method for processing electronic documents, comprising the steps of: receiving as input an electronic document, wherein at least a portion of the electronic document is raster-based; extracting form information from text portions and non-text portions of the electronic document; and generating a structured document representing the extracted form information for the electronic document based on a predefined document type definition.