We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Can't extract table from some PDF Files

Hi. Can’t extract tables values from some PDF files. The table extracts with the name of the columns and the ordinal number, but the rest of the table is missing. Use Aspose PDF 20.11 version net 4.0 because it is a part of BPMS System with built-in license on Aspose PDF. Since I cannot update the module myself, I need to make sure that the problem is really in the old version, and not in the PDF itself.
Please Help.

not work.pdf (79.1 KB)
work.pdf (82.6 KB)

@8bIBAET

Can you please share the source code which misses rest of the table and the snapshot of your output while using latest version of API so that we may try to reproduce the same on our end.

I can’t use later version of API because it’s a part of BPM System where i can’t update moduels without developers of this system, but they do not want to update indiscriminately solutions on your forum.

Aspose.Pdf.Text.TableAbsorber tableAbsorber = new Aspose.Pdf.Text.TableAbsorber();
		tableAbsorber.Visit(pdfDoc.Pages[1]);
		
		foreach(AbsorbedTable table in tableAbsorber.TableList)
		{
			foreach (AbsorbedRow row in  table.RowList)
        	{
        	    foreach (AbsorbedCell cell in row.CellList)
        	    {                                 
        	        foreach (TextFragment fragment in cell.TextFragments)
        	        {
        	            var sb = new StringBuilder();
        	            foreach (TextSegment seg in fragment.Segments)
        	                sb.Append(seg.Text);
        	            Console.Write($"{sb.ToString()}|");
        	        }                           
        	    }
				Console.WriteLine();
        	}
		}

@8bIBAET

I request you to share a file or snapshot of your output and desired output for comparison and investigations.

If i extract table from “work.pdf” file i have text output
work.PNG (7.9 KB)
If i try to extract table from file “not work.pdf” i have output
not work.PNG (1.9 KB)

@8bIBAET

I can see more text extracted in attached file with latest version so I suggest you to upgrade and share your feedback.Text_Extracted.zip (1.9 KB)

Ok, thanks. I sent this topic to support.

@8bIBAET

You are welcome. Let us know the feedback after the upgrade.