ITADN

Two column layout not parsed correctly

#91Openirian-codes 创建于 2024-08-14
I
irian-codescommented
**Describe the bug** Testing a two column layout PDF it seems the text gets misplaced in the final markdown result. **To Reproduce** Parse [Root board board game manual](https://cdn.shopify.com/s/files/1/0106/0162/7706/files/Root_Base_Law_of_Root_June_30_2023.pdf) pdf or [Aliens AGDITC board game manual](https://www.gf9games.com/aliens/wp-content/uploads/2023/02/Aliens-Rulebook-2023-LR.pdf) **Expected behavior** It should detect columns and join the text correctly in the final output without any other character in between. Right now, if you try to see the continuation of a left column to the right column in any of the example pdfs the text parts don't match. For example, in the Root Manual: - Text on page 8 left column on the PDF ends with `Items on the Vagabond’s faction board can be face up or` and continues on the right column with `face down. The Vagabond exhausts face-up undamaged items, flipping them face down, to take many actions.`. However, in the pdf2md output the text ends with `9.3.3 Step 3: Get Quests.` which is the right column of the **next page**. Example in the Aliens manual: - Text on page 9 left column on the PDF ends with`After placing the Blip tokens, read the game text and complete its instructions.` and continues on the right column with `You can get a sense of the danger coming by looking at the back of the Motion Tracker cards`. However, in the pdf2md output the text ends with `BLIPS \n GAME-TEXT \n TYPE LOCATION \n TUNNEL CARD: These cards place Tunnel tokens on the game board.` which is the right column of the correct page but for whatever reason it entirely skips the top right column paragraph. **Desktop (please complete the following information):** - OS: Windows 11 running WSL - Browser Node.js 22.6.0. (in a Next.js 14 app) - Package version: "@opendocsg/pdf2md": "^0.1.31"
1 条评论