How to Export Rendered Report to jpeg file

Stimulsoft Reports.JS discussion
Post Reply
irfan043
Posts: 2
Joined: Wed May 06, 2020 12:40 pm

How to Export Rendered Report to jpeg file

Post 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
Lech Kulikowski
Posts: 6266
Joined: Tue Mar 20, 2018 5:34 am

Re: How to Export Rendered Report to jpeg file

Post by Lech Kulikowski »

Hello,

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

Thank you.
irfan043
Posts: 2
Joined: Wed May 06, 2020 12:40 pm

Re: How to Export Rendered Report to jpeg file

Post 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
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: How to Export Rendered Report to jpeg file

Post 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.
Post Reply