A simple open-source tool that converts ChatGPT conversations into a clean, readable PDF format.
- Minimal setup — just Python & one library.
- Automatic speaker detection — formats
User:
andChatGPT:
differently. - Color-coded output for better readability.
- Page breaks handled for long conversations.
git clone https://github.com/YOUR_USERNAME/chatgpt-to-pdf.git
cd chatgpt-to-pdf
For macOS users (recommended approach):
# Create a virtual environment
python3 -m venv chatgpt_pdf_env
# Activate the virtual environment
source chatgpt_pdf_env/bin/activate
# Install reportlab
pip install reportlab
Alternative (if you have pip configured):
pip install reportlab
# If using virtual environment, activate it first
source chatgpt_pdf_env/bin/activate
# Run the script
python3 chatgpt_to_pdf.py
Paste your ChatGPT conversation into the terminal.
Example:
User: What is AI?
ChatGPT: AI stands for Artificial Intelligence.
User: Thanks!
ChatGPT: You're welcome!
Press Enter on a blank line to finish and generate your PDF.
The tool will create a file:
chatgpt_conversation.pdf
in the same folder.
- Language: Python 3
- PDF Library: ReportLab
Pull requests are welcome!
For major changes, please open an issue first to discuss what you'd like to change.
This project is licensed under the MIT License — you're free to use, modify, and distribute.
⭐ If you find this useful, star the repo on GitHub!