Script to generate tds from pdf