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

RADHtmlPlaceHolder and PDF

6 Answers 106 Views
HTMLPlaceHolder
This is a migrated thread and some comments may be shown as answers.
Mano Sadeh
Top achievements
Rank 1
Mano Sadeh asked on 14 Jul 2010, 05:08 PM
Hey,

I'm trying to use RADHtmlPlaceHolder to show a PDF file by setting the SourceUrl to this URL:
http://173.45.117.66/ArcGIS/rest/services/Duke_GDB/FeatureServer/3/109/attachments/38

Instead of showing the PDF file inside the RADHtmlPlaceHolder I see the Open/Save file Dialog (in Internet Explorer).

Is there anyway to show this PDF inside the RADHtmlPlaceHolder?

Thanks,
Mano

6 Answers, 1 is accepted

Sort by
0
Tina Stancheva
Telerik team
answered on 19 Jul 2010, 10:20 AM
Hello Mano Sadeh,

You can set the PDF in an iframe inside an html page and use the HTMLPlaceHolder to display this page. I prepared a sample project illustrating this approach. Please take a look at it and let me know if it works for you.

Best wishes,
Tina Stancheva
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Sandip
Top achievements
Rank 1
answered on 19 Apr 2011, 03:51 PM
Hi;
      I have a requirement of displaying a pdf file in a Silverlight application. 

      Followed your approach.
     
     Having a silverlight application within that a RadHtmlPlaceholder i mapped a aspx page. aspx page having iframe source mapped to pdf file of the server side. When its running on client machine. its not able to map the pdf of the server side.

    Please suggest how to resolve this issue,


Warm Regards

sandy
0
Tina Stancheva
Telerik team
answered on 22 Apr 2011, 09:26 AM
Hi Sandip,

I am not sure what might be causing this issue. How do you define the pdf source in the IFrame element - is it with an absolute or relative URI? If the URI isn't absolute, can you try defining the absolute path to the PDF document and see if the issue is resolved? Also, you might be experiencing cross-domain issues so you should check your cross-domain policy as well.

Unfortunately, since I can't reproduce the issue on our side I am merely shooting in the dark. But if you manage to create a sample reproducing your scenario and the issue, we will be able to further investigate it.

Kind regards,
Tina Stancheva
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Andy
Top achievements
Rank 1
answered on 06 Oct 2011, 02:29 PM
Tina:

Sorry to hijack another thread, but I think that this is related.

I have a site inside a RadHtmlPlaceholder that needs to be able to pass data to the outer Silverlight application. I have tested this using sample code from Telerik and it works really slickly using the [ScriptableType] options. However, the HTML page that I am hosting is on a different machine, and when I try to use that it throws:

--
[09:17:38.219] Permission denied to access property 'GetSilverlightApplication' @ http://localhost:2118/Event/AddOrder/Promotional/29614:239

I expect that this is a cross-site/domain issue - but in this case it is between two different application running on different ports on localhost. Does that count as cross-domain, and if so is there a good workaround to allow privilege, or to pass a reference to the Silverlight object into the RadHtmlPlaceholder?

Thank you!
Andy
0
Tina Stancheva
Telerik team
answered on 11 Oct 2011, 08:36 AM
Hello Andy,

In this case Silverlight can consider the two applications as hosted on different domains only because they are hosted on a different ports. So setting up a cross-domain policy can help you overcome this issue.

In a cross-domain call the Silverlight first looks for the clientaccesspolicy.xml file. If this file doesn't exists it will look for the crossdomain.xml file. More information about how to set up these files you can find here.

Let us know if we can further assist you.

All the best,
Tina Stancheva
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Charlie
Top achievements
Rank 1
answered on 29 Nov 2011, 08:56 PM
This could be caused by your HTTPHandler adding a header

 

context.Response.AddHeader("Content-Disposition", "attachment;filename=" +
fileName);

which will cause the browser to save the file instead of display it.
Tags
HTMLPlaceHolder
Asked by
Mano Sadeh
Top achievements
Rank 1
Answers by
Tina Stancheva
Telerik team
Sandip
Top achievements
Rank 1
Andy
Top achievements
Rank 1
Charlie
Top achievements
Rank 1
Share this question
or