0

I had inserted the file to database using blob manually. While I am retrieving it I am getting it in binary form.

import MySQLdb,os
db = MySQLdb.connect('localhost', 'root', 'root', 'databaseName')
cursor = db.cursor()
cursor.execute ("select resume from empinfo where eid=1")
d=cursor.fetchall()
print d 

Can anyone please help?

usha spandana
  • 37
  • 1
  • 6
  • You have it in binary form. How is that not what you wanted? What form do you want instead? An uncompressed PDF document so you can read the individual draw instructions? Or just the text portion of the document, without all the formatting? Or do you want it in a file instead of in memory? – MvG Jul 25 '16 at 11:15
  • I need to get the text from that pdf and perform operaions such as split and converting it into lowers. – usha spandana Jul 25 '16 at 12:42
  • So the fact that the file originates in MySQL is irrelevant here, and you are looking for a way to turn PDF into text. There are tools for that, like e.g. `pdftotext`. Generally tool requests are not considered on-topic on SO, but this particular question has been answered [here](http://stackoverflow.com/q/6187250/1468366). Currently it looks as though your question is essentially a duplicate (or rather a subset) of that one. Otherwise [software recommendations](http://softwarerecs.stackexchange.com/q/18728/1304) SE would be a better fit, in my opinion. – MvG Jul 25 '16 at 12:58

0 Answers0