I have a muliple page report and the header moves from the first page to the second page, they are different sections. The header starts off in the correct location but in each of the pages following the first page the header information is moved down about a half inch. I use the same code to set the section information as well as build the header.
The section code is below
'format the sections
For Each sec As Section In pdf.Sections
sec.IsLandscape =
True
sec.BackgroundImageFile = backGroundLocation
sec.BackgroundImageType = ImageFileType.Gif
sec.PageInfo.Margin.Top = 80
sec.PageInfo.Margin.Left = 112
sec.PageInfo.Margin.Bottom = 40
Next
And here is the section that builds the header
Private Sub BuildHeader(ByRef header As HeaderFooter)
Dim headerTable As Table
Dim titleInfo As TextInfo
titleInfo =
New TextInfo
titleInfo.Alignment = AlignmentType.Left
titleInfo.FontSize = 18
titleInfo.FontName =
"Arial"
titleInfo.Color = lightBlue
titleInfo.IsTrueTypeFontBold =
True
'build the main table
headerTable =
New Table
headerTable.Alignment = AlignmentType.Left
headerTable.DefaultCellPadding.Top = 30
headerTable.ColumnWidths =
"725"
headerTable.Rows.Add().Cells.Add().Paragraphs.Add(
New Text("REPORT" & Environment.NewLine, titleInfo))
'add main table to the header
header.Paragraphs.Add(headerTable)
End Sub
This is also happening with the footer, but the only idfference is instead of the information moving down, it moves to the right.
Any ideas?