我有一个简单的 python 程序,它接收 pdf(带有表格)并使用 tabula 将数据保存到 csv 文件中:import tabulaif __name__ == '__main__':path = input('Filename: ')pathSegments = path.split('/')folder = ''i = 0while i < len(pathSegments)-1: folder += '/' + pathSegments[i] i += 1name = pathSegments[len(pathSegments)-1].split('.')[0]dest = folder + '/' + name + '.csv'print(dest)tabula.convert_into(path, dest, pages = "all", output_format = "csv")我尝试了多种不同的 pdf,例如一张带有下图的 pdf:然而,结果始终是一个空的 csv 文件,tabula 似乎无法识别表格
添加回答
举报
0/150
提交
取消