1. A printer comprising: a feed mechanism for feeding a substrate past a printhead assembly, said substrate having a surface bearing a pre-printed graphic image; a printhead assembly comprising: a printhead for printing a position-coding pattern onto said surface, said position-coding pattern identifying an impression identity and a plurality of positions; and a scanhead for scanning the pre-printed graphic image; an ink supply containing an ink for printing the position-coding pattern; and a processor configured for generating association data, said association data indicating an association between a scanned graphic image, the impression identity and the plurality of positions, wherein said impression identity is initially unassociated with said pre-printed graphic image.