Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Eric Patton 21 posts 51 karma points
    Mar 15, 2013 @ 20:14
    Eric Patton
    0

    Table of Contents

    Is there any way to make a table of contents where you click on a header and it takes you to that section in the PDF? I've tried setting fo:basic-link elements and setting the external-destination="url('#myAnchorID')" and then setting a fo:block element's id to equal that value, but it just makes the browser go to a blank page when I click on the link. I've also tried setting external-destination="#myAnchorID" just to see, but that's a no-go as well.

  • Eric Patton 21 posts 51 karma points
    Mar 15, 2013 @ 20:18
    Eric Patton
    0

    This is in Razor by the way. I've read about internal-destination, but I can't seem to get that to work either

  • Eric Patton 21 posts 51 karma points
    Mar 15, 2013 @ 20:58
    Eric Patton
    0

    I read some more about fo in general, and I've got this now for the code:

    Here's the table of contents link:

    <fo:basic-link color="blue" text-decoration="underline" internal-destination="@handbookSectionNode.Id">
    @handbookSectionNode.SectionTitle
    <fo:page-number-citation ref-id="@handbookSectionNode.Id"/>
    </fo:basic-link>

    And here's the actual element it's linking to:

    <fo:block id="@handbookSectionNode.Id">
    <fo:inline font-weight="bold">@handbookSectionNode.SectionTitle</fo:inline>
    </fo:block>

     

    It's getting the correct page, but it won't do anything at all when I click on it. The mouse cursor doesn't even change when I hover over the link.

  • Darren Ferguson 1022 posts 3259 karma points MVP c-trib
    Mar 16, 2013 @ 10:24
Please Sign in or register to post replies

Write your reply to:

Draft