This article explains how to export pages in confluence from a Confluence space having specific labels into to PDF files using Confluence Command Line Interface (CLI) app.
Instructions
To export pages having a specific label, execute the following command:
Code Block |
---|
--action runFromPageList --labels "mylabels" --common " --action exportPage --id "@pageId@" --exportType "PDF" --file "@pageId@.pdf"" |
To export pages including subpages child pages that have a specific label, use:
Code Block |
---|
--action runFromPageList --labels "mylabels" --common " --action exportSpace --space "@space@" --title \""@title@\"" --exportType "PDF" --file "@pageId@.pdf"" |
The parameters and actions used in the above command commands are:
runFromPageList runs actions for each page from a page list.
exportSpace exports a space to a file.
exportPage exports pages export a page to a file.
--space, --title, and --id acts act as substitution variables.
--file refers Path/name to file of result to the path and the name of the file containing the resultant output.
--exportType indicates the type of pages the export should be in.
--labels pass the required label name, here “mylabels” is passed as a label value.