Document controller