How to extract text from a PDF file in Python? How to extract text from a PDF file in Python? python python

How to extract text from a PDF file in Python?


if you are running linux or mac you can use ps2ascii command in your code:

import osinput="someFile.pdf"output="out.txt"os.system(("ps2ascii %s %s") %( input , output))