# # code below import PyPDF2 open PDF file
PDF=open (' D: \ \ python test document \ \ \ \ national security knowledge security race of reference question bank. PDF ', 'rb') # with the PyPDF2 PdfFileReader class read PDF document
Pdfreader=PyPDF2. PdfFileReader # (PDF) for the number of pages of PDF file pdfobj=pdfreader. Getpages (0)
X=pdfobj. ExtractText () print (x)
CodePudding user response:
Try all kinds of coding!!!!!!!!!!CodePudding user response:
Check the PDF file under source coding,Can use Mr Pypdf into a PDF file and then open and see if it is garbled,
If it is coding issues that should be able to see out,
CodePudding user response: