I'm currently using an older version of Syncfusion product to create a chart and export it to PDF and Excel documents. I create a chart dynamically , save it as an image and then export it to the required format by creating the corresponding object. The charts that are now produced in the PDF / Excel documents are lacking clarity, so I am planning to upgrade to Syncfusion latest version . As a part of it I've installed trial version and worked on exporting images to PDF document in the above stated way and I didn't find any difference in terms of clarity . I want to know if there are any improvisations made in the new version in this aspect or if there is any other way to achieve the requirement.
KKKarthik Krishnaraj Syncfusion Team June 4, 2015 09:19 AM UTC
Hi Sai Bharadwaj,
Thank you for using syncfusion products,
I have attached a sample for “Exporting images to Pdf” as per the current approach in the below link please check through it. In the meantime can you please provide us the image which lacks quality in the converted Pdf, so that it will be helpful for us to investigate further. Sample Link: http://www.syncfusion.com/downloads/support/forum/119304/ze/ExportChart-1588772003 Thanks, Karthik.
SBSai Bharadwaj KanduriJune 5, 2015 05:27 AM UTC
Thanks for the support. I am able to achieve what I want. i.e high quality charts in the PDF and Excel documents. I have noticed that the following procedure helps in achieving the requirement. Save the chart in .emf form using SaveImage method and then draw the image on the document using the following code snippet . This procedure is producing high quality charts only when saved in .emf format, there is no difference in other formats.
PdfDocument pdfDoc = new PdfDocument();
PdfPage page = pdfDoc.Pages.Add();
PdfGraphics g = page.Graphics;
imgStream = new FileStream("D:\\Syncfusion\\Chart.emf", FileMode.Open, FileAccess.Read);
image = PdfImage.FromStream(imgStream);
g.DrawImage(image, leftX, heightY);
KKKarthik Krishnaraj Syncfusion Team June 9, 2015 04:45 AM UTC
Hi Sai Bharadwaj,
Thank you for your update we are happy to hear your issue has been resolved, please let me know if you have any concerns.