Hi everyone,
I installed the Confluence CLI to export certain pages automatically with a script to pdf files.
Currently the script works like this:
$pageNames = ... --action getPageList --space $space --labels $relevant_labels
foreach ($page in $pageNames)
{
... --action exportPage --space $space --title $page --file "...\fileName.pdf"
}
This works fine and I get one pdf file per page. But I would prefer getting just a single pdf with all pages included. Especially when it comes to pages with subpages.
I know, that I could do it manually with the Content Exporter App, but the goal is that the pages are exported automatically.
Hope someone can give me some help here.
Thanks a lot!
Good day, I am Sreeja Manchala from the Bobswift support team. We have created a support request https://bobswift.atlassian.net/servicedesk/customer/portal/1/SUPPORT-8542 to better track your request. However, we couldn't add you as a reporter. Please sign up using this link https://bobswift.atlassian.net/servicedesk/customer/portal/1/user/signup and share the user name/id. We'll then add you as the reporter and confirm.
In order to export a space with all the pages(and subpages) included in it to a single PDF file, then please run the action command like below
--action exportSpace --space SRS --file "demo.pdf" --exportType "PDF"
If you would like to export a specific page in a space with all the subpages included in it then pass the command like below, here include the parameter “title” of the parent page
--action exportSpace --space SRS --title "demo" --file "demo.pdf" --exportType "PDF"
Please test the above commands with the latest version of the app https://bobswift.atlassian.net/wiki/spaces/ACLI/pages/16875586/Downloads and let us know the results, and we always recommend our customers to be on the latest version of the apps so that it includes the latest features and bug fixes.
Please let us know if you need any further assistance on this by signing up so, that we could help you better in resolving the issue on the ticket.
Regards,
Sreeja
Hi Sreeja,
thanks for your quick response and support! Really appreciate that.
I sign up to your Helpdesk with the same name as in this forum (Julius Knorr).
What I forgot to mention is, that I get the list of pages that need to be exported with getPageList --labels "mylabels".
So with exportSpace --title "pagetitle" I can export the page like a space and get a nice single pdf file. That's awesome and kinda solves my problem.
It would be even better, if exportSpace would support the --labels option. Then I could spare my first step. But even like that it works fine.
Thanks again!
Best regards,
Julius
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Julius Knorr
As per our discussion on support ticket https://bobswift.atlassian.net/servicedesk/customer/portal/1/SUPPORT-8542, the below commands worked for you.
To export the pages with the given labels,
--action runFromPageList --labels "mylabels" --common " --action exportPage --id "@pageId@" --exportType "PDF" --file "@pageId@.pdf""
To export the pages having the label along with the sub-pages included in it,
--action runFromPageList --labels "mylabels" --common " --action exportSpace --space "@space@" --title \""@title@\"" --exportType "PDF" --file "@pageId@.pdf""
If you have any further questions regarding our Appfire apps, please don't hesitate to contact us again; we're happy to help!
You can raise a request with us using the below link for Bobswift apps:
https://bobswift.atlassian.net/servicedesk/customer/portal/1
Regards,
Sreeja
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
welcome to the Atlassian Community.
I don’t know of a way how to leverage the standard PDF export for combining multiple pages into a PDF.
But I have another solution for you how you could accomplish it. My colleagues build the Scroll PDF Exporter. With this app you can define your own export templates, style them as you want - and also export one page and all its child pages.
And you can also start the export via a REST API, therefore you could trigger it from your script.
How does that sound?
Cheers,
Matthias.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Matthias,
thanks a lot! :)
This sounds really interesting and I will take a closer look at it.
Cheers,
Julius
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You're welcome.
And because I've read your reply above, there's an option in the Scroll PDF Exporter when you design a template that you specify labels for pages you want to include or exclude from the export.
Just to let you know.
Have success in finding a fitting solution for your use case.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.