PDF opening i new windows

PDF opening i new windows

Forum member · Mar 13, 2006
hi! In my asp.net 2.0 web project (c#), I'm opening a new webform and uses the following line of code to get the pdf out of the webform: document.DrawToWeb(this, false); When executing this line, the pdf opens in a new window, and my webform is lyieng empty. Is there a way to open the pdf within the webform instead? Or a way to open the pdf without showing any webform att all? Its not pretty having this empty webform, which only will annoy the users. best regards, henrik stigebrandt

Re: PDF opening i new windows

Support · Mar 13, 2006
Hello Henrik, Actually the document.DrawToWeb method is intended to open the document up in the same browser window. If the PDF that you are creating is opening up in a new window there could be several things happening. First, make sure that nothing is being output after the PDF is creating by adding a Response.End directly after the "document.DrawToWeb(...)" line of code. Secondly, remember that there is a setting in Acrobat that specifies whether the PDF should be opened up in the browser or whether it should open up its own Acrobat window. Varying slightly depending on your version of Acrobat it will be in the File --> Preferences --> Internet --> "Display PDF in browser" checkbox. Make sure this is checked. Lastly, it is possible that the Acrobat plug-in for the browser has gotten corrupt. If this is the case then it will require a reinstall of Acrobat. Feel free to keep us updated on what fixes the problem for you or if anymore assistance is required. Thanks, ceTe Software Support Team

Re: PDF opening i new windows

Forum member · Mar 13, 2006
Actually, the checkbox "Display PDF in browser" is checked by default. After struggling with it, as a desperate measure I tried unchecking, and there it was! Now it all works just fine. best regards, henrik stigebrandt