How extract extract specific text from pdf file - python
问题 I am trying to extract this text: DLA LAND AND MARITIME ACTIVE DEVICES DIVISION PO BOX 3990 COLUMBUS OH 43218-3990 USA Name: Desmond Forshey Buyer Code:PMCMTA9 Tel: 614-692-6154 Fax: 614-692-6930 Email: Desmond.Forshey@dla.mil from this pdf file. I was able to extract some text between two references using the code below: import PyPDF2 pdfFileObj = open('SPE7M518T446E.pdf', 'rb') pdfReader = PyPDF2.PdfFileReader(pdfFileObj) print(pdfReader.numPages) pageObj1 = pdfReader.getPage(0) pagecontent