Repository navigation
The pages read back as a document: pdf-to-markdown and prepare-pdf-for-ai - #111
Merged
Merged
Conversation
…r-ai parity 75.4% (86/114), pasted from the tool's own output. One verb for both, because they are the same thing twice over: BentoPDF's prepare-pdf-for-ai is per-page MARKDOWN with the document's metadata beside it -- PyMuPDF4LLM's LlamaMarkdownReader -- which is `pdfops markdown -json`, and pdf-to-markdown is the same reading written out as one document. What is claimed is the INFERENCE, not a conversion. A PDF has no headings, and go-pdfkit/document publishes what it will and will not see: ruled lines and multi-column layouts are not read, and that bound is in its README rather than buried. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Claimed through
pdfops markdowningo-pdfkit/ops v0.18.0 over
go-pdfkit/document v0.1.0, a new
repository.
One verb for both, because they are the same thing twice over
BentoPDF's
prepare-pdf-for-aiis per-page Markdown with the document'smetadata beside it — that is what PyMuPDF4LLM's
LlamaMarkdownReaderproduces— which is
pdfops markdown -json.pdf-to-markdownis the same readingwritten out as one document.
⛔ What is claimed is the inference, not a conversion
A PDF has no headings. It has instructions for drawing glyphs at places, and
everything above that is a judgement.
go-pdfkit/documentpublishes whichjudgements it makes and which it refuses — ruled lines and multi-column
layouts are not read — and that bound is in its README rather than buried.
The rule for a heading was measured rather than guessed: over six real
documents, the share of characters at each size above that document's body
size separates heading sizes (0.01%–5.76%) from second body sizes
(32.6%–39.4%). Taking "larger than the body" alone gave a 9-page report 131
headings, 130 of which were paragraphs.
🤖 Generated with Claude Code