firecrawl / firecrawl/anydoc

Multi-column tables collapse into unreadable single-column blobs during PDF conversion

Open
#173 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
21.5k
Forks
1.3k
Avg merge
42m
Merged PRs (30d)
17

Description

## Summary
When a PDF page contains a multi-column layout (e.g. a table with grouped bullet lists per cell), anydoc's Markdown table reconstruction collapses the columns into a garbled single blob, losing row/column structure and legibility.

## Repro

npx -y @firecrawl/anydoc "EU AI-Act-overview-30-May-2024.pdf" -o out.md

Source PDF: https://artificialintelligenceact.eu/high-level-summary/ (also mirrored at futureoflife.org)

## Observed
The source page contains an "Annex III use cases" table with ~9 category rows (Non-banned biometrics, Critical infrastructure, Education, Employment, Public/private services, Law enforcement, Migration, Administration of justice), each listing several bullet points.

anydoc's output merges all of this into a handful of malformed Markdown table rows with empty leading cells, run-together bullet text with no line breaks, and stray glyph artifacts (e.g. `|||flfi fi||fififififififififi|`) in several rows across the document, not just this table.

## Expected behavior
Either:
1. Reconstruct the table with correct row/column boundaries, or
2. Fall back to emitting the cell content as reading-order text/lists (as a plain pdftotext-style extraction does successfully on the same PDF) rather than producing a broken table that's less readable than plain text.

## Environment
- @firecrawl/anydoc version: 0.2.4
- Invocation: CLI, no --ocr flag (native PDF text extraction path — same result with --ocr hosted)
- OS: macOS

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the issue with the reported npx command and the EU AI-Act PDF, comparing anydoc's Markdown output with plain pdftotext-style extraction. Investigate the PDF-to-Markdown table reconstruction path, especially handling of grouped bullet lists and cell boundaries. Done means the Annex III table preserves readable structure, or safely falls back to reading-order text without malformed rows or glyph artifacts.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli, tooling
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.