Export to pdf -table of content order

Hi,
When exporting to pdf, I have a different order in the list and a different one in the table of contents. (It seems to me the order is determined by the date the article was added)
How can I change the order in the table of contents?
xwiki 14.10
I use PDF Export

What list are you referring to? You mean the order of the pages in the page tree when selecting the pages to export? Then yes, there are some limitations, as indicated on Loading...

  • The user cannot change the page order, which for PDF export makes a lot of sense (you want to control where the content of each page appears in the generated PDF)
  • The page order in the generated PDF is not the same as the page order in the tree: the tree orders child pages by title whenever possible, while the PDF export orders child pages by reference; ordering by page title is very costly because we have to either render the title of all included documents or make a lot of database queries to get each set of child pages ordered

ATM the page order in PDF export is determined here xwiki-platform/xwiki-platform-core/xwiki-platform-export/xwiki-platform-export-pdf/xwiki-platform-export-pdf-default/src/main/java/org/xwiki/export/pdf/internal/job/DefaultPDFExportJobRequestFactory.java at master · xwiki/xwiki-platform · GitHub by DocumentReferenceComparator.

You should report an issue. The only workaround I can think of is to create a master page that includes the other pages, in the order you wish, and then export this master page.