Rad Window - opening PDF

10 posts, 0 answers
  1. Arindam
    Arindam avatar
    28 posts
    Member since:
    Mar 2009

    Posted 24 Mar 2009 Link to this post

    I am using below code for opening the radwindow

    function openDashboards(source, dest, e)
                var oWnd = window.radopen("http://localhost/docs/Oracle9i.pdf", null);
                oWnd.SetTitle("My Dashboards");
                return false;

    If I opening the link (i.e. http://localhost/docs/Oracle9i.pdf) from my IIS, it gets opened perfectly, but if I am opening through RadWindow it dont gets open, just a blank page. Could you please tell what is the problem or where I am going wrong?

    Please reply soon...

    Thanks in advance....
  2. Arindam
    Arindam avatar
    28 posts
    Member since:
    Mar 2009

    Posted 24 Mar 2009 Link to this post

    Thanks to All.. Problem is solved.....
  3. DevCraft R3 2016 release webinar banner
  4. jorge
    jorge avatar
    23 posts
    Member since:
    Apr 2007

    Posted 17 Apr 2009 Link to this post

    So what was the solution?
  5. Georgi Tunev
    Georgi Tunev avatar
    7207 posts

    Posted 21 Apr 2009 Link to this post

    Hello jorge,

    Make sure that ShowContentDuringLoad is set to true. If this doesn't help, please post here your exact RadWindow / RadWindowManager declaration along with the code that you use to open the PDF.

    Best wishes,
    Georgi Tunev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  6. Fawad
    Fawad avatar
    38 posts
    Member since:
    May 2009

    Posted 23 Aug 2011 Link to this post

    Hello Telerik

    Sorry for reviving old thread. But my problem is similar.

    I am running Windows 7 64-bit with Internet Explorer 9 (both 64-bit and 32-bit).

    I have pdf saved in binary data form, when I try to open it in the radWindow, it works when I hit F5 and run the Development Environment of Visual Studio 2010. But when I try to open it from IIS, then something strange happens, the RadWindow opens but blank and PDF opens in its own window!

    I tried using ShowContentDuringLoad by setting it to true, that did not help.
    Then I tried running InternetExplorer 9 32 bit, that worked fine and IIS nicely opened the radwindow and pdf opened in it nicely. But this mechanism does not work in 64-Bit version of IE 9.

     Any ideas?

    Here is code-behind in RadWindow for fetching it:

    /// <summary>
            /// Shows proposal.
            /// </summary>
            /// <remarks></remarks>
            private void ShowAttachments(Guid gIssue)
                    Response.Buffer = true;
                    Response.Charset = "";
                    Response.ContentType = "application/pdf";
                    Response.StatusCode = 200;
                    Response.StatusDescription = "OK";
                    Issues myIssue = _Utility.SelectIssue(gIssue); //My class to get the Issue object
                    //Adding a unique name to avoid caching
                    Response.AddHeader("content-disposition", "inline; filename=" + myIssue.Type.ToString() + "_" + DateTime.Now.ToString() + ".pdf");
                    Response.BinaryWrite(myIssue.Attachment); // Binary data

    And here is RadWindow declaration:

    <telerik:RadWindow ID="RdWndAttachment" BackColor="White" AutoSize="false" Behaviors="Close"
                    Skin="Outlook" VisibleStatusbar="false" Height="770px" ShowContentDuringLoad="true"
                    Width="950px" Modal="true" OnClientClose="Refresh" VisibleOnPageLoad="false"
                    runat="server" ReloadOnShow="true">
    ALL client events work fine.

    Please see and kindly help. 

    Kind Regards.
  7. Marin Bratanov
    Marin Bratanov avatar
    3564 posts

    Posted 25 Aug 2011 Link to this post

    Hi Fawad,

    Please try removing the ReloadOnShow property, as it appends a random querystring when the RadWindow is shown, so it may be causing some unexpected results.

    When this property is removed the RadWindow is just a movable iframe, thus I would also advise testing with a simple iframe (not a RadWindow) under a 64bit IE9 - if the same behavior is observed then this is the way IE9 works with iframes and there is nothing we can do about it. And IE9 has a lot of issues with iframes, so I wouldn't be surprised if this was one of its peculiarities.

    Please note that the inline content-disposition means that the browser will decide how to handle the response. More information on the matter is available in this article: http://greenbytes.de/tech/webdav/draft-reschke-rfc2183-in-http-latest.html.

    You can find a list with supported configurations in the following link: http://greenbytes.de/tech/tc2231/.

    I also believe you may find the following thread helpful: http://stackoverflow.com/questions/291813/best-way-to-embed-pdf-in-html.

    I hope the above information will help you in isolating the issue and work around this browser behavior.

    Kind regards,
    the Telerik team

    Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

  8. Fawad
    Fawad avatar
    38 posts
    Member since:
    May 2009

    Posted 25 Aug 2011 Link to this post

    Hi Marin

    Many thanks for your reply, but its not possible for now, as I checked online and apparently IE9 64 does not support handling of 32bit PDF reader!


    So I guess nothing is going to work as long as Adobe does not provide a 64bit version of their PDF ocx, so I have forced my application to use 32 bit version. (WebBrowserControl in exe so targeted exe to use x86 platform only, now it works inside RadWindow without removing ReloadOnShow

    Thanks for your reply anyway, much appreciated. :)

    Kind Regards.
  9. Kannan
    Kannan avatar
    14 posts
    Member since:
    Jul 2013

    Posted 31 Jul 2013 Link to this post

    Hi Arindam,

    Please post your solution.

  10. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 01 Aug 2013 Link to this post

    Hi Kannan,

    Please have a look into the following JavaScript I tried to open a PDF in a RadWindow on a RadButton click.

    <telerik:RadWindowManager ID="RadWindowManager1" runat="server">
    <telerik:RadButton ID="RadButton1" runat="server" Text="Open PDF" OnClientClicking="openPdf">

    <script type="text/javascript">
        function openPdf(sender, args) {
            var radwindow1 = radopen("http://localhost:49534/Telerik_2013/docs/Oracle.pdf", null);

  11. Kannan
    Kannan avatar
    14 posts
    Member since:
    Jul 2013

    Posted 01 Aug 2013 Link to this post

    Hi Priya,

    Thanks for the reply . I've Visual studio 2008 and Telerik 2008  Telerik.Web.UI  .I've to open PDF Radwindow

      <telerik:RadWindow ID="RadWindow1" Skin="ContainerStyle" VisibleStatusbar="false"
            EnableEmbeddedSkins="false" Modal="true" Title="RadWindow Output" Width="800px"
            Height="500px" Behavior="Close" runat="server"> 
    code behind: 
            RadWindow1.NavigateUrl = objFileManager.GetVirtualFilePath(objFileManager.GetFile(valTPContractUploadFile.CopiedFileFullPath));
            RadWindow1.VisibleOnPageLoad = true;

    But PDF open twice..When followed telerik threads and refer net it working but IE it is not working  . so kindly guide the code.

    In same page I'm using ajax setting

Back to Top
DevCraft R3 2016 release webinar banner