Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

extract text from a pdf python

# pip3 install pdfplumber
import pdfplumber

# a single page
with pdfplumber.open(r'test.pdf') as pdf:
    first_page = pdf.pages[-0]
    print(first_page.extract_text())

# for every page
# with pdfplumber.open(r'test.pdf') as pdf:
#     for pages in pdf.pages:
#         print(pages.extract_text())
 
PREVIOUS NEXT
Tagged: #extract #text #pdf #python
ADD COMMENT
Topic
Name
7+5 =