Export fusion charts as images and add to pdf file with text
string fileName =
"fusionchart/pdf.png";
ServerSideImageHandler ssh = new ServerSideImageHandler(Server.MapPath("fusionchart/MSCombi2D.swf"), 500, 400, "", Server.MapPath("xmlschemas/XmlData.xml"),
Server.MapPath(fileName));
ssh.BeginCapture();
string pdfpath =
Server.MapPath("fusionchart/FusionCharts.pdf");
string imagepath
= Server.MapPath("fusionchart/pdf.png");
Document doc = new Document();
try
{
PdfWriter.GetInstance(doc,
new FileStream(pdfpath,
FileMode.Create));
doc.Open();
doc.Add(new Paragraph("GIF"));
iTextSharp.text.Image gif = iTextSharp.text.Image.GetInstance(imagepath);
doc.Add(gif);
}
catch (DocumentException dex)
{
Response.Write(dex.Message);
}
catch (IOException ioex)
{
Response.Write(ioex.Message);
}
catch (Exception ex)
{
Response.Write(ex.Message);
}
finally
{
doc.Close();
}
ServerSideImageHandler error
ReplyDeleteHi I have used above code but getting ServerSideImageHandler error, so please kindly help me out.
ReplyDeleteHi I have used above code but getting ServerSideImageHandler error, so please kindly help me out.
ReplyDelete