Text from table overlaps the footer

Hi everyone,

I’m facing the issue while working on PDF generation using C# and GemBox. Specifically, I’m trying to add data into table cells in my PDF document using the following code snippet:

var cell = new TableCell(document);
var paragraph = new Paragraph(document, text);
cell.Blocks.Add(paragraph);
tableRow.Cells.Add(cell);

However, on some pages, the text within these cells is overlapping the footer. This is causing a readability issue and is not the desired behavior.

I’ve noticed that the problem seems to occur when the content within the cell is particularly lengthy or when there are multiple lines of text.

I’ve tried adjusting the paragraph format, but haven’t had much success in resolving the problem.

Has anyone else experienced this issue before? Any insights or suggestions on how to prevent text from overlapping the footer would be greatly appreciated.

Thanks in advance for your help and expertise!

Actual result:

And expected result (that is working on other pages) is:

Hi,

I’m afraid that I was unable to reproduce this issue.
Please send us a small Visual Studio project that reproduces your issue.

Or, can you try this:

DocumentModel document = ...

// Instead of saving the document to PDF, save it to a temporary DOCX file.
//document.Save("output.pdf");
document.Save("temp.docx");

// Then try reproducing your issue by converting that temporary DOCX file to PDF.
document = DocumentModel.Load("temp.docx");
document.Save("output.pdf");

If this reproduces the issue as well, then please send us that temporary DOCX file so that we can investigate it.

Regards,
Mario

Thanks, I placed the temporary file on Google Drive, access by link or where I can send it to you?TestReport.docx - Google Docs

In this document (TestReport.docx), that “footer text” is actually inside the table cell.
Please check the following screenshot:

As you can see, the “Page 2” text is placed in the row between the “3. Metadata2: Metadata value 2” and “4. Metadata2: Metadata value 2”.

Please create a small Visual Studio project that reproduces your issue, generates this kind of document, so that we can investigate it.

Are you perhaps loading the input PDF file into the DocumentModel and then adding new table cells to it?

Regards,
Mario

The issue is not reproduced in test VS project, so will continue investigation.
Thanks!