How do I get the Table of Contents Macro to create dot leaders and page numbers
Asked by Ryan Grisham:

the TOC renders headings and indents but there are no page numbers and dot leader options for a published document. How do I get the page numbers to render?


Answers:
author: Thomas Rough _K15t_
body: Hi Ryan,

Had you considered using an add-on to export your content to PDF?

If this would be an option for you, our app, Scroll PDF Exporter, would be able to meet your requirements for creating a ToC with leaders and page numbers.

Our app wouldn't do this via the Confluence ToC macro but instead would generate a ToC automatically from your heading levels, through the use of a customizable template that you apply when exporting. The customization all occurs within the apps inbuilt WYSIWYG template editor (see screenshot).

![Screen Shot 2018-05-23 at 13.44.54.png](https://community.atlassian.com/t5/image/serverpage/image-id/22751i665337B854BCE486/image-dimensions/591x258?v=v2 "Screen Shot 2018-05-23 at 13.44.54.png")

If you used our app, you would be able to keep the ToC macro on your page but at the same time have it excluded from the export via a specific option that we provide prior to exporting. This would then allow you to simply include the automatically generated ToC with your own customized preferences in the export.

Let me know if this information helps -- you can evaluate the app for free via the [Atlassian Marketplace](https://marketplace.atlassian.com/apps/7019/scroll-pdf-exporter-for-confluence?hosting=server&tab=overview) for 30 days.

Cheers, Thomas (K15t Software)


author: Thor
body: Your question is a little confusing. With the TOC macro you can display the headlines on a page but you ask for "page numbers to render". If you refer to numbered elements in your TOC you can achieve this by checking the option "Display Section Numbering".

You can further influence the rendering style by providing a "List Style" (e.g. *disc* , *circle* or *square*).

You can find these options when you inserted the TOC macro, select it and click on "Edit".

comments: author: Ryan Grisham
body: This is not confusing or hard. It is a matter of rendering dot leaders and page numbers to the right side of the page. I tried the pdf stylesheet commands and they would not render the page the way I need it. I am looking for actual printed page numbers - not section numbers.

This is how Confluence renders the PDF TOC:   
![TOC as rendered.png](https://community.atlassian.com/t5/image/serverpage/image-id/22327iED3C3FF6D8688908/image-size/large?v=v2&px=999 "TOC as rendered.png")

I had to save the PDF as word, create the TOC and save as PDF. This is doable but this is a complex document and when you switch from PDF to Word and back to PDF it creates other issues. I should be able to get dot leader and page numbers on a Confluence TOC this is not hard or complex. The page numbers are cut off on this image but they are there after the work around. My question is why do I have to go through all of this and create other problems in my document. This is not hard.

![TOC after exporting to work and back to pdf.png](https://community.atlassian.com/t5/image/serverpage/image-id/22329iCA9370DF7A8BF5A6/image-size/large?v=v2&px=999 "TOC after exporting to work and back to pdf.png")


author: Thor
body: Good that you added the pictures and some more explanation because I still think your original question was confusing. You said something about "page numbers" which don't exist on one single page that you can scroll down endless.

I don't mean to be offensive by telling you this. I tried to get more information about your issue to help to solve it **for free**.

You should give Scroll PDF a try, I can recommend the add-on and I don't know about an easy workaround without using a plugin.


Tags: confluence-server

server