Skip to content

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

Description

@stevehome

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions