0

How make pdfplumber treat right vertical edge of a page as a table vertical line?

I have pdf with cropped right edge, and that cut took away the rightmost vertical line of the table.

banderlog013
  • 2,207
  • 24
  • 33

1 Answers1

-1

One needs to do page.extract_table() with additional parameters, according to documentation:

table_settings = {
    "vertical_strategy": "lines",
    "explicit_vertical_lines": [page.width],  # this thing
}

page.extract_table(table_settings)

page.width stores x coordinate for the rightmost pixel on page

banderlog013
  • 2,207
  • 24
  • 33