Nevron Open Vision Documentation
Pdf Export

Nevron NOV Chart has support for PDF WYSIWYG resolution independent image generation. This functionality is exposed by the NChartPdfExporter class.

Exporting a Pdf Image to a File

In order to export the chart image as a Pdf file you need to create an instance of the NChartPdfExporter class and call its SaveToFile method:

C#
Copy Code

NChartPdfExporter chartPdfExporter = new NChartPdfExporter(chartView.Document);
chartPdfExporter.SaveToFile(
"c:\\ChartImage.pdf", new NRectangle(0, 0, 400, 300));

Exporting a Pdf Image to a Steeam

Exporting the chart as a pdf to a stream is done with the help of the SaveToStream method. This method takes the same number of arguments as SaveToFile except that it renders the pdf to a stream. This feature can be useful when you wish to generate pdf images in memory instead of saving them to the disc. The following code snippet shows how to obtain a byte array holding a pdf image in memory:

C#
Copy Code

NChartPdfExporter chartPdfExporter = new NChartPdfExporter(chartView.Document);

MemoryStream stream = new MemoryStream();
chartPdfExporter.SaveToStream(stream,
new NRectangle(0, 0, 400, 300));

// pdfImageBytes holds the pdf image

byte[] pdfImageBytes = stream.ToArray();

 

See Also
Send Feedback