Pdf Table issue

I am working with a Word document that contains a single table spanning four pages. Upon exporting the document to PDF, the table is rendered as four distinct tables—each appearing on a separate page. This behavior occurs when using the following code snippet:

Aspose.Pdf.Text.TableAbsorber absorber = new Aspose.Pdf.Text.TableAbsorber();
absorber.Visit(page);

I am seeking a reliable method to accurately read and interpret the table as a single, continuous structure across multiple pages in the exported PDF.

@Nagasrinu

To address the issue of a table being rendered as separate tables across multiple pages in a PDF, you can use the TableAbsorber class to extract the table data from all pages of the PDF document. The key is to visit all pages at once and collect the table data into a single structure.

Here’s a code snippet that demonstrates how to extract the table data from all pages and handle it as a continuous structure:

private static void ExtractTable()
{
    // The path to the documents directory
    var dataDir = RunExamples.GetDataDir_AsposePdf_Tables();

    // Open PDF document
    using (var document = new Aspose.Pdf.Document(dataDir + "input.pdf"))
    {
        Aspose.Pdf.TableAbsorber absorber = new Aspose.Pdf.TableAbsorber();
        absorber.Visit(document.Pages); // Visit all pages at once

        foreach (var table in absorber.TableList)
        {
            Console.WriteLine("Table");
            foreach (var row in table.RowList)
            {
                foreach (var cell in row.CellList)
                {
                    foreach (var fragment in cell.TextFragments)
                    {
                        var sb = new StringBuilder();
                        foreach (var seg in fragment.Segments)
                        {
                            sb.Append(seg.Text);
                        }
                        Console.Write($"{sb.ToString()}|");
                    }
                }
                Console.WriteLine();
            }
        }
    }
}

In this example, the Visit method is called on the entire document instead of individual pages, which helps in treating the table as a single entity across multiple pages. This approach should resolve the issue of the table being split into separate tables in the PDF output.