PDF report related question

Jan 16, 2014 at 4:37 AM
Hi,

I an new to OxyPlot and had a question regarding creating report. I checked some of the sample code and using that wrote my report generation code, the code creates PDF report file but there are two files created one is filename.pdf and other is filename_Plot1.pdf. Any idea why there are two pdf's created? I just want one report file. I am using following code to generate report from a PlotModel:

private void CreateReport(string fileName)
    {
        string ext = System.IO.Path.GetExtension(fileName);
        ext = ext.ToLower();

        var r = new Report();
        r.Title = "Waveform Report";

        var main = new ReportSection();          

        r.Add(main);

        main.AddPlot(this.Model, string.Empty, this.Plot.ActualWidth, this.Plot.ActualHeight);

        var reportStyle = new ReportStyle();

        using (var w = new PdfReportWriter(fileName))
        {
            w.WriteReport(r, reportStyle);
        }
    }
Any help is appreciated
Jan 16, 2014 at 11:02 PM
I think the additional .pdf is created when you add the model view to the report. I remember having a similar problem, in my case I had to do a lot of screens, and that generated a lot of files. I had to remove them, in the same method, near the end. Good luck
Jan 17, 2014 at 7:49 AM
I think this was a limitation in MigraDoc - images could only be added to a Paragraph by filename, not stream...