Automate Export Of Space To PDF
Asked by Michael Main:

Is there anyway to automate the export of a workspace to PDF? we are looking to export weekly updated documentation from confluence and to save the manually process each week we are looking for a way to automate this.


Answers:
author: Alicia Fehling
body: Does anybody know an option without any Add-Ons? I'm a littlebit shocked, that there is no solution without paying another Add-On?

comments: author: Oriyah Barzilay
body: Did you find a way?


author: Reshma Begum _Appfire_
body: Hi [@Michael Main](/t5/user/viewprofilepage/user-id/5177888) ,

<br />

As part of Appfire's acquisition of Bobswift, the documentation is migrated to [Appfire Command Line Interface (CLI)](https://appfire.atlassian.net/wiki/spaces/ACLI/overview)

<br />

CLI provides the [exportSpace](https://appfire.atlassian.net/wiki/spaces/CSOAP/pages/68454724/exportSpace) action to export the space to a file. Please refer to this [example](https://appfire.atlassian.net/wiki/spaces/CSOAP/pages/68458176/Examples#Examples-exportSpace) to export a space to pdf.  
You can install the client from this location: [Downloads](https://appfire.atlassian.net/wiki/spaces/ACLI/pages/60562669/Downloads) and install the connector app for your respective Atlassian host i.e., Confluence CLI from the [marketplace](https://marketplace.atlassian.com/apps/284/confluence-command-line-interface-cli?tab=overview&hosting=cloud)   

You need to have your own automation set up to run this action.

<br />

Hope this helps!

BTW, I'm from Appfire, the vendor of CLI app.

<br />

Thanks,  
Reshma


author: Riley Venable
body: Yes, it is possible to automate the export of a workspace to PDF using the Confluence Command Line Interface (CLI) <https://bobswift.atlassian.net/wiki/display/CSOAP/Confluence+Command+Line+Interface>. The CLI allows for the automation of a variety of Confluence tasks, including exporting a space to PDF. You can set up a script to run on a regular schedule to automatically export the space to PDF and save it to a designated location.

comments: author: Stefan Rodic
body: Can. you somehow share to me since I get this   
**stefan rodic@domain.co** doesn't have access to Confluence on **bobswift.atlassian.net** .


author: Joshua Smith
body: Yes. I have tried this and I get a PDF but it says that the PDF is corrupt. When I open the PDF with notepad, the is a big long url that will actually open what looks like it should be the PDF in a browser. But I need the PDF to work.


author: Bartosz Maleta
body: Riley Venable

I am also getting "...doesn't have access to Confluence on bobswift.atlassian.net."

Could You please share this page or access to it?

[@Stefan Rodic](/t5/user/viewprofilepage/user-id/5334518)

Did You get access from Riley?


author: Sam Speight
body: I couldn't access the article so did some poking around.  
[https://marketplace.atlassian.com/apps/284/confluence-command-line-interface-cli?tab=overview\&hosting=cloud](https://marketplace.atlassian.com/apps/284/confluence-command-line-interface-cli?tab=overview&hosting=cloud)

You can see in the description that it was formerly the add-in from Bob Swift.   
Unfortunately it is a paid add in. Probably not something I can justify for the narrow use case I wanted it for unfortunately.


author: David Puchosic
body: Hi all,  
We recently joined the Cloud platform and running the CLI.   
For PDF Exports, I get the same result as Joshua reported above. The PDF Export was always 2kb and noticed it has the aws link and it works to download the file.

However, is there a way to avoid this? I tried the --options useUIApi as well.  

A space HTML export works fine and you get a downloaded zip file returned.  

Thanks!


author: David Puchosic
body: I believe my issue above is tied to a limitation in size of space content that PDF can handle. It would be ideal to possibly output based on a label collection. Vote it up! <https://jira.atlassian.com/browse/CONFCLOUD-76314>


Tags: cli

cloud

confluence-cloud

export