# Don't export toc macro in pdf

**URL:** <https://forum.xwiki.org/t/dont-export-toc-macro-in-pdf/83>\
**Category:** Help / Discuss\
**Created:** [May 21, 2017, 12:21pm UTC](https://forum.xwiki.org/t/dont-export-toc-macro-in-pdf/83 "2017-05-21T12:21:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![letitoa](https://forum.xwiki.org/letter_avatar_proxy/v4/letter/l/8491ac/32.png) [@letitoa](https://forum.xwiki.org/u/letitoa)\
**Post date:** [May 21, 2017, 12:21pm UTC](https://forum.xwiki.org/t/dont-export-toc-macro-in-pdf/83/1 "2017-05-21T12:21:36Z")

</div>

Hello,  
When exporting in pdf, the toc macro is exported.  
It is then duplicated in the pdf document (toc macro + table of contents).

I just want to keep the table of contents.  
How do I disable macro export?

Thanks,  
Lionel

---

<div class="post-metadata">

**Author:** ![vmassol](https://forum.xwiki.org/user_avatar/forum.xwiki.org/vmassol/32/6_2.png) [@vmassol](https://forum.xwiki.org/u/vmassol)\
**Post date:** [May 22, 2017, 6:38am UTC](https://forum.xwiki.org/t/dont-export-toc-macro-in-pdf/83/2 "2017-05-22T06:38:27Z")

</div>

Hi, I’ve added a FAQ entry for you at:

> **[How to exclude some content from PDF export? (XWiki.org)](http://www.xwiki.org/xwiki/bin/view/FAQ/How%20to%20exclude%20some%20content%20from%20PDF%20export)**
>
> Enterprise wiki for sharing knowledge

---

<div class="post-metadata">

**Author:** ![letitoa](https://forum.xwiki.org/letter_avatar_proxy/v4/letter/l/8491ac/32.png) [@letitoa](https://forum.xwiki.org/u/letitoa)\
**Post date:** [May 23, 2017, 1:56pm UTC](https://forum.xwiki.org/t/dont-export-toc-macro-in-pdf/83/3 "2017-05-23T13:56:12Z")

</div>

Thanks for the answer. It works.

---

<div class="post-metadata">

**Author:** ![Pbas](https://forum.xwiki.org/user_avatar/forum.xwiki.org/pbas/32/15_2.png) [@Pbas](https://forum.xwiki.org/u/Pbas)\
**Post date:** [May 24, 2017, 12:35pm UTC](https://forum.xwiki.org/t/dont-export-toc-macro-in-pdf/83/4 "2017-05-24T12:35:37Z")

</div>

You can use another way: create a pdf.css:  
[http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Configuration#HOverridetheCSSrules](http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Configuration#HOverridetheCSSrules)  
with

```auto
.floatinginfobox {
  display: "none";
}

```

I use Css Class `.floatinginfobox` because my TOC is in:  
`{{box cssClass="floatinginfobox" title=" **Nice TOC**"}}`

You can use your custom Class/Id from “Cleaned XHTML” generated.  
See: [Debuging style in PDF export in xwiki 8.4.4](https://forum.xwiki.org/t/debuging-style-in-pdf-export-in-xwiki-8-4-4/75)
