0

I want to extract text from this link. Here the pdf is rotated and I'm getting a blank response or empty string when i try to rotate it and extract and even if i simply try to extract text then also I'm getting blank response/ empty string. Please suggest what could be done so that i can extract the text without saving the file on my system.

import requests
import PyPDF2
from io import BytesIO

pdf_resp = requests.Session().get("https://www.mbmc.gov.in/master_c/download_file/63161")
pdf_file_obj = BytesIO(pdf_resp.content)
pdf_table_text = PyPDF2.PdfFileReader(pdf_file_obj).getPage(0).rotateClockwise(90).extractText()
techwreck
  • 53
  • 1
  • 12

0 Answers0