Is it possible to dynamically export a Confluence PDF using Gradle during the software build process?

Hi all,

I am looking to export specific pages as PDFs from my Confluence Space dynamically during the software building process. Any tips on how to do so using Gradle?

Thanks