Hi,
i encounter a problem in adding a table in the header. i was able to add a table into the header using this code,
//Move to the 1st page of the headers
pdocBuilder.MoveToHeaderFooter(HeaderFooterType.HeaderFirst);
// Write the heading
pdocBuilder.Writeln("Heading");
pdocBuilder.Writeln("sub heading");
// 1st row
// Title
pdocBuilder.InsertCell();
pdocBuilder.CellFormat.VerticalMerge = CellMerge.First;
pdocBuilder.Writeln("Title: ");
pdocBuilder.Writeln("eric");
pdocBuilder.Writeln("test");
// Document Number
pdocBuilder.InsertCell();
pdocBuilder.CellFormat.VerticalMerge = CellMerge.None;
pdocBuilder.Write("Document Number: ");
pdocBuilder.Write("321");
// Page
pdocBuilder.InsertCell();
pdocBuilder.CellFormat.VerticalMerge = CellMerge.First;
pdocBuilder.Writeln("Page X of Y");
pdocBuilder.EndRow();
// 2nd row
// Revision No
pdocBuilder.InsertCell();
pdocBuilder.CellFormat.VerticalMerge = CellMerge.Previous;
pdocBuilder.InsertCell();
pdocBuilder.CellFormat.VerticalMerge = CellMerge.None;
pdocBuilder.Write("Revision No: ");
pdocBuilder.Write("50");
pdocBuilder.InsertCell();
pdocBuilder.CellFormat.VerticalMerge = CellMerge.Previous;
pdocBuilder.EndRow();
// 3rd Row, 1st cell Issued By, Initial Date issued, Date Reviewed, Date revised
pdocBuilder.InsertCell();
pdocBuilder.CellFormat.VerticalMerge = CellMerge.None;
// Issued By
pdocBuilder.Writeln("Issued by: ");
pdocBuilder.Write("eric");
// Initial Date issued
pdocBuilder.Writeln("Initial date issued: ");
pdocBuilder.Write("eric");
// Date Reviewed
pdocBuilder.Writeln("Date reviewed: ");
pdocBuilder.Write("eric");
// Date revised
pdocBuilder.Writeln("Date revised: ");
pdocBuilder.Write("eric");
// 3nd row 2nd cell merge with 3rd cell
pdocBuilder.InsertCell();
pdocBuilder.CellFormat.VerticalMerge = CellMerge.None;
// Approved by
pdocBuilder.Writeln("Approved by: ");
pdocBuilder.Writeln("eric");
pdocBuilder.InsertCell();
pdocBuilder.CellFormat.HorizontalMerge = CellMerge.Previous;
// end of 3rd row
pdocBuilder.EndRow();
pdocBuilder.EndTable();
- What happen is that , the width of the 3rd row for the table keep will not have the same width as the 1st and 2nd row.
- The other question i would like to find out is that how i add the page number object to the header
- Also how do i delete the “heading” and “subheading” in the header before the heading
Regards,
Eric Tan
Commerce Online