Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to export pdf via REST API?

ABoerio November 5, 2020

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.

Immagine 2020-11-05 175815.jpg

 

Thanks, ciao, Andrea

2 answers

0 votes
Urban_Pettersson April 11, 2024

Having struggled with this for a bit I took the liberty of creating a GitHub gist detailing the necessary steps. The gist is using NodeJs, but should hopefully be easy to translate to any language.

0 votes
Brant Schroeder
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 31, 2020

@ABoerio here is a previous community post on this using other languages but the web service call will be the same.  https://community.atlassian.com/t5/Confluence-questions/Export-page-to-pdf-using-rest-call/qaq-p/1085529

ABoerio February 24, 2021

Hi @Brant Schroeder sorry for very late feedback. Thanks for your hint. I'll give it a try for sure.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
7.4.1
TAGS
AUG Leaders

Atlassian Community Events