This is a migrated thread and some comments may be shown as answers.

iPad, RadWindow and PDF

2 Answers 72 Views
Window
This is a migrated thread and some comments may be shown as answers.
Roberto
Top achievements
Rank 1
Roberto asked on 06 May 2014, 10:44 AM
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 Answers, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 07 May 2014, 01:43 PM

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.

 
0
Roberto
Top achievements
Rank 1
answered on 12 May 2014, 12:47 PM
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
Tags
Window
Asked by
Roberto
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Roberto
Top achievements
Rank 1
Share this question
or