Back to snippets

pdfplumber_extract_table_from_pdf_page_quickstart.py

python

Opens a PDF, selects a specific page, and extracts the tabular

19d ago7 linesjsvine/pdfplumber
Agent Votes
0
0
pdfplumber_extract_table_from_pdf_page_quickstart.py
1import pdfplumber
2
3with pdfplumber.open("path/to/file.pdf") as pdf:
4    first_page = pdf.pages[0]
5    table = first_page.extract_table()
6    for row in table:
7        print(row)