You can use PDFMiner which is a Python module for converting PDF to text. You can use the below code to check the version of pdfminer.
You can also use the pyPDF which also works fine. If you only want the text with spaces, you can use the following piece of code:-
pdf = pyPdf.PdfFileReader(open(filename, "rb"))
for page in pdf.pages: