You need to sign in to do that
Don't have an account?
Richie D
Table of Contents in a pdf
Hi,
I'm trying to create a table of contents in a visualforce page rendered as a pdf. Has anybody done this? Is this even possible?
I'm looking for something that would end up looking like:-
1. Lorem Ipsum......................1
2. Lorem Ipsum......................2
3. Lorem Ipsum......................2
4. Lorem Ipsum......................3
(heading).............................(page number)
I know I can do the first bit but I don't have any way of knowing which page the heading will fall on due to differing content lengths.
Thanks for any help.
Rich.
http://boards.developerforce.com/t5/Apex-Code-Development/How-to-change-font-family-to-arial-when-the-vf-page-is-rendered/m-p/482069#M88788
I think this can be achieved by using JQuery.
This can be done using the <bookmark> tag in the <head> of the document:
The PDF Renderer, just FYI, is part of this old project:
https://code.google.com/archive/p/flying-saucer/
<apex:page renderAs="pdf" showHeader="false" standardStylesheets="false">
<apex:pageBlock title="Table of Contents">
<!-- Add TOC entries here -->
<apex:pageBlockSection title="Section 1" />
<apex:pageBlockSection title="Section 2" />
<apex:pageBlockSection title="Section 3" />
</apex:pageBlock>
<!-- Content of the PDF page -->
<apex:pageBlock title="Page 1">
<!-- Page 1 content goes here -->
</apex:pageBlock>
<apex:pageBlock title="Page 2">
<!-- Page 2 content goes here -->
</apex:pageBlock>
<apex:pageBlock title="Page 3">
<!-- Page 3 content goes here -->
</apex:pageBlock>
</apex:page>
<style> .page-break { page-break-before: always; } </style>
Thanks
Prahlad Bandhu