Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
750
Publish PDF without showing Open Save dialog
posted

Hello All

I am able to export my file as a Pdf but now it shows Open Save dialog Box for either saving the file or opening it. I just want to show that file to the users without showing any dialog box. Please see if anyone out here can help me in resolving this issue.

Thanks in Advance.

Regards

Gaurav

 

Parents
No Data
Reply
  • 4960
    Suggested Answer
    posted

    Call Publish to write the Report instance out to a file someplace on your server (the challenge is more of a logistical one in securing someplace on your Web server where you can drop these PDF files, and cleaning them up afterward).

    Then on your .ASPX page use an <embed> tag and point it to the PDF file you created,

    <embed src="http://example.com/user/802364719/analysis.pdf#toolbar=0&navpanes=0" width="600" height="800" />

    The highlighted part is the dynamic URL to the place where you published the PDF file to on your server. Another way to insert this into your .ASPX is with an inline expression tag based on a Page-level property like this,

    <embed src="<%= WebForm1.PathToPDF %>#toolbar=0&navpanes=0" width="600" height="800" />

    This will only work if the user has Acrobat Reader installed as a plug-in to their browser.

Children
No Data