generate txt for data/pdf