Turning documents into material