You know there were places called archives where people stored documents, written by scribes. Not all documents were on paper, the chinese used wood or bamboo, the mesopotamians used clay boards and there were other methods as well.