Direct display in browser of a PDF file

Stimulsoft Reports.JS discussion
Post Reply
lfcapacio
Posts: 15
Joined: Fri Jun 29, 2012 4:43 pm
Location: Brazil

Direct display in browser of a PDF file

Post by lfcapacio »

Into the manual have a example to export to PDF:

Code: Select all

var report = new Stimulsoft.Report.StiReport();
report.loadFile("SimpleList.mrt");
report.render();

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();
Object.saveAs(data, "SimpleList.pdf", "application/pdf");
But i need that the browser display the pdf file and don't display the dialog to save a file.

It's possible ?

Thank you for atention.
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Direct display in browser of a PDF file

Post by HighAley »

Hello.

Unfortunately, there is no universal solution.
You could try t use next method:

Code: Select all

URL.createObjectURL(pdfBytes);
You could find more solutions here.

Thank you.
Post Reply