import pdfplumber with pdfplumber.open("NIlesh_Hanotia_AI.pdf") as pdf: text = "\n".join(page.extract_text() or "" for page in pdf.pages) with open("resume_text.txt", "w", encoding="utf-8") as f: f.write(text) print("resume_text.txt saved!") print(f"Total characters: {len(text)}")