Word Headers Not Showing in all Pages When Converting to PDF

I am trying to convert a Word docx to PDF. However the headers in the Word docx don;t show in the PDF except for page 3 of the PDF. Any idea how to get the Word header to appear on every page of the PDF? I attached the Word docx and the resulting PDF. Here is the code I was using:

dstDoc.Save(“C:\Temp\srcDoc.pdf”)

Hello
Thank you for reporting this problem to us. I managed to reproduce the problem on my side. Your request has been linked to the appropriate issue. You will be notified as soon as it is resolved.
It seems the reason of the problem is floating table inside a header. As a workaround, you can set “Text wrapping” of a table inside a header to “None” using MS Word.
Best regards,

I am using the builder to create the table. What property would I set in the Builder to set the text wrapping in the table to none? Here is my code:

builder.StartTable()
builder.InsertCell()
builder.CellFormat.Borders.Top.LineStyle = LineStyle.Single
builder.CellFormat.Borders.Left.LineStyle = LineStyle.Single
builder.CellFormat.Borders.Right.LineStyle = LineStyle.Single
builder.CellFormat.Width = 550
builder.CellFormat.WrapText = False
builder.InsertField("MERGEFIELD FH_FORMNAME \* MERGEFORMAT")
builder.CurrentParagraph.ParagraphFormat.Alignment = ParagraphAlignment.Center
builder.RowFormat.Alignment = Tables.RowAlignment.Center
builder.EndRow()
builder.InsertCell()
builder.CellFormat.Borders.Top.LineStyle = LineStyle.None
builder.CellFormat.Borders.Bottom.LineStyle = LineStyle.None
builder.CellFormat.Borders.Left.LineStyle = LineStyle.Single
builder.CellFormat.Borders.Right.LineStyle = LineStyle.None
builder.CellFormat.Width = 400
builder.InsertField("MERGEFIELD StudentName_custom \* MERGEFORMAT")
builder.CurrentParagraph.ParagraphFormat.Alignment = ParagraphAlignment.Left
builder.InsertCell()
builder.CellFormat.Borders.Top.LineStyle = LineStyle.None
builder.CellFormat.Borders.Bottom.LineStyle = LineStyle.None
builder.CellFormat.Borders.Left.LineStyle = LineStyle.None
builder.CellFormat.Borders.Right.LineStyle = LineStyle.Single
builder.CellFormat.Width = 150
builder.Write("Page " & PageNumber & " of " & TotalPages)
builder.CurrentParagraph.ParagraphFormat.Alignment = ParagraphAlignment.Right
builder.RowFormat.Alignment = Tables.RowAlignment.Center
builder.EndRow()
builder.InsertCell()
builder.CellFormat.Borders.Top.LineStyle = LineStyle.None
builder.CellFormat.Borders.Bottom.LineStyle = LineStyle.None
builder.CellFormat.Borders.Left.LineStyle = LineStyle.Single
builder.CellFormat.Borders.Right.LineStyle = LineStyle.None
builder.CellFormat.Width = 400
builder.InsertField("MERGEFIELD TeacherName_custom \* MERGEFORMAT")
builder.CurrentParagraph.ParagraphFormat.Alignment = ParagraphAlignment.Left
builder.InsertCell()
builder.CellFormat.Borders.Top.LineStyle = LineStyle.None
builder.CellFormat.Borders.Bottom.LineStyle = LineStyle.None
builder.CellFormat.Borders.Left.LineStyle = LineStyle.None
builder.CellFormat.Borders.Right.LineStyle = LineStyle.Single
builder.CellFormat.Width = 150
builder.Write("Printed: " & PrintDate)
builder.CurrentParagraph.ParagraphFormat.Alignment = ParagraphAlignment.Right
builder.EndRow()
builder.InsertCell()
builder.CellFormat.Borders.Top.LineStyle = LineStyle.None
builder.CellFormat.Borders.Bottom.LineStyle = LineStyle.Single
builder.CellFormat.Borders.Left.LineStyle = LineStyle.Single
builder.CellFormat.Borders.Right.LineStyle = LineStyle.None
builder.CellFormat.Width = 400
builder.InsertField("MERGEFIELD Course \* MERGEFORMAT")
builder.CurrentParagraph.ParagraphFormat.Alignment = ParagraphAlignment.Left
builder.InsertCell()
builder.CellFormat.Borders.Top.LineStyle = LineStyle.None
builder.CellFormat.Borders.Bottom.LineStyle = LineStyle.Single
builder.CellFormat.Borders.Left.LineStyle = LineStyle.None
builder.CellFormat.Borders.Right.LineStyle = LineStyle.Single
builder.CellFormat.Width = 150
builder.InsertField("MERGEFIELD FormLabel \* MERGEFORMAT")
builder.CurrentParagraph.ParagraphFormat.Alignment = ParagraphAlignment.Right
builder.RowFormat.Alignment = Tables.RowAlignment.Center
builder.EndRow()
builder.EndTable()

Thanks,
Jim

Hi Jim,
Thank you for additional information. Andrey meant tables in the body of your document, but not in the header. We will deeply investigate the issue and provide you more information.
Best regards,

The issues you have found earlier (filed as WORDSNET-4972) have been fixed in this .NET update and in this Java update.

This message was posted using Notification2Forum from Downloads module by aspose.notifier.