如何从pdf文件中提取特定单词并存储到excel中?

2024-09-27 00:15:59 发布

您现在位置:Python中文网/ 问答频道 /正文

我无法从PDF文件中提取特定单词

http://www.careratings.com/upload/CompanyFiles/PR/Reliance%20Capital%20Ltd.-05-18-2019.pdf

import PyPDF2

pdf_file = open('Reliance Capital Ltd.-05-18-2019.pdf', 'rb')

read_pdf = PyPDF2.PdfFileReader(pdf_file)

number_of_pages = read_pdf.getNumPages()

page = read_pdf.getPage(0)

page_content = page.extractText()

print(page_content)

我想提取公司名称,日期和excel格式的第一个表,除了列“金额”,但我不能提取它


Tags: 文件comhttpreadpdfwwwpagecontent

热门问题