Python 表格字体未展开错误

Python 表格字体未展开错误,python,pdf,tabula,Python,Pdf,Tabula,PDF文件内容是中文(字符,而不是图片等),因此可能会使用不同的字体。 我的代码: 错误: Feb 02, 2018 6:44:34 PM org.apache.pdfbox.pdmodel.font.PDCIDFontType2 <init> INFO: OpenType Layout tables used in font ABCDEE+ËÎÌå are not implemented in PDFBox and will be ignored 2018年2月2日下午6:44:

PDF文件内容是中文(字符,而不是图片等),因此可能会使用不同的字体。 我的代码:

错误:

Feb 02, 2018 6:44:34 PM org.apache.pdfbox.pdmodel.font.PDCIDFontType2 <init>
INFO: OpenType Layout tables used in font ABCDEE+ËÎÌå are not implemented in PDFBox and will be ignored
2018年2月2日下午6:44:34 org.apache.pdfbox.pdmodel.font.PDCIDFontType2
信息:字体ABCDEE+ËÎÌå中使用的OpenType布局表未在PDFBox中实现,将被忽略
最后的数据帧为空

我从stackoverflow中找不到任何想法。
我如何解决这个问题?我应该导入一些字体吗?或者,这个错误是由其他原因引起的?

我感觉到了你的痛苦。但是,我在数据帧(df)中获取数据的步骤与您的步骤类似。要进行故障排除,请查看返回的df类型:

import tabula

pdf_file_name = "my_filename.pdf"
df = tabula.read_pdf(pdf_file_name,
                     encoding='Ansi') # or encoding='utf-8'

print(type(df))
# df.to_csv("output.csv", index=False)
很有可能,由于您有pages=“all”,您的df是df的列表,这需要您查看列表中的每个df以查看数据的证据

此外,如果tabla.read\u pdf的multiple\u tables参数设置为True,则df将是df的列表,同样,这也要求您查看列表中的每个df以查看您的数据。

与“OpenType Layout”消息无关,它用于创建pdf。你应该分享PDF。
import tabula

pdf_file_name = "my_filename.pdf"
df = tabula.read_pdf(pdf_file_name,
                     encoding='Ansi') # or encoding='utf-8'

print(type(df))
# df.to_csv("output.csv", index=False)