RADHtmlPlaceHolder and PDF

7 posts, 0 answers
  1. Mano Sadeh
    Mano Sadeh avatar
    8 posts
    Member since:
    May 2010

    Posted 14 Jul 2010 Link to this post

    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
  2. Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 19 Jul 2010 Link to this post

    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
  3. DevCraft banner
  4. Sandip
    Sandip avatar
    15 posts
    Member since:
    Nov 2010

    Posted 19 Apr 2011 Link to this post

    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
  5. Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 22 Apr 2011 Link to this post

    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
  6. Andy
    Andy avatar
    4 posts
    Member since:
    Aug 2011

    Posted 06 Oct 2011 Link to this post

    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
  7. Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 11 Oct 2011 Link to this post

    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 >>

  8. Charlie
    Charlie avatar
    1 posts
    Member since:
    Nov 2011

    Posted 29 Nov 2011 Link to this post

    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.
Back to Top
DevCraft banner