hi,
I have a table with three columns in the footer of a MS Word document, when i save the document as PDF the footer allignment in PDF document is messed up. how to fix this?
i have attached both MS Word and PDF documents for your reference.
Please let me know.
Thanks in advance!
code used to add footer is as below:
builder.MoveToHeaderFooter(HeaderFooterType.FooterPrimary);
Table footer =builder.StartTable();
builder.CellFormat.Borders.LineWidth = 0;
builder.ParagraphFormat.Alignment = ParagraphAlignment.Left;
builder.CellFormat.VerticalAlignment = CellVerticalAlignment.Center;
if (!StringUtils.Compare(userInput.GetValue(“FL”), “”) || !StringUtils.Compare(userInput.GetValue(“FR”), “”))
{
builder.InsertCell();
builder.CellFormat.PreferredWidth = PreferredWidth.Auto;
builder.Write(userInput.GetValue(“FL”));
builder.ParagraphFormat.Alignment = ParagraphAlignment.Left;
builder.CellFormat.Borders.Top.LineWidth = 1;
}
builder.InsertCell();
builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;
builder.CellFormat.Borders.Top.LineWidth = 1;
if (StringUtils.Compare(userInput.GetValue(“FC”), “PageXofY”))
{
builder.CellFormat.PreferredWidth = PreferredWidth.FromPercent(15);
builder.InsertField(“PAGE”);
builder.Write(" of ");
builder.InsertField(“NUMPAGES”);
}
else if (StringUtils.Compare(userInput.GetValue(“FC”), “PageX”))
{
builder.Write("Page ");
builder.InsertField(“NUMPAGES”);
}
else if (StringUtils.Compare(userInput.GetValue(“FC”), “PageNo”))
{
builder.InsertField(“PAGE”);
}
if (!StringUtils.Compare(userInput.GetValue(“FR”), “”) || !StringUtils.Compare(userInput.GetValue(“FL”), “”))
{
builder.InsertCell();
builder.CellFormat.PreferredWidth = PreferredWidth.Auto;
builder.Write(userInput.GetValue(“FR”));
builder.ParagraphFormat.Alignment = ParagraphAlignment.Right;
builder.CellFormat.Borders.Top.LineWidth = 1;
}
builder.EndRow();
builder.CellFormat.Borders.LineWidth = 0;
builder.EndTable();