René's URL Explorer Experiment


Title: fix(file-parsers): read side-by-side calendar grids one block at a time by waleedlatif1 · Pull Request #8232 · simstudioai/sim · GitHub

Open Graph Title: fix(file-parsers): read side-by-side calendar grids one block at a time by waleedlatif1 · Pull Request #8232 · simstudioai/sim

X Title: fix(file-parsers): read side-by-side calendar grids one block at a time by waleedlatif1 · Pull Request #8232 · simstudioai/sim

Description: Summary pdf.js streams text in draw order. When a page puts grids side by side (e.g. year-at-a-glance calendar months) and the producer draws one row across every grid, extraction came out interleaved — Su Mo … Sa Su Mo … Sa, then 1 2 3 1 2 3 4 … — so no date could be tied back to its month New pdf-layout.ts: groups a page's items into rows, finds bands split by a wide whitespace gutter (1-level XY-cut), and emits each block top to bottom only when all of these hold: every block is a grid cut from one template: same header row near its top (Su Mo Tu We Th Fr Sa), same width and inner column positions the gutter is ≥ 2× any column gap inside the blocks a plain column is allowed only when sparse (a legend); one spanning the band means it's a table the stream actually interleaves the blocks — pages already drawn block by block are untouched Everything else (tables, prose, forms, math) keeps stream order exactly as before; reordered bands are spliced back in at their stream position Layout analysis buffers up to 20k items per page, then falls back to streaming, so pathological pages cost the same as today joinLines treats a reordered block's first line as a paragraph start and no longer rejoins across block boundaries via the wrapped-table-cell lookahead Type of Change Bug fix Testing Unit tests for calendars, legends, account boxes, and the negative cases (evenly spaced tables, label/value lists, wrapped-cell tables, column groups with different shapes, value grids without headers, already block-ordered streams, missing geometry, item cap); end-to-end test through real pdf.js with a pdf-lib calendar. Verified the positive tests fail with the reordering disabled Before/after benchmark on 264 real PDFs (94 from the pinned parser-eval corpus + 170 assorted real-world docs): output byte-identical on 263; the one change is a Fed paper whose three side-by-side balance-sheet boxes now read box by box instead of interleaved. 22 real public calendar PDFs of other layouts (month-per-column, month-per-row) are unchanged Latency: total 22.2s → 22.7s (+2.2%), median 18 → 18 ms, p99 809 → 816 ms Earlier iterations of the heuristic (gutter-only, then structure-only, then header-only) each changed 3–70 real documents for the worse (transposed tables, scrambled equations) — the combined gates above are what got it to zero regressions Precedent: XY-cut / whitespace-gutter projection is the standard rule-based reading-order method (pdftotext, pdfminer layout analysis, PyMuPDF's column-boxes recipe); keeping content-stream order by default matches PyMuPDF, pdfplumber use_text_flow, and pdf.js itself bun run lint, check:audits (49), docs-manifest:check, type-check, file-parser suite (508) all pass Already-indexed documents need a re-sync to pick this up. Markers drawn as filled shapes (not text) are still not recoverable from the text layer. Checklist Code follows project style guidelines Self-reviewed my changes Tests added/updated and passing No new warnings introduced I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA) 🤖 Generated with Claude Code

Open Graph Description: Summary pdf.js streams text in draw order. When a page puts grids side by side (e.g. year-at-a-glance calendar months) and the producer draws one row across every grid, extraction came out interle...

X Description: Summary pdf.js streams text in draw order. When a page puts grids side by side (e.g. year-at-a-glance calendar months) and the producer draws one row across every grid, extraction came out interle...

