I have an asp.net web page containing a label, 3 buttons, and a file upload control. Using the file upload control I want to import the pdf so that it displays below the existing content on the page. So, when I use document.DrawToWeb(); I do not want the pdf to take up the entire page. I want to have the pdf displayed below the label, buttons, and, file upload control. How could I accomplish this?
How to prevent PDF from taking up the entire page
Re: How to prevent PDF from taking up the entire page
Support · Aug 15, 2008Hello,
You can accomplish this using a frame. Just pass in the URL and pass any data you need to on the URL and that page will display in the frame. Using IFrame will likely work the same way.
Thanks,
ceTe Software Support Team
Re: How to prevent PDF from taking up the entire page
Forum member · Aug 15, 2008Thanks, the Iframe seems to work. But I want to be able to output the PDF not to the current webpage but another webpage. So, I should use the document.DrawToWeb(System.Web.UI.Page page) However, I noticed it was obsolete. Is there another method that is used in its place?
Joe
Re: How to prevent PDF from taking up the entire page
Support · Aug 15, 2008Hello Joe,
Since v4.0 of the product, the DrawToWeb method no longer takes the System.Web.UI.Page object. It just takes the string. For e.g. document.DrawToWeb("Test.pdf");
Thanks,
ceTe Software Support Team
Re: How to prevent PDF from taking up the entire page
Forum member · Aug 15, 2008Yes I know. I was asking if there is another way to open the pdf in another page?
Joe
Re: How to prevent PDF from taking up the entire page
Support · Aug 15, 2008Hello Joe,
Actually the way to always force the created PDF is opened in a new window is to set the HTML target="_blank" on the link or button that calls your applications.
The HTML target="_blank" will cause the page that creates the PDF to open in a new window.
Take a look at our US Envelope example. This example creates the final PDF in a new window by using target="_blank". This will be in the ASPX page for that example.
Thanks,
ceTe Software Support Team
Re: How to prevent PDF from taking up the entire page
Forum member · Dec 1, 2008What if I'm in a Content holder within a master page, where do I put the target="_blank"?
Does this only apply to the ceTe.DynamicPDF.Merger.MergeDocument component? Because my colleague uses ceTe.DynamicPDF.Document to generate a brand new PDF and it prints in a new page. I'm using the merger to merge several PDF files together but it always prints to the current page. We are both using the DrawToWeb() method.
Re: How to prevent PDF from taking up the entire page
Forum member · Dec 1, 2008Never mind, I put this line in Page_Load():
this.Form.Target = "_blank";
and that opens the PDF file in a new page. Thanks.