从PDF提取表格数据 [英] Extract table data from PDF

查看:86
本文介绍了从PDF提取表格数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否存在从PDF文件提取表格的一致方法?有什么工具吗?

Is there any consistent way to extract tables from PDF files? Any tools?

我到目前为止所做的事情:

  • 我已经尝试过pdftotext工具.它具有转换为HTML布局的选项.
  • I have tried out pdftotext tool. It has an option to convert to HTML layout.

这是什么问题:

  • 表信息未保留在HTML输出中
  • 我期望使用<table>标签,但所有内容都在<p>标签下.
  • The table information is not preserved in HTML output
  • I expected <table> tags, but everything was under <p> tags.

PDF文档中是否会有任何标记来指示表格结构?像HTML中的<table><tr><td>一样?

Will there be any markers in a PDF document to indicate table structures? Like <table>, <tr> and <td> in HTML?

如果为是",则对此的任何指示都将有所帮助.如果为否",则有关此事实的明确信息也将有所帮助.

If "yes", any pointers to this would be helpful. If "no", a definite info about this fact is also helpful.

推荐答案

如果PDF文档丢失了将内容标记为表,行,单元格等的信息(称为标签),则没有一致的方法来提取表从PDF文档.通常,PDF文档不包含这些标签.这些标签通常用于使PDF易于访问,以便例如可以大声读取.要使PDF有效,就不需要这些标签.

If the PDF document misses information that marks content as table, row, cell, etc. (known as tags), then there is no consistent way to extract tables from the PDF document. Mostly, PDF documents do not contain these tags. These tags typically serve to make a PDF accessible so that it can for example be read aloud. These tags are not required for a PDF to be valid.

这篇关于从PDF提取表格数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