Convert PDF to text or read line by line as JSON