I don't see a generic way of achieving what you want. There's no concept of content box BTW (only that of a toc macro). OTOH you can selectively decide what to export, see https://extensions.xwiki.org/xwiki/bin/view/Extension/PDF%20Export%20Application/#HAdaptthecontentforPDFexport
One option would be to include this by default on all pages having a TOC but: 1) If the user doesn't check the TOC option when exporting to PDF, he/she may want to include the TOC from the page 2) If you include more than one page then the TOC option shows the TOC for all pages and thus it's not a duplicate anymore Thus, I don't see a generic option for this ATM and I'm tempted to close it as "won't fix". PS: I think this question is more for the forum IMO. |