Hi,
I am using Telerik charts in my project. I use the EO.Web.ASPXToPDF object to convert my aspx page. When the pdf is created I get a blue image with a question mark instead of my charts. The rest of my web site loads perfectly in PDFs.
All I saw was 3 options
1 - EO.Pdf.HtmlToPdf.Options.MinLoadWaitTime set at 5000 - done.
2 - licence issue with third party compenents: checked that telerik is not an issue. I can have in other PDFs other telerik components such as grids. Also, I still get the question mark image if I try to use a ASP:Chart control instead of Telerik.
3 - make sure I can reach the image by the URL from another page / web browser. My charts are dynamic so if I take the URL and paste it in another page, I get a server error "image not found".
Would you have any suggestion please? Thank you.
Here is more of my code to complete the post:
Code: C#
protected void ibPrintPdf_OnClick(object sender, EventArgs e)
{
EO.Pdf.Runtime.AddLicense(...);
EO.Web.ASPXToPDF _aspxToPDF = new EO.Web.ASPXToPDF();
_aspxToPDF.PreRender += new EventHandler(AspxToPDF_PreRender);
phPdfControl.Controls.Add(_aspxToPDF);
_aspxToPDF.RenderAsPDF();
}
protected void AspxToPDF_PreRender(object sender, EventArgs e)
{
//margins
EO.Pdf.HtmlToPdf.Options.OutputArea = new System.Drawing.RectangleF(0.1f, 0.1f, 8f, 10.3f);
//zoom level
EO.Pdf.HtmlToPdf.Options.ZoomLevel = 1.2F;
//Hide or show elements to customize the PDF
...
}