Table border lost at bottom of page

I’m generating a table in aspose.words, then saving the document as a word doc and a pdf. When the table goes to the next page, the following happens.

1. In Word - there is no border at the bottom of page 1 or at top or bottom of page 2.
2. In PDF - there is no border at bottom of page 1.

I have borders set to width of 1, black. After I close the table, I AllowBreakAcrossPages, as follows

myDocBuilder.EndTable();
foreach (Aspose.Words.Tables.Row row in myTable)
row.RowFormat.AllowBreakAcrossPages = false;

Any idea what is happening?

Thanks.

Here is my code:
public static void BuildERMEResultsTable(int intStageSectionFieldID, int intProjectSectionID, Aspose.Words.DocumentBuilder myDocBuilder)
{
// Get Data
ProjectDataErmeresultCollection myDataCollection = ProjectDataErmeresultCollection.GetSortedDataByStageSectionFieldProjectSection(intStageSectionFieldID, intProjectSectionID);
if (myDataCollection.Count > 0)
{
Table myTable = myDocBuilder.StartTable();
Cell myTableCell = myDocBuilder.InsertCell();
myDocBuilder.CellFormat.PreferredWidth = PreferredWidth.Auto;
myTable.SetBorders(LineStyle.Single, 1, System.Drawing.Color.Black);
ProjectStageEntity myProjectStage = new ProjectSectionEntity(intProjectSectionID).ProjectStage;
bool bIsApplicationStage = myProjectStage.FormStage.StageTypeId == StageTypeLookupEntity.PREPROPOSAL || myProjectStage.FormStage.StageTypeId == StageTypeLookupEntity.PROPOSAL;

myDocBuilder.ParagraphFormat.Style = myDocBuilder.Document.Styles[“TableHeader”];
myDocBuilder.Writeln(“Proposed Result”);
myDocBuilder.InsertCell();
myDocBuilder.Writeln(“Topic”);
myDocBuilder.InsertCell();
myDocBuilder.Writeln(“Producer action”);
myDocBuilder.InsertCell();
myDocBuilder.Writeln(“When measured”);
myDocBuilder.InsertCell();
myDocBuilder.Writeln(“Est no”);
myDocBuilder.InsertCell();
myDocBuilder.Writeln(“How will you verify?”);
myDocBuilder.EndRow();

// Iterate through collection, populating rows.
myDocBuilder.ParagraphFormat.Style = myDocBuilder.Document.Styles[“TableContent”];
foreach (ProjectDataErmeresultEntity myDataElement in myDataCollection)
{
myDocBuilder.InsertCell();
myDocBuilder.Writeln(myDataElement.SortOrder.ToString() + ". " + myDataElement.ProposedResult);
myDocBuilder.InsertCell();
myDocBuilder.Writeln(myDataElement.ResultsTopicLookUp.Topic);
myDocBuilder.InsertCell();
myDocBuilder.Writeln(myDataElement.ProducerActionLookup.ProducerActionText);
myDocBuilder.InsertCell();
myDocBuilder.Writeln(myDataElement.WhenMeasured);
myDocBuilder.InsertCell();
myDocBuilder.Writeln(myDataElement.EstimatedNumber.ToString());
myDocBuilder.InsertCell();
myDocBuilder.Writeln(myDataElement.ToBeVerifiedByText);
myDocBuilder.EndRow();
}


myDocBuilder.EndTable();
foreach (Aspose.Words.Tables.Row row in myTable)
row.RowFormat.AllowBreakAcrossPages = false;
}
}

Hi Curtis,

Thanks for your inquiry. I tried running your code but unfortunately it is giving compile time errors (e.g. ProjectDataErmeresultCollection, ProjectStageEntity classes are missing). To ensure a timely and accurate response, it would be great if you please create a standalone (runnable) simple console application that helps us reproduce your problem on our end and attach it here for testing. As soon as you get this simple application ready, we'll start investigation into your issue and provide you more information. Also, please attach Aspose.Words generated output Word and PDF documents here for our reference. Thanks for your cooperation.

Best regards,

I’m attaching a self-contained aspx page (and codebehind) that simulates this issue without reference to our classes. This is a table within a table. I’m also including the .doc and .pdf files created. The question is: why are the borders disappearing at the tops and/or bottoms of pages?

Thanks.

Laurie
(Colleague of Curtis)

Hi Laurie,


Thanks for the additional information. We are checking with this scenario and will get back to you soon.

Best regards,

Hi Laurie,


Thanks for being patient. I tested the scenario and have managed to reproduce the same problem on my side. For the sake of correction, I have logged this problem in our issue tracking system as WORDSNET-10288. Our development team will further look into the details of this problem and we will keep you updated on the status of correction. We apologize for your inconvenience.

Best regards,

Do you have any idea when the fix to this issue might be implemented? It is holding up our development.

Thanks.

Laurie

Hi Laurie,

Thanks for your inquiry. Unfortunately, your issue is not resolved yet. Our development team is currently doing analysis of this issue to determine the exact root cause of this problem. Once the analysis of this issue is completed, we will then be able to share the ETA. We apologize for your inconvenience.

Best regards,

Hi Laurie,


Thanks for being patient. Regarding WORDSNET-10288, our development team has completed the analysis of this issue, the undesired behaviour you’re observing does not seem to be a bug in Aspose.Words. So, we will most likely close this issue as ‘Not a Bug’. Your Word document actually has borders; these borders are not visible at 100% zoom in Microsoft Word 2013, however, Microsoft Word 2013 starts displaying these invisible borders at 150% zoom. If borders exist but are poorly displayed by Microsoft Word and Adobe Acrobat, so this is not Aspose.Words problem. If we can help you with anything else, please feel free to ask.

Best regards,