1. A document processing device, comprising: an extraction unit that extracts a first image of an element from a read image of a medium to which the element is affixed; an accepting unit that accepts first information for specifying processing to be performed to a document, the first information being to be associated with the first image of the element; a determination unit that determines whether an image of an element identical to or similar to the first image of the element has been registered in a memory, or not; and a registration unit that registers the first image of the element and the first information for specifying the processing in association with each other in the memory when the determination unit determines that the image of the element identical to or similar to the first image of the element has not been registered in the memory.