Repository navigation
Conversation
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
Merge main's metadata-provenance, OCR, and reading-order changes into snails while preserving its tagged-PDF outlines and labeled document-date normalization. Keep existing Creator and Producer values, creation timestamps, unrelated keywords, structure trees, content bytes, and inline spans. Add regression coverage and a focused CI workflow for both behaviors. Co-authored-by: John Wooten <noreply@wooten.link> Co-authored-by: Codex <noreply@openai.com> Co-authored-by: Codex Web <noreply@openai.com>
Compare Dublin Core language values as a set because recent pikepdf versions return a set for rdf:Bag properties. Preserve the exact expected en-US value while allowing the metadata and preserved-text regression jobs to complete. Co-authored-by: Codex Web <noreply@openai.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.
PDFs can retain selectable, tagged text yet have no document outline for section navigation. In the existing-text preservation path, use
pdfminerlayout extraction to recognize isolated, centered, title-like lines and create page-targeted H2/H3 bookmarks only when the PDF already has a structure tree and no outline. Promote existing/Pelements to/H2or/H3where their marked-content text exactly matches a recognized heading, preserving page content streams, marked-content IDs (MCIDs), and nested/Spanformatting. Recognition is heuristic and deliberately limited to conservative layouts.The PDF Association's bookmark guidance distinguishes navigable outlines from the text printed on the page. Unlike the
--retagtext-structure reconstruction introduced in #4, this path adds navigation to existing tagged content without rebuilding its text stream.Separately, normalize valid
Date: YYYY-MM-DDtokens found in PDF Info/Keywords, XMPpdf:Keywords, or Dublin Coredc:subject. Remove those labeled tokens from keywords and add unique values todc:date, preserving other keywords, previously recordeddc:datevalues, and the independent PDF/CreationDate. Unlabeled or invalid dates are left alone. Adobe's Dublin Core namespace definition identifiesdc:dateas a resource-lifecycle date anddc:subjectas a keyword field; this targeted normalization complements the broader metadata crosswalk merged in #6.Regression tests cover bookmark generation without changed page-content bytes, promotion of a mixed-style italic heading without losing inline spans, and date extraction while preserving ordinary keywords and the creation timestamp. These tests were added but not run in this drafting session. The branch is four commits ahead and three behind the current
main; the newer tagging and metadata changes overlap these modules, so post-integration behavior is not yet verified.