hi all,
when i am trying to run the below code i am getting the following error
Pdf pdf = new Pdf();
Section section = new Section(pdf);
PageSetup ps=new PageSetup();
section.PageInfo=ps;
ps.PageWidth=790;
ps.PageHeight=990;
HeaderFooter hf1 = section.InsertHeader(HeaderFooterType.Both);
section.OddHeader = section.EvenHeader = hf1;
hf1.IsFirstPageOnly = true;
Text text = new Text(hf1);
hf1.Paragraphs.Add(text);
Segment segment = new Segment(text);
text.Segments.Add(segment);
segment.Content = “header for first page”;
for(int i = 1; i<= 6; i++)
{
Text text1 = new Text(section);
text1.IsFirstParagraph = true;
section.Paragraphs.Add(text1);
Segment segment1 = new Segment(text1);
text1.Segments.Add(segment1);
segment1.Content = "page " + i.ToString();
}
pdf.Save(“sample”,SaveType.OpenInAcrobat,Response);
Response.End();
Error
Header or footer is too large.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.Exception Details: System.ApplicationException: Header or footer is too large.
Source Error:
|