1. A computer-implemented method comprising: selecting document layer data for encoding, wherein the document layer data comprises document meta-data associated with an electronic document; encoding the selected document layer data in a machine-readable format for at least one page of the electronic document; determining the amount of space available on the at least one page to print the machine-readable encoding corresponding to layer data associated with the at least one page of the document; and printing the contents of the at least one page of the document with its associated machine-readable encoding of document layer data, if space is available on the page to print the machine-readable encoding; and printing the machine-readable encoding of document layer data separately, if space available on the page is not sufficient to print the machine-readable encoding.