Open liu-guo-jing opened 3 years ago
I don't understand the issue.
If you want table coordinates, you can use table._bbox
I want to get the coordinates of the four joints in each cell of the table. As far as I know, they can be applied in table_areas=[x1,y1,x2,y2]
Did you try my suggestion?
hi, have anyone managed to do this? I need the coordinates of each cell in the table, similar to the camelot.plot(joint) but instead of plotting them, i need them in [x1,y1,x2,y2] for every cell in the table.
@NurielWainstein hey, do you still need to know about this? hope code snippet below would help.
tables = camelot.read_pdf("sample.pdf", "1")
table = tables[0]
for x in table[0].cells:
for y in x:
plt.plot(j.x1, j.y1, "ro")
plt.plot(j.x2, j.y2, "ro")
plt.plot(j.x1, j.y2, "ro")
plt.plot(j.x2, j.y1, "ro")
plt.show()
and this code shows to me as below:
origin table from pdf (written in korean, but wouldn't matter I think):
Describe the bug A clear and concise description of what the bug is.
Steps to reproduce the bug Steps used to install
camelot
:Steps to reproduce the behavior:
Expected behavior A clear and concise description of what you expected to happen.
Code Add the Camelot code snippet that you used.
PDF Add the PDF file that you want to extract tables from.
Screenshots If applicable, add screenshots to help explain your problem.
Environment
Additional context Add any other context about the problem here.