This two pdf is my subject previous year questions papers and give me the repeted questions in every year in 20 and 15 mark and also give me the each every questions how many time asked and give me all 20 and 15 marks answers please explain everything
python3 << 'EOF' import pdfplumber pdf1 = '/tmp/workspace/attachments/98a6e231-0f5f-49c1-88c8-380e4f3354cb/Lf 2011 to 20224 .pdf' pdf2 = '/tmp/workspace/attachments/98a6e231-0f5f-49c1-88c8-380e4f3354cb/Lf 2020 to 25 .pdf' print("=== PDF 1: Lf 2011 to 2024 ===") with pdfplumber.open(pdf1) as pdf: print(f"Total pages: {len(pdf.pages)}") for i, page in enumerate(pdf.pages[:5]): print(f"\n--- Page {i+1} ---") text = page.extract_text() if text: print(text[:2000]) EOF
python3 << 'EOF' import pdfplumber pdf1 = '/tmp/workspace/attachments/98a6e231-0f5f-49c1-88c8-380e4f3354cb/Lf 2011 to 20224 .pdf' pdf2 = '/tmp/workspace/attachments/98a6e231-0f5f-49c1-88c8-380e4f3354cb/Lf 2020 to 25 .pdf' # Extract all text from PDF1 print("=== Extracting PDF1 pages 6-25 ===") with pdfplumber.open(pdf1) as pdf: for i, page in enumerate(pdf.pages[5:], start=6): print(f"\n--- Page {i} ---") text = page.extract_text() if text: print(text[:3000]) else: print("[No text extracted]") EOF
python3 << 'EOF' import pdfplumber pdf2 = '/tmp/workspace/attachments/98a6e231-0f5f-49c1-88c8-380e4f3354cb/Lf 2020 to 25 .pdf' print("=== PDF 2: Lf 2020 to 25 ===") with pdfplumber.open(pdf2) as pdf: print(f"Total pages: {len(pdf.pages)}") for i, page in enumerate(pdf.pages): print(f"\n--- Page {i+1} ---") text = page.extract_text() if text: print(text[:3000]) else: print("[No text extracted]") EOF