dynamic pdf web page in iframe

dynamic pdf web page in iframe

Forum member · Mar 31, 2009
I would like load the pdf file in a iframe to keep the feel and look of the website. For example I take a blank regular web page (default.aspx) and drop just an iframe on the page. <div> <iframe id="myIFrame" runat="server" width="950px" height="1300px"></iframe> </div> In the Page_Load I simply add the following code which is the dynamic pdf page that creates the hello world pdf: myIFrame.Attributes["src"] = "helloworld.aspx"; The code works but the pdf disappears unless you have a button to create a form post. Am I missing something and is there any downside to doing this? Thanks, Ken

Re: dynamic pdf web page in iframe

Support · Mar 31, 2009
Hello Ken, You can display the PDF in an iframe without any problem. We are able to display the PDF in iframe by setting the attribute src in the Page_Load event. Please make sure that you are using the correct path of the PDF. We are using the below code in the Page_Load. frame.Attributes["src"] = "fw9AcroForm_03.pdf"; This PDF is located in the same folder as the webpage. Below is the markup. <iframe id="frame" runat="server" height="500" width="500"></iframe> Thanks, ceTe Software Support Team.

Re: dynamic pdf web page in iframe

Support · Mar 31, 2009
Hello Ken, We are also able to call another aspx page in the iframe using the below code without any problem. frame.Attributes["src"] = "PopUp.aspx"; The PopUp.aspx page creates a PDF and displays it using the DrawToWeb method. Thanks, ceTe Software Support Team.

Re: dynamic pdf web page in iframe

Forum member · Mar 31, 2009
I had the .aspx page in another folder and I believe that is what was causing my problem. Thank you!!