In a Confluence user macro, I want to get a list of all pages that are included in a custom PDF export (Browse -> Space operations -> PDF Export -> Custom Export). Typically, my export is a subset of the whole space, and I only want to list the pages that are included in the PDF.
How can I achieve that?