Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何使用python在pdf文件中查找发票表的区域坐标?我目前正在使用 camelot 或 tabula 从 pdf 文件中提取表格。但是我想知道是否有办法提取每个表格的区域坐标,以便我可以相应地自定义
在 Camelot 中,表格坐标在表格属性中指定_bbox。
_bbox
例子:
import camelot tables=camelot.read_pdf('your_doc.pdf', pages='1-end') for i,table in enumerate(tables): print(f'table id: {i}') print(f'page: {table.page}') print(f'coordinates: {table._bbox}')