CS0246: The type or namespace name 'HeaderFooter' could not be found (are you missing a using directive or an assembly reference?) RRS feed

  • Question

  • User-415289486 posted

    How does one implement a footer and a header on pdf. i get the  error yet i av used references required. as shown below.

    @using iTextSharp.text;
    @using iTextSharp.text.pdf;
    @using iTextSharp.text.html;
    HeaderFooter footer = new HeaderFooter(new Phrase("Page: "), true);
    doc.Footer = footer;
    HeaderFooter header = new HeaderFooter(new Phrase("Image scanned on " + DateAndTime.Now.ToString("dd/MM/yyyy")), false);
    doc.Header = header; 
    for (int i = 1; i <= 2; i++) {



    Wednesday, February 1, 2012 2:27 AM

All replies

  • User197322208 posted

    put an

    using <namespace of HeaderFooter>

    Wednesday, February 1, 2012 4:41 AM
  • User-415289486 posted

    using <namespace of HeaderFooter>

    what is the namespace for headerfooter?

    Wednesday, February 1, 2012 6:19 AM
  • User-415289486 posted

    Hi, please could sombody show me how to use the headerfooter namespace?

    Thursday, February 9, 2012 3:02 AM
  • User-1977040121 posted

    Use iTextSharp.dll version

    Hope your issue solve

    Tuesday, May 22, 2012 1:51 AM
  • User1839833660 posted

    headerfooter class is removed from version 5.0.0 and above 

    use version older then this to use this class 

    refer http://kuujinbo.info/cs/itext.aspx for more info 

    Tuesday, May 22, 2012 2:44 AM