CLI tool to export Notion pages to PDF files.
Wrapper around notion-easy-export
package.
Uses yargs. Ahoi!
wkhtmltopdf
is required to export PDF files.
nodejs >= 22
is version this tool tested with.
- Use VSCode or any other editor that supports DevContainer to open the project in a container.
- Wait until
postCreateCommand
finishes. It will install all the dependencies. - Invoke the command in container shell. See Usage section for more details.
git clone ...
cd notion-easy-export-cli
npm install
Usage: index.js <pageId>
Commands:
index.js single Single mode. It allows users to generate a separate PDF for e
ach of the HTML pages.
index.js merge It allows users to generate a single PDF for the entire expor
t. It concatenates each of the notion pages smartly to genera
te a single document.
Options:
--help Show help [boolean]
--version Show version number [boolean]
-t, --token Notion token_v2 [string] [required]
-p, --pageId Notion page id [string] [required]
See notion-easy-export for more details.