Advertisement
NubeColectiva

Como Extraer Texto de un PDF con Python

Apr 4th, 2023
917
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.23 KB | None | 0 0
  1. import pdfplumber as pp
  2.  
  3. with pp.open('file.pdf') as book:
  4.     for page_no, page in enumerate(book.pages, start=1):
  5.         print(f'{page_no = }')
  6.         data = page.extract_text()
  7.         print(data.strip())
  8.         print('-'*45)
Tags: python pdf
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement