PDF Cannot Parse Table Probably

Hi,
I am using Aspose.PDF.Net 24.1.0, and .net 8.

When I was trying to parse the table from the attachment, Aspose retrieved the table with one row and one cell for the first table. That is, it gathered all elements in one cell. Is there any solution for me to retrieve the table with the correct number of row and cell, please?

Here is the example I transfer the result into table with markdown, and it shows only one row and cell.

中華民國113年 ● 輔導機關 : 農業部 ● 執行機關 : 社團法人中華民國養雞協會 5 月 份 地 區 洗 選 蛋 洗 選 蛋 日 期 北 區 彰 中 南 投 嘉 南 高 屏 L M 大 運 輸 LL/L/M 大 運 輸 S 批 發 LL/L/M 批 發 S 一 40.75 39.70 39.70 39.50 39.50 42.50 49.00 44.00 46.50 46.50 45.50 46.50 52.00 53.00 二 40.75 39.70 39.70 39.50 39.50 42.50 49.00 44.00 46.50 46.50 45.50 46.50 52.00 53.00 三 40.75 39.70 39.70 39.50 39.50 42.50 49.00 44.00 46.50 46.50 45.50 46.50 52.00 53.00 四 40.75 39.70 39.70 39.50 39.50 42.50 49.00 44.00 46.50 46.50 45.50 46.50 52.00 53.00 五 40.75 39.70 39.70 39.50 39.50 42.50 49.00 44.00 46.50 46.50 45.50 46.50 52.00 53.00 六 40.75 39.70 39.70 39.50 39.50 42.50 49.00 44.00 46.50 46.50 45.50 46.50 52.00 53.00 七 40.75 39.70 39.70 39.50 39.50 42.50 49.00 44.00 46.50 46.50 45.50 46.50 52.00 53.00 八 40.75 39.70 39.70 39.50 39.50 42.50 49.00 44.00 46.50 46.50 45.50 46.50 52.00 53.00 九 40.75 39.70 39.70 39.50 39.50 42.50 49.00 44.00 46.50 46.50 45.50 46.50 52.00 53.00 十 40.75 39.70 39.70 39.50 39.50 42.50 49.00 44.00 46.50 46.50 45.50 46.50 52.00 53.00 十一 40.75 39.70 39.70 39.50 39.50 42.50 49.00 44.00 46.50 46.50 45.50 46.50 52.00 53.00 十二 40.75 39.70 39.70 39.50 39.50 42.50 49.00 44.00 46.50 46.50 45.50 46.50 52.00 53.00 十三 40.75 39.70 39.70 39.50 39.50 42.50 49.00 44.00 46.50 46.50 45.50 46.50 52.00 53.00 十四 40.75 39.70 39.70 39.50 39.50 42.50 49.00 44.00 46.50 46.50 45.50 46.50 52.00 53.00 十五 40.75 39.70 39.70 39.50 39.50 42.50 49.00 44.00 46.50 46.50 45.50 46.50 52.00 53.00 十六 40.75 39.70 39.70 39.50 39.50 42.50 49.00 44.00 46.50 46.50 45.50 46.50 52.00 53.00 十七 40.75 39.70 39.70 39.50 39.50 42.50 49.00 44.00 46.50 46.50 45.50 46.50 52.00 53.00 十八 40.75 39.70 39.70 39.50 39.50 42.50 49.00 44.00 46.50 46.50 45.50 46.50 52.00 53.00 十九 40.75 39.70 39.70 39.50 39.50 42.50 49.00 44.00 46.50 46.50 45.50 46.50 52.00 53.00 廿 40.75 39.70 39.70 39.50 39.50 42.50 49.00 44.00 46.50 46.50 45.50 46.50 52.00 53.00 廿一 40.75 39.70 39.70 39.50 39.50 42.50 49.00 44.00 46.50 46.50 45.50 46.50 52.00 53.00 廿二 40.75 39.70 39.70 39.50 39.50 42.50 49.00 44.00 46.50 46.50 45.50 46.50 52.00 53.00 廿三 38.75 37.70 37.70 37.50 37.50 40.50 49.00 44.00 44.50 44.50 43.50 44.50 52.00 53.00 廿四 38.75 37.70 37.70 37.50 37.50 40.50 47.00 42.00 44.50 44.50 43.50 44.50 50.00 51.00 廿五 38.75 37.70 37.70 37.50 37.50 40.50 47.00 42.00 44.50 44.50 43.50 44.50 50.00 51.00 廿六 38.75 37.70 37.70 37.50 37.50 40.50 47.00 42.00 44.50 44.50 43.50 44.50 50.00 51.00 廿七 38.65 37.60 37.60 37.40 37.40 40.40 47.00 42.00 44.40 44.40 43.40 44.40 50.00 51.00 廿八 38.75 37.70 37.70 37.50 37.50 40.50 47.00 42.00 44.50 44.50 43.50 44.50 50.00 51.00 廿九 38.75 37.70 37.70 37.50 37.50 40.50 47.00 42.00 44.50 44.50 43.50 44.50 50.00 51.00 卅 36.75 35.70 35.70 35.50 35.50 38.50 47.00 42.00 42.50 42.50 41.50 42.50 50.00 51.00 平均 40.15 39.10 39.10 38.90 38.90 41.90 48.53 43.53 45.90 45.90 44.90 45.90 51.53 52.53 備 註 : 30 粒 紙 盤 蛋 (8 盤 / 箱 ) 規 格 : 特 大 LL(27 斤 ) 、 大 L(25 斤 ) 、 中 M(23 斤 ) 、 小 S(21 斤 ) 113 年 4 月 份 雞 蛋 產 地 價 格 單 元 : 元 / 台 斤 產 地 交 易 行 情 參 考 價 大 運 輸 批 發 台 南 30 粒 紙 盤 蛋 (8 盤 / 箱 ) 調查項目 入蛋雛【中】雞 與上月 目 前 與上月 目 前 與上月 本 月 與上月 本 月 與上月 平 均 與上月 區域 (隻) 比較 % 產蛋隻數 比較 % 產蛋箱數 比較 % 淘汰隻數 比較 % 換羽隻數 比較 % 隻日產蛋重 比較 % 宜 蘭 - - - - - 桃 園 28,400 17.84% 286,831 0.39% 1,034 8.39% 2,500 -71.85% 23,800 1486.67% 43.26 7.96% 新 竹 - #DIV/0! 30,680 -1.98% 114 -2.56% 400 -60.00% - #DIV/0! 44.59 -0.60% 苗 栗 25,300 -30.68% 501,300 -1.86% 1,936 1.20% 26,800 10.06% 11,400 -47.47% 46.34 3.12% 台 中 27,500 -3.51% 475,300 0.68% 1,850 0.33% 7,100 -68.79% 31,500 433.90% 46.71 -0.34% 南 投 94,500 55.68% 1,040,114 8.10% 3,814 5.13% 16,720 -73.34% 11,700 -72.01% 44.00 -2.76% 彰 東 79,700 -7.97% 1,418,518 -1.00% 4,913 1.07% 55,194 39.73% 40,200 -21.25% 41.56 2.09% 彰 西 361,395 -1.06% 7,503,540 4.80% 26,804 7.59% 299,200 -3.87% 280,050 31.10% 42.87 2.66% 彰 中 14,700 -33.93% 1,216,280 11.17% 4,251 9.42% 23,800 -38.66% 17,090 -10.52% 41.94 -1.57% 彰 北 126,418 -52.02% 3,428,742 0.53% 12,184 8.75% 113,000 -50.91% 140,600 -13.89% 42.64 8.17% 彰 南 112,800 -27.16% 2,300,870 3.41% 8,440 6.36% 133,050 -5.91% 45,550 -43.35% 44.02 2.87% 雲 林 11,500 -62.42% 737,893 4.38% 2,705 9.16% 2,830 -95.29% 11,800 -71.29% 43.99 4.59% 嘉 義 272,311 -25.61% 4,148,318 1.55% 13,545 1.02% 97,324 -43.50% 166,879 -29.48% 39.18 -0.53% 台 南 224,580 -40.90% 3,382,372 -0.60% 12,396 1.02% 260,670 -9.69% 64,400 -42.19% 43.98 1.64% 高 雄 182,119 162.23% 2,558,569 2.25% 8,817 -0.94% 135,090 138.46% 93,600 -26.27% 41.35 -3.14% 屏 東 146,370 -45.66% 4,959,566 -0.26% 18,000 -0.15% 183,520 -25.13% 254,650 14.56% 43.55 0.11% 金 門 - #DIV/0! 8,000 -11.11% 30 0.00% 1,000 -60.00% - #DIV/0! 45.00 12.50% 台 東 15,000 -46.24% 317,220 0.63% 1,297 0.08% 15,000 782.35% - #DIV/0! 49.06 -0.57% 總 計 1,722,593 -21.18% 34,314,113 2.19% 122,130 3.79% 1,373,198 -19.59% 1,193,219 -10.73% 43.77 2.00% 中華民國養雞協會蛋雞組 113 年 4 月份生產數量調查統計表 調查日期 (4/1~4/30) 備註:本雞蛋生產數量調查統計表資料之形成,係由本會專責訪調人員每週依滾動方式電訪國內蛋雞場,每月完成所有約 1,911 餘場蛋雞場所得。因 非即時調查資料,凡遇氣候變化、疫病影響等因素,無法即時反應實際生產資訊,故本資訊僅供參考。

