Help me please,About Header and Footer of PDF.

I have problem with Header and Footer.
Now I used Asp.net MVC which I can run PDF with Agenda View,this is ok.
But I can’t show header and footer in Agenda View PDF files.

My coding:

  1. error:JavaScript runtime error: ‘scheduler’ is undefined in below scripts.
  1. error : No overload for method ‘ToPDF’ takes ‘4’ arguments in below scripts.
    <input type=“button” value=“PDF” class=“dhx_cal_today_button” onclick="@Html.Raw(Model.ToPDF(Url.Action(“ExportPDF”, “Export”), DHTMLX.Scheduler.ExportColorScheme.Color,true,true))" />

  2. I don’t know that where folder can I put Header.png and footer.png.

Thanks for advance.

and I try to set HeaderImgPath,Height ,I still no work?
[HttpPost, ValidateInput(false)]
public ActionResult ExportPDF()
{
try
{
var generator = new SchedulerPDFWriter();
var xml = this.Server.UrlDecode(this.Request.Form[“mycoolxmlbody”]);

            generator.HeaderImgPath = @"Content\Images\DHTMLX\Header.png";
            generator.FooterImgPath = @"Content\Images\DHTMLX\Footer.png";
            generator.HeaderImgHeight = 200;
            generator.FooterImgHeight = 200;
            MemoryStream pdf = generator.Generate(xml);
            return File(pdf.ToArray(), generator.ContentType);


          

        }
        catch (Exception ex)
        {
            throw new Exception(ex.Message);
        }

    }