+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / linking to a page within a PDF that is stored in a library

linking to a page within a PDF that is stored in a library

4 posts, 0 answered
  1. Laura
    Laura avatar
    311 posts
    Registered:
    25 Feb 2008
    09 Feb 2011
    Link to this post
    Is it possible to set something up so that the user can easily link to a specific page within a PDF housed in a library?  So for example the link will look like:  <A HREF="http://www.example.com/myfile.pdf#page=4">

    First of all the links in the library are http://www.example.com/librabry/myfile.sflb.ashx

    1. Would I have to first change the extension to be PDF as in this KB article?
    2. Can I set it so that the user can input a page number as an option for a PDF in a Library?

    Thank you.
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    09 Feb 2011
    Link to this post
    Hi Laura,

    We do not have this option out of the box. You need to create a custom control that uses named anchors.

    Greetings,
    Ivan Dimitrov
    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. Laura
    Laura avatar
    311 posts
    Registered:
    25 Feb 2008
    11 Feb 2011
    Link to this post
    Yes, that is what I thought.

    I went ahead and changed it so that the liks will use the extensionfor PDF's.  If I go to an exisiting link and manaully add the #page=3  - if the link has the shref in it, does that cause it to revert back to the link withough the #page=3?  It seems to remove it after I click save.

    <a sfref="[Libraries]a3c042f8-894f-48e6-9da8-53e45cf7ad87" href="/Libraries/Sample_PDF_Library/Sample_PDF_1.pdf">

    So the sfref="[Libraries]a3c042f8-894f-48e6-9da8-53e45cf7ad87"  would have to be removed from the link, correct?
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    15 Feb 2011
    Link to this post
    Hello Laura,

    If you remove the sfref attribute and then rename the document the parser will not be able to update the dynamic link anymore.

    Kind regards,
    Ivan Dimitrov
    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
Register for webinar
4 posts, 0 answered