Opengraph URL: https://github.com/simstudioai/sim/pull/8232

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:8ce6bc4c-f765-5252-0fda-2a3f10c4a5f8
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idE106:B85F4:E4B91E:138DA7D:6AFB5C69
html-safe-nonce2951bb1088b84a341c009475f09f1e5a45366f4e32a8ba140bba7bb44f82e283
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMTA2OkI4NUY0OkU0QjkxRToxMzhEQTdEOjZBRkI1QzY5IiwidmlzaXRvcl9pZCI6IjgwNDM0MTAzMzQ3NzUyMDQ5NjkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac8d7c614b8db38086f3073916580ba6df2d5db90157fc933b3e6756835566c273
hovercard-subject-tagpull_request:4627957518
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/simstudioai/sim/pull/8232/files
twitter:imagehttps://avatars.githubusercontent.com/u/40672544?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/40672544?s=400&v=4
og:image:altSummary pdf.js streams text in draw order. When a page puts grids side by side (e.g. year-at-a-glance calendar months) and the producer draws one row across every grid, extraction came out interle...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Noneea33d13c96d0ff66bd8fa906b193d2213536b78cb06b0c50a4632c58b1418f94
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/simstudioai/sim git https://github.com/simstudioai/sim.git
octolytics-dimension-user_id199344406
octolytics-dimension-user_loginsimstudioai
octolytics-dimension-repository_id912559512
octolytics-dimension-repository_nwosimstudioai/sim
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id912559512
octolytics-dimension-repository_network_root_nwosimstudioai/sim
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release59ef97164c52cf59bd10558ddec9c4f482763988
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/simstudioai/sim/pull/8232/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fpull%2F8232%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fpull%2F8232%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=simstudioai%2Fsim
Reloadhttps://github.com/simstudioai/sim/pull/8232/files
Reloadhttps://github.com/simstudioai/sim/pull/8232/files
Reloadhttps://github.com/simstudioai/sim/pull/8232/files
simstudioaihttps://github.com/simstudioai
simhttps://github.com/simstudioai/sim
Codehttps://github.com/simstudioai/sim
Issues129 (129)https://github.com/simstudioai/sim/issues
Pull requests197 (197)https://github.com/simstudioai/sim/pulls
Actionshttps://github.com/simstudioai/sim/actions
Projectshttps://github.com/simstudioai/sim/projects
Security and qualityhttps://github.com/simstudioai/sim/security
Insightshttps://github.com/simstudioai/sim/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fsimstudioai%2Fsim%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fsimstudioai%2Fsim%2Fissues%2Fnew%2Fchoose
waleedlatif1https://github.com/waleedlatif1
staginghttps://github.com/simstudioai/sim/tree/staging
fix/pdf-layout-aware-extractionhttps://github.com/simstudioai/sim/tree/fix/pdf-layout-aware-extraction
Conversation 42 https://github.com/simstudioai/sim/pull/8232
Commits 5 https://github.com/simstudioai/sim/pull/8232/commits
Checks 33 https://github.com/simstudioai/sim/pull/8232/checks
Files changed https://github.com/simstudioai/sim/pull/8232/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/8232/files
fix(file-parsers): read side-by-side calendar grids one block at a time https://github.com/simstudioai/sim/pull/8232/files#top
Show all changes 5 commits https://github.com/simstudioai/sim/pull/8232/files
310855c fix(file-parsers): read side-by-side calendar grids one block at a time waleedlatif1 Sep 24, 2026 https://github.com/simstudioai/sim/pull/8232/commits/310855c38f19f517f1508cbfed3c42530461dfc9
8601608 fix(file-parsers): tighten calendar block detection from review waleedlatif1 Sep 24, 2026 https://github.com/simstudioai/sim/pull/8232/commits/86016081dd86703b619edbd5cb209e1e9f8ee5e2
d60ddd9 fix(file-parsers): accept a weekday header drawn as one text item waleedlatif1 Sep 24, 2026 https://github.com/simstudioai/sim/pull/8232/commits/d60ddd9f8cf83b99496727c5eba21a71e86ef27c
fd2867d fix(file-parsers): require a shared header to name every grid column waleedlatif1 Sep 24, 2026 https://github.com/simstudioai/sim/pull/8232/commits/fd2867d39cfac1f73e0082621e0ec8cddbc2d227
cdcf2ee fix(file-parsers): match multi-word header cells and group rows by lo… waleedlatif1 Sep 24, 2026 https://github.com/simstudioai/sim/pull/8232/commits/cdcf2eeb75e0de4417e4967c7fc1a9193547f67e
Clear filters https://github.com/simstudioai/sim/pull/8232/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/8232/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/8232/files
pdf-layout.test.ts https://github.com/simstudioai/sim/pull/8232/files#diff-870f23e8e28fc6255eb985164dd3262fc0355423507e3d3c01ff459aac454f20
pdf-layout.ts https://github.com/simstudioai/sim/pull/8232/files#diff-7183bb826bceb1531b47fa5bc0255f051af14d8c6b63f740de6075ab668ab265
pdf-lines.test.ts https://github.com/simstudioai/sim/pull/8232/files#diff-9d0505306d0a866988b47b19260821e1c79dc7dd88ef27f67f11dcf672bd794e
pdf-lines.ts https://github.com/simstudioai/sim/pull/8232/files#diff-1b0f42f5edf2e73c289213cc49a6b54bd513fa19fb540b61c55f37d8648128fb
pdf-parser.test.ts https://github.com/simstudioai/sim/pull/8232/files#diff-0f759bb8360243c95a02fb587c21c1137bbbae849e660031cc01c74f349307e3
pdf-parser.ts https://github.com/simstudioai/sim/pull/8232/files#diff-e93299f30be9ac9c2d5ea6acd676eb8661b9659bd7967cd9a473a6cf8c002145
apps/sim/lib/file-parsers/pdf-layout.test.tshttps://github.com/simstudioai/sim/pull/8232/files#diff-870f23e8e28fc6255eb985164dd3262fc0355423507e3d3c01ff459aac454f20
View file https://github.com/simstudioai/sim/blob/cdcf2eeb75e0de4417e4967c7fc1a9193547f67e/apps/sim/lib/file-parsers/pdf-layout.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/8232/{{ revealButtonHref }}
Please reload this pagehttps://github.com/simstudioai/sim/pull/8232/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/8232/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/8232/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.