OpenViking icon indicating copy to clipboard operation
OpenViking copied to clipboard

[Bug]: PDF table rows split at multiline cell content

Open 123XieC opened this issue 2 weeks ago • 0 comments

Issue Origin

Observed or reproduced in a real environment. A generated PDF was parsed with the production local parser and pdfplumber, then rendered with a Markdown table parser.

Bug Description

Physical line breaks extracted from a PDF table cell are written as literal newlines in the generated Markdown. They terminate the current row. A two-column table with one data row can therefore become two rows, with the quantity attached to the second fragment of the description.

Steps to Reproduce

  1. Make a two-column PDF table with the header Product / Quantity.
  2. Put Widget | kit and Second line on separate lines in the same Product cell. Put 3 in the Quantity cell of that row.
  3. Parse the PDF locally. Inspect the generated Markdown after the <!-- Page 1 Table 1 --> marker and render it as a Markdown table.

Expected Behavior

One data row containing both description lines and quantity 3. The Feishu table path already represents cell breaks with <br>.

Actual Behavior

The description is split between two rendered rows. The first row has an empty quantity and the second has 3.

OpenViking Version

Current main at 8c1ad98.

Python Version

3.12.16.

Operating System

macOS arm64.

Additional Context

The PDF used only local synthetic content. AI assistance was used for reproduction.

123XieC avatar Nov 14 '26 05:11 123XieC