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.
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.
This is in Razor by the way. I've read about internal-destination, but I can't seem to get that to work either
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.
Have you tried this: http://stackoverflow.com/questions/7159747/xsl-fo-creating-dynamic-table-of-contents
is working on a reply...