Skip to content

get table names #2735

Discussion options

You must be logged in to vote

thanks, any suggestion on how to identify the text in table neighbourhood(right before/after the table)?

Not really failsafe ones. Maybe you try rectangle extractions above and below the table bbox.
Like if tbbox is the table bbox create a rectangle above for some height h like this: ubbox = fitz.Rect(tbbox.x0, tbbox.y0 - h, tbbox.x1, tbbox.y0). Then extract the text in there: caption = page.get_textbox(ubbox) and see how far this takes you.

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by poojitharamachandra
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
enhancement wontfix no intention to resolve
2 participants
Converted from issue

This discussion was converted from issue #2732 on October 11, 2023 13:16.