Version

Exporting to PDF

This feature allows you to export your chart to either a Portable Document Format (PDF) file or an XML Paper Specification (XPS) file in only a few lines of code.

Exporting your chart to PDF works in conjunction with the Document Engine. For more information on the Document Engine, see Infragistics Document Engine .

A public method RenderPdfFriendlyGraphics is exposed which accepts a System.Drawing.Graphics object.

An overload of the RenderPdfFriendlyGraphics method is also available which accepts a System.Drawing.Graphics.object as well as a pixel width and height. If your chart’s dimensions are too large to fit into a PDF document’s canvas, then the rendered image will be scaled down based on the specified size to chart size ratio.

You must create a Report with a Canvas element, then call the CreateGraphics method on your Canvas element to pass the graphics object to the chart’s renderer.

You have to create the Report manually because the chart does not automatically include the Infragistics.Documents assembly, which is required for working with PDF files.

This assembly is not a part of the chart, otherwise you would have an extra assembly included at all times, even if you were not using the exporting to PDF functionality.