Hi Guys,
I have a main table with 1 left 1 middle and 1 right column. I add all my blocks into the middle cell and leave the left and right for formatting. Each block is added to the middle column of the outer table using outertable.AddRow()[1].Elements.AddTable(CreateMyTable()); So each row within the outer table will contain some complicated inner table.
My problem is that i can't seem to get the KeepWith to work on the outer table. The PDFDocumentRenderer.Render method fails with "Object reference not set to an instance of an object" It fails when rendering with the error.
If I comment out the last line below then it works. My code seems sensible, but maybe I'm expecting it to do someting it can't
var borrowerSignatureRow = documentTable.AddRow(); borrowerSignatureRow[1].Elements.Add(CreateBorrowerSignaturetable());
var borrowerWitnessRow = documentTable.AddRow(); borrowerWitnessRow[1].Elements.Add(CreateWitnessTable(false)); borrowerSignatureRow.KeepWith = borrowerWitnessRow.Index; //If I comment this row out it works.
|