1. A method, comprising: at a computer system having one or more processors and memory: receiving an electronic document that includes one or more scanned images of a physical document, wherein the one or more scanned images include one or more optical machine-readable codes; extracting a first set of document information from at least a subset of the one or more optical machine readable codes; after extracting the first set of document information from at least the subset of the one or more optical machine readable codes, automatically, without human intervention, transmitting a query generated based on the first set of document information to a server requesting a second set of document information, wherein the second set of document information is stored in a pre-existing database by the server; in response to the query, retrieving, from the server, the second set of document information, wherein the second set of document information is distinct from the first set of document information; storing at least (A) the extracted first set of document information and (B) the retrieved second set of document information as metadata in the electronic document; wherein: the electronic document comprises a first portion and a second portion; the first portion is configured to be displayed in a document image viewer but not in a document data viewer, the first portion including the one or more images of the physical document, wherein a first image of the one or more images corresponds to a page of the physical document and includes at least one of the one or more optical machine-readable codes and at least one of a subset of the first set of document information and a subset of the second set of document information that can be read by users; the second portion is configured to be displayed in the document data viewer but not in the document image viewer; and the subset of document information is stored in the second portion of the scanned image of the document and providing the electronic document to a combined viewer for concurrent display of the first portion and the second portion, wherein the combined viewer includes the document image viewer and the document data viewer.