I need to save a report on the server side as a PDF.
For that I use the next code with javascript:
Code: Select all
var settings = new Stimulsoft.Report.Export.StiPdfExportSettings();
var service = new Stimulsoft.Report.Export.StiPdfExportService();
var stream = new Stimulsoft.System.IO.MemoryStream();
service.exportTo(report, stream, settings);
var data = stream.toArray();
let reportDataToServer = JSON.stringify(data);
Code: Select all
var reportS = JsonConvert.DeserializeObject<String[]>(reportData);
var reportB = reportS.Select(byte.Parse).ToArray();
var randomcode = Utils.RandomString(10);
var path = ....
File.WriteAllBytes(path, reportB);
The problem that I have, as you can see on the example I attach ("ImageBar1.png"), the report has images that are used as "Headers" , that because I need to have some border radius on the upper corners.
After creating the report with the steps I mentioned, the PDF is not showing the images as you can see in the image "NoBars.jpg".
What do i need to solve this problem, or whats the correct way to save the report in an specific path in the server.
Im using Reports.JS.
Thanks