113年5月份養雞協會會刊_第418期-頁面.pdf (1.7 MB)

looking forward to your reply, thanks.

@Rachel_Lee

We tested using 24.11 version and did not notice this issue. API detected different cells and extracted respective text fragments from it using the below code:

Aspose.Pdf.Document doc = new Aspose.Pdf.Document(dataDir + "113年5月份養雞協會會刊_第418期-頁面.pdf");
Aspose.Pdf.Text.TableAbsorber tableAbsorber = new Aspose.Pdf.Text.TableAbsorber();
tableAbsorber.Visit(doc);

foreach (var table in tableAbsorber.TableList)
{
    foreach (var row in table.RowList)
    {
        foreach(var cell in row.CellList)
        {
            foreach(var text in cell.TextFragments)
            {
                Console.WriteLine(text.Text);
            }
        }
    }
}

Can you please share a sample console application for our reference so that we can test the scenario in our environment again and address it accordingly.

Hi @asad.ali ,

Thanks for your rapid reply.
Here is the console result of the table extracted with one row and cell from version 24.1.0. Is it possible that the problem is with this version?

absorbed table from console.png (68.7 KB)

@Rachel_Lee

Yes, it can be related to specific version of the API. Please try with 24.11 version and let us know if you still notice this issue.

okay, I’ll try it.
Thanks a lot!