Skip to content

Reading it as a document, and what a table actually is - #16

Merged
tannevaled merged 1 commit into
mainfrom
reading-it-as-a-document
Oct 12, 2026
Merged

tannevaled merged 1 commit into
mainfrom
reading-it-as-a-document

Conversation

@tannevaled

Copy link
Copy Markdown
Contributor

go-pdfkit/document v0.1.0 reads a PDF
back as headings, paragraphs, lists and tables, and
extract v0.9.0 gained the table
detector under it. Neither was documented here.

  • new: Reading it as a document — the heading rule, the order headings
    and tables are found in, and how a line joins the one above it.
  • extraction — what a table is, and Lines/Join being exported so that
    the rule reading structure out of a page is the same rule Text uses.

Both pages say what the inference will not do, because that is the part a
reader needs before piping the output anywhere: ruled lines are not read,
multi-column layouts are not read, and a numbered list comes back as a
two-column table.

And both carry the measurements that set their thresholds rather than the
thresholds alone — 588 tables down to 40 on one 213-page document, and the
share of characters that separates a heading size (up to 5.76%) from a second
body size (from 32.6%).

hugo builds clean and the new page renders at
working-with-a-file/as-a-document/.

🤖 Generated with Claude Code

go-pdfkit/document v0.1.0 reads a PDF back as headings, paragraphs, lists and
tables, and extract v0.9.0 gained the table detector under it. Neither was
documented here.

Both pages say what the inference will NOT do, because that is the part a
reader needs before piping the output anywhere: ruled lines are not read,
multi-column layouts are not read, and a numbered list comes back as a
two-column table.

And both carry the measurements that set their thresholds rather than the
thresholds alone -- 588 tables down to 40 on one 213-page document, and the
share of characters that separates a heading size (up to 5.76%) from a second
body size (from 32.6%).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@tannevaled
tannevaled merged commit 9c6316f into main Oct 12, 2026
2 checks passed
@tannevaled
tannevaled deleted the reading-it-as-a-document branch October 12, 2026 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant