python-阅读pdf文件
1、读取第一页的所有文字句文字
import pdfplumber as ppp
book=ppp.open("J:/mypdfbook.pdf")
line =book.pages[1].chars
for i in line:
print(i["text"],end="")
2、读取所有文字填写到txt文件中【留言如何排版】
import pdfplumber as ppp
book=ppp.open("J:/mypdfbook.pdf")
create=open("J:/txt.tx
原创
2021-10-31 11:12:49 ·
106 阅读 ·
0 评论