Rank: Newbie Groups: Member
Joined: 3/19/2013 Posts: 2
|
At some point, possibly after upgrading to version 16, my headers and footers disappeared. I've tried multiple things to no avail. Any help would be appreciated. Here is my very simple code, and before you ask, YES, the session variables are populated:
protected void btnExport_Click(object sender, EventArgs e) { //Render the current page to PDF EO.Pdf.HtmlToPdf.Options.OutputArea = new RectangleF(0.5f, 0.5f, 7.5f, 10f); EO.Pdf.HtmlToPdf.Options.AutoFitX = HtmlToPdfAutoFitMode.ShrinkToFit; EO.Pdf.HtmlToPdf.Options.ZoomLevel = 0.7f; EO.Pdf.HtmlToPdf.Options.PageSize = EO.Pdf.PdfPageSizes.A4;
if (Session["ReportHeader"] != null) { EO.Pdf.HtmlToPdf.Options.HeaderHtmlFormat = Session["ReportHeader"].ToString(); }
if (Session["ReportFooter"] != null) { EO.Pdf.HtmlToPdf.Options.FooterHtmlFormat = Session["ReportFooter"].ToString(); }
EO.Pdf.HtmlToPdf.Options.InvisibleElementIds = "non-printable;button-non-printable"; EO.Pdf.HtmlToPdf.Options.VisibleElementIds = "printable;pnlContent"; string filename = Session["ExportReportFileName"].ToString(); ASPXToPDF1.RenderAsPDF(filename);
Session["ReportHeader"] = null; Session["ReportFooter"] = null; }
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,229
|
Hi, We tested this here with the latest build and it works fine. So it may have something to do with your HTML. In that case please try to isolate the problem into a test project and send the test project to us: https://www.essentialobjects.com/forum/test_project.aspxOnce we have that we will look into it as soon as possible. Thanks!
|