iPad, RadWindow and PDF

3 posts, 0 answers
  1. Roberto
    Roberto avatar
    2 posts
    Member since:
    May 2014

    Posted 06 May 2014 Link to this post

    Hi,
    first of all excuse me if i'm posting in the wrong place and for my english...

    I've a problem related to the RadWindow ASP.NET AJAX component and the iPad devices.
    I'm using this component to display some informations inside a RadGrid with the possibility to download documents (mostly PDF).
    The RadWindow is populated with an aspx page and the selected document is first save into a session and then ready for download.
    On desktop devices everything is working correctly and the user can choose if he want to open or download the file.
    Instead on iPad the PDF document is opened directly inside the RadWindow control, without scroolbars, making it impossible to read the entire document.

    Is there a solution to solve the problem and read the entire document on iPad devices, maybe opening it in a new page?

    This are parts of my code:

    DOWNLOAD METHOD:

    string disposition = saveAsFile ? "attachment" : "inline"; //SET TO TRUE

    HttpContext context = HttpContext.Current;

    context.Response.Clear();
    context.Response.ClearHeaders();
    context.Response.ClearContent();
    context.Response.ContentType = MimeMapping.GetMimeMapping(filename);
    context.Response.AddHeader("Content-Length", dataToRead.ToString());
    context.Response.AddHeader("Content-Disposition", String.Format("{0}; filename=\"{1}\"", disposition, filename));

    RADWINDOW

    <telerik:RadWindow runat="server"
        ID="modalPopup"
        Modal="true"
        AutoSize="true"
        MinWidth="900px"
        ReloadOnShow="true"
        Animation="Fade"
        VisibleStatusbar="false"
        Style="z-index: 100000">
    </telerik:RadWindow>

    Thanks

  2. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3600 posts

    Posted 07 May 2014 Link to this post

    Hello Roberto,

    This is most likely a problem between iOS and Safari - iframes cannot be scrolled in it in general, and this is what RadWindow uses. Could you try loading the page/PDF in a simple iframe instead of a RadWindow to see if this is the case?


    Regards,

    Marin Bratanov
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Roberto
    Roberto avatar
    2 posts
    Member since:
    May 2014

    Posted 12 May 2014 in reply to Marin Bratanov Link to this post

    Thank you for your response. 
    I solved the problem by using the ContentTemplate instead of the NavigationUrl of the RadWindow.
    In such way everything is on a single page and now is working correctly also on iPad devices.

    Regards,

    Roberto
Back to Top