- Uses an automated web based login to Confluence on a headless browser to export a PDF using Confluence's own PDF export.
- Does not require Confluence API to be turned on to export files.
- Script can be changed to do any manual steps you can do in a browser (e.g. export to other formats, make changes).
- Script is an automated specific case and is not ideal to configurations or accepting parameters. For configurations, use the Confluence API or CLI.
Install Node 10.18.1+ or later
npm install
cp config/default.yaml config/local.yaml
Edit local.yaml with your Confluence username, password, and URL for the export setting in your space.
node index.js
- Record use case in Chrome recorder
- Install Puppeteer which will include a recent version of Chromium
npm i puppeteer
- Install config to manage configuration files
npm install config
- Install js-yaml to parse yaml configuration
npm i js-yaml
- confluence-scraping
- Confluence manual PDF export
- Confluence Command Line Interface (CLI) and Examples with PDF export
- Python API for Confluence and documentation
- batch-export-wiki-pdf - recursively save PDFs from a parent page and its children