Free Support Forum - aspose.com

Request: Built-in support for Aspose.Chart

Both Aspose.Pdf and Aspose.Chart provide support for XML-based document definition. Here’s an idea for great synergy between the two products.

I would find it very powerful to be able to simply insert an Aspose.Chart element directly into a document that gets passed to BindXML(), and have that chart treated like any other paragraph - with the coordination between the two products handled for me. (Oh… and the chart should print smooth lines/curves as opposed to bitmap. Doesn’t take much to make me happy Wink)

Dear sdwire,

It’s a good idea and usful for customer. But if I support it, I have to embed Aspose.Chart’s code or dll which make the code difficult to manage. So please save the chart as image and then add the image to pdf as described in Integrating with Aspose.Chart.

However, the strategy recommended in the article you mentioned prevents me from using a single XSLT to transform my source data into a complete PDF description in XML. This is the approach I use for my current projects using Apache FOP.

Consider how Apache FOP supports, say, embedded SVG code. It is able to hand off the rendering of the SVG graphic to a separate, external component called Batik, and FOP itself handles the resulting integration.

Aspose.Pdf could do the same thing. Blindly package up the "Chart" branch of the incoming XML document and hand it off to the existing Aspose.Chart component (if it is installed) using Aspose.Chart's BindXML(). Then, Aspose.Pdf could incorporate the resulting image onto the PDF. If the Aspose.Chart component were not installed, the area reserved for the chart could simply render an error message: "Embedded chart elements require installation of Aspose.Chart. Please see http://www.aspose.com." or something like that. I may be over-simplifying, but if I'm not, I would expect that this approach to enhancing the Aspose.Pdf product would take less effort than it would take me to change my approach from single-XSLT to manual integration of images for even ONE of my reports.

I would think this kind of integration would not only benefit customers, it would also increase cross-selling of Aspose products. This would be a win all around.

Oh… and if the first attempt has to show the chart as a bitmapped image, I suppose that would be acceptable until vector images are supported. That way, once Aspose.Pdf supports vectors, those using the embedded XML approach can get their chart images in vectors with no additional effort.

Dear sdwire,

Thanks for your advise. I will consider it seriously.