{"id":13907786,"url":"https://github.com/ganeshh123/notion-pdf-export","last_synced_at":"2025-09-23T11:26:16.997Z","repository":{"id":41513418,"uuid":"284669884","full_name":"ganeshh123/notion-pdf-export","owner":"ganeshh123","description":"A tool to allow batch PDF export for free Notion users. You can export as HTML and then use this tool to convert those into PDFs.","archived":false,"fork":false,"pushed_at":"2023-02-14T16:00:13.000Z","size":90935,"stargazers_count":467,"open_issues_count":14,"forks_count":29,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-09-11T16:52:39.164Z","etag":null,"topics":["batch","batch-pdf-export","export","html","nexe","notion","notion-pdf-export","pdf","pdf-generation","wkhtmltopdf"],"latest_commit_sha":null,"homepage":"https://app.gn3.sh/notion-pdf-export/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ganeshh123.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-08-03T10:23:46.000Z","updated_at":"2025-08-24T15:48:58.000Z","dependencies_parsed_at":"2024-12-23T10:37:29.437Z","dependency_job_id":null,"html_url":"https://github.com/ganeshh123/notion-pdf-export","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/ganeshh123/notion-pdf-export","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ganeshh123%2Fnotion-pdf-export","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ganeshh123%2Fnotion-pdf-export/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ganeshh123%2Fnotion-pdf-export/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ganeshh123%2Fnotion-pdf-export/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ganeshh123","download_url":"https://codeload.github.com/ganeshh123/notion-pdf-export/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ganeshh123%2Fnotion-pdf-export/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276564392,"owners_count":25664810,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-23T02:00:09.130Z","response_time":73,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["batch","batch-pdf-export","export","html","nexe","notion","notion-pdf-export","pdf","pdf-generation","wkhtmltopdf"],"created_at":"2024-08-06T23:02:10.420Z","updated_at":"2025-09-23T11:26:16.978Z","avatar_url":"https://github.com/ganeshh123.png","language":"JavaScript","funding_links":[],"categories":["HarmonyOS"],"sub_categories":["Windows Manager"],"readme":"# Notion PDF Export\n\nA tool to allow batch PDF export for free Notion users. You can export as HTML with subpages and then use this tool to convert those into PDFs.\n\n- [Download](#download)\n- [Usage](#usage)\n- [Building](#building)\n  - [Source Code](#source-code)\n  - [Running the Project on Node](#running-the-project-on-node)\n  - [Compiling an Executable](#compiling-an-executable)\n    - [Installing nexe](#installing-nexe)\n      - [To Install Automatically:](#to-install-automatically)\n      - [To Install Manually:](#to-install-manually)\n    - [Compiling Executables](#compiling-executables)\n      - [Compile Automatically](#compile-automatically)\n      - [Compile Manually](#compile-manually)\n- [Credits](#credits)\n  - [wkhtmltopdf](#wkhtmltopdf)\n  - [Assets](#assets)\n\n## Download\n\nGet the latest download for Windows and macOS from the releases page:\n\n[https://github.com/ganeshh123/notion-pdf-export/releases](https://github.com/ganeshh123/notion-pdf-export/releases/latest)\n\n[Download for Windows](https://github.com/ganeshh123/notion-pdf-export/releases/download/1.3.0/notion-pdf-export_windows_1.3.0.zip)\n\n[Download for macOS](https://github.com/ganeshh123/notion-pdf-export/releases/download/1.3.0/notion-pdf-export_mac_1.3.0.zip)\n\n## Usage\n\n[![video guide](https://i.ytimg.com/vi/txKhyzwkAus/maxresdefault.jpg)](http://www.youtube.com/watch?v=txKhyzwkAus \"video_guide\")  \n\n[Video Guide](https://youtu.be/txKhyzwkAus)\n\n\n1. Download the tool and extract.\n    ![downloaded_program](docs/downloaded_program.jpg)\n2. In [Notion](https://notion.so), place all the pages you wish to export into one page and click Export, choose 'HTML' and ensure 'Include Subpages' is on.\n    ![notion-export](docs/notion-export.jpg)\n3. Extract the export to find a list of HTML files and folders for each page. Place the HTML files with folders containing images in the same folder as `notion-pdf-export.exe` (Windows) or `notion-pdf-export` (macOS).  \n    ![placing-markdown-files](docs/placing-html-files.jpg)\n4. Double click `notion-pdf-export.exe` (Windows) or `notion-pdf-export` (macOS) and wait for the process to be completed.  \n    ![running-program](docs/running-program.jpg)  \n    If nothing happens, you may need to go to macOS security settings and click 'Open Anyway':  \n    ![macOS_security](docs/macos_security.jpg)\n5. All the individual pages can be found converted into PDF Documents inside the `pdfs` folder.  \n    ![created_pdfs](docs/created_pdfs.jpg)\n\n---\n\n## Building\n\n### Source Code\n- Repository: [ganeshh123/notion-pdf-export](https://github.com/ganeshh123/notion-pdf-export)\n- HTTPS Clone: `https://github.com/ganeshh123/notion-pdf-export.git`\n- SSH Clone: `git@github.com:ganeshh123/notion-pdf-export.git`\n\n### Running the Project on Node\n\n1. Clone/Download the project and run the command in the project root directory:\n    ```bash\n    npm install\n    ```\n2. Run this command to run the script:\n    ```bash\n    node index.js\n    ```\n### Compiling an Executable\n\nThis is tricky. A lot of adjustments had to be made so that it can run without node.\n\n#### Installing nexe\n\nExecutables are compiled with a very [specific version of nexe](https://github.com/cspotcode/nexe/tree/fix-vfs) that allows access to the filesystem, which has a tricky setup procedure.\n\n##### To Install Automatically:\n\n- **Windows** - Run `install_nexe_win.bat` as admin, will take about 5 minutes to install fully.\n- **macOS** - Run the `install_nexe_mac` shell script, will take about 5 minutes to install, and you will need to enter an admin password. This sometimes doesn't seem to work properly, so might be worth doing manual install if there's problems.\n\n##### To Install Manually:\n\n1. Firstly, install the general [nexe](https://www.npmjs.com/package/nexe) package  globally:\n    - **Windows** (in command prompt must be running as admin):\n        ```bash\n        npm install -g nexe\n        ```\n    - **macOS** (in the terminal):\n        ```bash\n        sudo npm install -g nexe\n        ```\n\n2. In the project root folder build some executables with this version of nexe to download node binaries for Windows and macOS:\n    ```bash\n    nexe . --target win32-x86-10.13.0\n    nexe . -t macos-10.13.0\n    ```\n    This will download the binaries we need for later, delete the executables built with this for now.\n3. Now we need to install a [specific version of nexe](https://github.com/cspotcode/nexe/tree/fix-vfs) that allows access to the filesystem:\n   - **Windows** (in command prompt must be running as admin):\n        ```bash\n        npm install -g cspotcode/nexe#19a5046\n        ```\n    - **macOS** (in the terminal):\n        ```bash\n        sudo npm install -g cspotcode/nexe#19a5046\n        ```\n    Now we should have the correct version of nexe for building. Confirm by running:\n\n    ```bash\n    nexe -v\n    ```\n    Check that the version is `4.0.0-beta.4`\n\n#### Compiling Executables\n\n##### Compile Automatically\n- **Windows** (on a Windows system):\n    Run the batch script `build_win32.bat` to build a Windows executable. This can be found in `/dist/win32` and everything in that folder must be distributed together.\n - **macOS** (on a macOS system):\n    Run the shell script `build_macos` to build a macOS executable. This can be found in `/dist/macos` and everything in that folder must be distributed together.\n\nIf you wish to compile for macOS on Windows or vice versa, you can do so using the manual method below.\n\n\n##### Compile Manually\n- To build a **Windows** executable, in the root directory of the project, run the command:\n    ```bash\n    nexe . --target win32-x86-10.13.0 -o ./dist/win32/notion-pdf-export.exe\n    ```\n    When distributing the executable `notion-pdf-export.exe` must be placed in a directory with the original `utils` folder from the source.\n\n- To build a **macOS** executable, in the root directory of the project, run the command:\n    ```bash\n    nexe . -t macos-10.13.0 -o ./dist/macos/npe\n    ```\n    Note that this is built under the name `npe` due to an issue with accessing the current directory.\n    When distributing, place the `npe` executable it in a directory with the following:\n    - The original `utils` folder from the source code\n    - An executable unix shell script with the following contents, with the file name of `notion-pdf-export`:\n    ```bash\n    #/bin/bash\n    cd \"$0\"/..\n    ./npe\n    ```\n    This can be obtained from `mac_script.sh` or found inside `/dist/macos` This script is needed to set the current directory before the `npe` executable is run.\n\n## Credits\n\n### wkhtmltopdf\n\nThis project uses wkhtmltopdf for the conversions. This brilliant tool was created by [Jakob Truelsen](https://github.com/antialize) and is now maintained by [Ashish Kulkarni](https://github.com/ashkulz). Version `0.12.6` has been used, and can be [downloaded here](https://wkhtmltopdf.org/downloads.html).\n\nwkhtmltopdf is released under the LGPL-3.0 License which can be found at `utils/wkhtmltopdf/LICENSE`. The source code is available at the [wkhtmltopdf repository](https://github.com/wkhtmltopdf/wkhtmltopdf).\n\n### Assets\n\nIcon by [Alex Martynov](https://dribbble.com/Rengised) obtained from [IconScout](https://iconscout.com/icon/notion-3220890).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fganeshh123%2Fnotion-pdf-export","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fganeshh123%2Fnotion-pdf-export","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fganeshh123%2Fnotion-pdf-export/lists"}