Extract the logical structure of text from PDF/XML files