firecrawl / firecrawl/pdf-inspector

Sparse two-column text and right-aligned tags are merged horizontally across wide gutters

Open
#482 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
19.1k
Forks
1.3k
Avg merge
9h 21m
Merged PRs (30d)
51

Description

### Summary
On pages with side-by-side columns or right-aligned header tags, text items sharing the same vertical line are incorrectly merged horizontally across wide gutters, interleaving separate columns line-by-line and appending header tags directly into titles.

### Reproduction
Tested with sample PDF: [en-22-mixed-layout.pdf](https://github.com/fuchengwang/pdf-samples/blob/main/en-22-mixed-layout.pdf) ([Direct download](https://raw.githubusercontent.com/fuchengwang/pdf-samples/main/en-22-mixed-layout.pdf)).

**Actual Output:**
```markdown
# Mixed layout report EN-22

Left column: record source type, page count, and Right column: inspect tables, images, links, and reading checksum. order.
```

**Expected Output:**
```markdown
# Mixed layout report

EN-22

Left column: record source type, page count, and checksum.

Right column: inspect tables, images, links, and reading order.
```

### Sample File
- [en-22-mixed-layout.pdf (GitHub viewer)](https://github.com/fuchengwang/pdf-samples/blob/main/en-22-mixed-layout.pdf)
- [en-22-mixed-layout.pdf (Raw download)](https://raw.githubusercontent.com/fuchengwang/pdf-samples/main/en-22-mixed-layout.pdf)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the issue with en-22-mixed-layout.pdf and trace the PDF text-extraction or layout-ordering entry point that produces the shown Markdown. Done means the two columns and right-aligned tag remain separate as in the expected output, with regression coverage for this sample.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
backend, data
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.