import requests
import pdfplumber
from io import BytesIO
# URL of the PDF file
url = 'https://askyourpdfs.com/media/pdfs/Resume_Momin_Python.pdf'
# Send a GET request
response = requests.get(url)
# Check if the request was successful
if response.status_code == 200:
# Convert response content to a file-like object
with BytesIO(response.content) as open_pdf_file:
# Open the PDF file with pdfplumber
with pdfplumber.open(open_pdf_file) as pdf:
# Loop through each page
for page in pdf.pages:
# Extract text from the current page
text = page.extract_text()
print(text)
else:
print("Failed to retrieve PDF")