ResponseAsPdf (FireFox)

Stimulsoft Reports.WEB discussion
Post Reply
ToneCold
Posts: 28
Joined: Thu Aug 29, 2013 6:26 pm

ResponseAsPdf (FireFox)

Post by ToneCold »

I am using Stimulsoft.Report.Web.StiReportResponse.ResponseAsPdf, it works great, but in FireFox the download button saves the pagename.aspx instead of .pdf.

Is there a way to fix this? Other browsers seem to work fine. The "type" in the pdf page source says "application/pdf" and right-clicking on the page and selecting "Save Page As" does work.

Thanks for your help (Stimulsoft Version 2013.1).

Tony
Vladimir
Posts: 1462
Joined: Fri Apr 13, 2007 4:05 am
Location: Earth

Re: ResponseAsPdf (FireFox)

Post by Vladimir »

Hello,

To display the save dialog, you must call the method as follows:
StiReportResponse.ResponseAsPdf(Page, report, true);

Also, we recommend to use the latest pre-release version available on our website. We tested the method on Firefox 23.0.1, works correctly.

Thank you.
ToneCold
Posts: 28
Joined: Thu Aug 29, 2013 6:26 pm

Re: ResponseAsPdf (FireFox)

Post by ToneCold »

Due to a work-around of a different issue I have to show the pdf. But I was able to find a fix:

Response.AddHeader("Content-Disposition", "inline; filename=FileName.pdf \ ")

Adding the above line before:
StiReportResponse.ResponseAsPdf(Page, report, true);

Fixes the issue in FireFox.

Tony
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: ResponseAsPdf (FireFox)

Post by Alex K. »

Hello,

Thank you for the information.
Post Reply