1. A method, comprising: capturing image data using a mobile device, the image data depicting a digital representation of a document; defining, based on the image data, a plurality of candidate edge points corresponding to the document; defining four sides of a tetragon based on at least some of the plurality of candidate edge points; determining a plurality of fields within the tetragon; for each field, determining at least a field location and a field data type; associating each determined field location with each field data type to generate a plurality of metadata labels; and associating the plurality of metadata labels with an image of an electronic form.