public void Export_Unicode() { var model = new PlotModel { Title = "Unicode support ☺", DefaultFont = "Arial" }; model.Axes.Add(new LinearAxis { Title = "λ", Position = AxisPosition.Bottom }); model.Axes.Add(new LinearAxis { Title = "Ж", Position = AxisPosition.Left }); var exporter = new PdfExporter { Width = 400, Height = 400 }; using (var stream = File.OpenWrite("Unicode.pdf")) { exporter.Export(model, stream); } }
/// <summary> /// Exports the specified model to a stream. /// </summary> /// <param name="model">The model.</param> /// <param name="stream">The output stream.</param> /// <param name="width">The width (points).</param> /// <param name="height">The height (points).</param> public static void Export(IPlotModel model, Stream stream, double width, double height) { var exporter = new PdfExporter { Width = width, Height = height, Background = model.Background }; exporter.Export(model, stream); }