The question is published on by Tutorial Guruji team.
I’m developing a UI that interfaces with an existing back-end service. The UI needs to make a call to the back-end server for a PDF file that will either be displayed on the existing page or in a new tab.
I’ve tried all the options I’ve seen listed on SO:
<iframe src="http://localhost:3131/Reports.aspx?reportName=testReport&clientid=23" width="800px" height="100%"></iframe> <embed type="application/pdf" src="//http://samelinkasabove" width="800px" height="100%"> <object type="application/pdf" data="http://myreportlink" width="800px" height="100%" /> <a href="http://localhost:32/Reports.aspx?reportName=testReport&clientid=23" target="_blank">View Report</a>
I found that the server was using CrystalReports to generate the PDF and “export” it. It used a function
ExportToHttpResponse(...) and the third parameter in the method call was
That parameter was being set to true. I changed it to false and the response began being set to
inline and the above display methods began working.