Closed juzj closed 1 year ago
The current version is 0.8.0
response = requests.get(url) pdf_data = response.content
with pdfplumber.load(pdf_data) as pdf:
for page in pdf.pages: # 提取页面中的表格信息 tables = page.extract_tables() # 打印表格内容 for table in tables: print(table)
Hi @juzj, .load(...) was deprecated in 0.5.23 and removed in 0.6.0 (see here). You'll want to use .open(...) instead.
.load(...)
0.5.23
0.6.0
.open(...)
The current version is 0.8.0
response = requests.get(url) pdf_data = response.content
使用pdfplumber打开PDF文件
with pdfplumber.load(pdf_data) as pdf:
遍历PDF中的所有页面