You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For the file table.py in marker/tables/table.py , in the function format_tables(doc,pages: List[Page]):
The original code table_insert_points[table_idx] = max(0, block_idx - len( blocks_to_remove)) # Where to insert the new table
The code below used to record the positions of the table blocks. blocks_to_remove, here means the other kind of blocks except table block. table_insert_points[table_idx] is used to record the where the table should be insert as follow:
When there is more than 1 table in the same pdf page. the index of the table should consider the previous tables in the same page inserted already.
The new code should be like this, in this way all the tables in the same page are in the correct order.
table_insert_points[table_idx] = max(0, block_idx - len( blocks_to_remove)+table_idx) # Where to insert the new table
The text was updated successfully, but these errors were encountered:
zhouxy-maker
changed the title
table in wrong position if
Table in wrong position if there is more than one table in the same page
Nov 14, 2024
For the file
table.py
in marker/tables/table.py , in the functionformat_tables(doc,pages: List[Page]):
The original code
table_insert_points[table_idx] = max(0, block_idx - len( blocks_to_remove)) # Where to insert the new table
The code below used to record the positions of the table blocks.
blocks_to_remove
, here means the other kind of blocks except table block.table_insert_points[table_idx]
is used to record the where the table should be insert as follow:When there is more than 1 table in the same pdf page. the index of the table should consider the previous tables in the same page inserted already.
The new code should be like this, in this way all the tables in the same page are in the correct order.
The text was updated successfully, but these errors were encountered: