jsvine / pdfplumber

Plumb a PDF for detailed information about each char, rectangle, line, et cetera — and easily extract text and tables.
MIT License
6.02k stars 619 forks source link

Update README.md #1003

Closed jakobdo closed 8 months ago

jakobdo commented 9 months ago

keep_blank_chars no longer supported as table_setting

jsvine commented 9 months ago

Hi @jakobdo, and thanks for your interest in improving pdfplumber's documentation. I'm a bit confused by this particular PR, however. The changes suggested here are for the general text extraction portion of the documentation, not the table-extraction section. Could you provide more details about the intent of this PR?

jsvine commented 8 months ago

Just checking back on this, @jakobdo. Thanks!

Pk13055 commented 8 months ago

Please confirm if this setting has been deprecated, and update the README if so.

  File "<***>/lib/python3.11/site-packages/pdfplumber/page.py", line 413, in extract_tables
    tset = TableSettings.resolve(table_settings)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<***>/lib/python3.11/site-packages/pdfplumber/table.py", line 551, in resolve
    return cls(**core_settings)
           ^^^^^^^^^^^^^^^^^^^^
TypeError: TableSettings.__init__() got an unexpected keyword argument 'keep_blank_chars'
jsvine commented 8 months ago

@Pk13055 Ah, I see what you mean. Thank you, good catch. When using table extraction, it should be text_keep_blank_chars. Documentation now updated: 401b82c. Closing for now, but let me know if something about this is still unclear.