I know this is an old post, but it's worth mentioning that my team has just introduced a document builder feature in our Scroll Documents app that enables you to do this.
Scroll Documents defines a document as a collection of Confluence pages (usually a page tree), and this new feature gives you the ability to compile a new document by searching for and copying pages from anywhere in your instance.
So the way this feature works is when you create a document, you can assemble copies of Confluence pages to insert in your document. You can also drag and drop to define a new structure if you need your pages to appear in a different order in the export – essentially giving you the custom export structure you're looking for.
Our documentation goes into more detail.
If you have any questions, we'd be happy to help or show you a demo of the app. Just get in touch with us: firstname.lastname@example.org.
One option would be to build a page with content from the pages you want to include using the Include Page Macro (https://confluence.atlassian.com/doc/include-page-macro-139514.html) or the Excerpt Include Macro (https://confluence.atlassian.com/doc/excerpt-include-macro-148067.html)
Then you can export the page with your desired content.
If you don't want to create a new page for the export, you will still need to bring all the pages to the same space in some way.
When they are in the same space, you can use Content Exporter for Confluence addon to export a whole page tree or any selected children of a page:
It’s been great to hear from fellow users over the last few weeks about the best tips and fun moments you’ve had working on Confluence since the transition to working remote. I’d love to keep the c...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events