Create ebooks from exisiting Kirby Pages - Advice required

We are asking for some advice about creating ebooks (epub) from existing Kirby website pages in the panel. We have a website (ajhall.net) with a lot of books, but also have all the chapters and other data online to make it possible to create an ebook from the click of a button in the panel. We are planing to use Pandoc (which we already use to make books outside the website), to make the ebooks with a button / interface in the panel for the ebook creation.

So does have anyone any experience of this?

I was thinking about virtual pages, which would allow the required manipulation of the existing page data into a format to process with Pandoc, but Iā€™m not sure how that would work in the panel?
Any better suggestions?

Could be something for content representations: https://getkirby.com/docs/guide/templates/content-representations

Thanks for the idea @distantnative, I shall look into it.