Hello I am trying to extract text from pdf. I am using PyPDF2. It works right but there are messages says Superfluous whitespace found in object header b'60' b'0' in the terminal.
My Code Below:
pdfFile = open(filePath, 'rb')
pdfReader = ppdf.PdfFileReader(pdfFile)
for pageIndex in range(pdfReader.numPages):
page = pdfReader.pages[pageIndex]
words = page.extract_text(0).split()
for word in words:
main_text.append(word)
# print(main_text)
I were using print(main_text) and I thought that was the source of problem. But I removed it and I still get this annoying message in the terminal. Is there a way to prevent it?
Superfluous whitespace found in object header b'36' b'0'
Superfluous whitespace found in object header b'47' b'0'
Superfluous whitespace found in object header b'50' b'0'
Superfluous whitespace found in object header b'53' b'0'
Superfluous whitespace found in object header b'56' b'0'