1. A method comprising: receiving a first template document, wherein the first template document comprises a first plurality of objects; receiving a reference document, wherein the reference document comprises second a plurality of objects; identifying the first plurality of objects in the first template document; identifying the second plurality of objects in the reference document; identifying a plurality of common objects between the first template document and the reference document; identifying locations of the plurality of common objects in the first template document; identifying one or more distances between the locations of the plurality of common objects in the first template document; identifying locations of the plurality of common objects in the reference document; identifying one or more distances between the locations of the plurality of common objects in the reference document; determining that the one or more distances between the plurality of common objects in the first template document are substantially the same as the one or more distances between the plurality of common objects in the reference document; and in response to determining that the one or more distances between the plurality of common objects in the first template document are substantially the same as the one or more distances between the plurality of common objects in the reference document, grouping the first template document and the reference document as common documents.