Page 1 of 1

How to Export Rendered Report to jpeg file

Posted: Wed May 06, 2020 12:56 pm
by irfan043
I am trying to export report in jpeg file using nodeJS but it returns empty array

Code: Select all

var Stimulsoft = require('stimulsoft-reports-js');

Stimulsoft.Base.StiFontCollection.addOpentypeFontFile("Roboto-Black.ttf");

var report = new Stimulsoft.Report.StiReport();

report.loadFile("/SimpleList.mrt");

// Renreding report
report.render();
console.log("Report rendered. Pages count: ", report.renderedPages.count);

// Export to JPEG
var jpegData = report.exportDocument(Stimulsoft.Report.StiExportFormat.ImageJpeg);

console.log("jpegData: ", jpegData);
Its working fine for exporting PDF

Code: Select all

// Export to PDF
var pdfData = report.exportDocument(Stimulsoft.Report.StiExportFormat.Pdf);

console.log("pdfData: ", pdfData);
please suggest what shout i do for exporting report in JPEG format

thanks

Re: How to Export Rendered Report to jpeg file

Posted: Thu May 07, 2020 7:27 pm
by Lech Kulikowski
Hello,

We couldn't reproduce the issue on our samples.
Please clarify which versions are you use?

Thank you.

Re: How to Export Rendered Report to jpeg file

Posted: Fri May 08, 2020 9:45 am
by irfan043
I am using from here "https://www.stimulsoft.com/en/samples/n ... e-pdf-file"
it is for the PDF but i need to export as jpeg

Re: How to Export Rendered Report to jpeg file

Posted: Tue May 12, 2020 11:07 am
by HighAley
Hello,

Unfortunately,the API that is used for the export to image formats is not availabel in node.js.
This export will not be available in node.js.

Thank you.