Hi,
I'm trying to write a simple Groovy script to communicate with our Confluence server instance and get done automatically the export to pdf o a page whose ID number is known.
I already communicate with Confluence this way to get information about pages, etc... but for this particular task I'm not getting to a solution.
How to get the pdf exported and downloaded to my local download folder, which is what normally happens when I click on the pdf export button?
In the picture the code I'm trying to use and the response I get from the call.

Thanks, ciao, Andrea