
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
whatsapp2pdf
Advanced tools
Transform WhatsApp messages into beautiful, printable PDF documents (with TypeScript support).
Convert WhatsApp chat exports (Android & iOS) into professional PDF files with authentic WhatsApp styling, emoji support, themes, and media attachments. Perfect for preserving memories, creating archives, or sharing conversations.
npm install -g whatsapp2pdf
npm install whatsapp2pdf
Requirements: Node.js 18.7 or higher
# Basic conversion
whatsapp2pdf chat.zip
# With options
whatsapp2pdf chat.zip -o my-chat.pdf --theme dark --images
# Full help
whatsapp2pdf --help
| Option | Description | Default |
|---|---|---|
--list-themes | Display built‑in themes | - |
-o, --output <file> | Output PDF path | Auto-generated |
-u, --main-user <name> | Set right‑side sender | First contact |
-p, --privacy | Hide contact names | true |
-i, --images | Include attachments | true |
-t, --theme <name> | Theme: light / dark | light |
--theme-path <json> | Load custom theme JSON | - |
-s, --start <YYYY-MM-DD> | Filter start date | - |
-e, --end <YYYY-MM-DD> | Filter end date | - |
-k, --keyword <word> | Keyword filter | - |
-v, --verbose | Debug info | - |
-h, --help | Show help | - |
-V, --version | Show version | - |
const WhatsApp2PDF = require("whatsapp2pdf");
// Simple conversion
await WhatsApp2PDF("./chat.zip")
.output("chat.pdf")
.convert();
// Advanced options
await WhatsApp2PDF("./chat.zip")
.theme("dark")
.mainUser("Your Name")
.seal() // Privacy mode
.images() // Include media
.searchDate("2024-01-01", "2024-12-31")
.output("chat.pdf")
.convert();
.output(path) - Set output PDF path
.theme(name|path|object) - Set theme
.mainUser(name) - Set right-side sender
.seal(enable) - Partially hide contact names
.images(enable) - Include media
.searchDate(start, end) - Filter by date
.searchKeyword(keyword) - Filter by keyword
.verbose(enable) - Enable debug logging
.parse() - Parse without generating PDF
.convert() - Generate PDF
WhatsApp2PDF.listThemes() - Get available themes
[ CLI / API ]
|
v
+----------------+
| Parser |
| chat.zip/txt |
+----------------+
|
v
+----------------+
| Renderer |
| PDFKit + sharp |
+----------------+
|
v
output.pdf
whatsapp2pdf --list-themes
{
"background_color": "#EAE6DF",
"background_image": "./light.png",
"bubble": {
"color": "#D9FDD3",
"color_other": "#FFFFFF"
},
"fonts": {
"color": "#111B21",
"family": "Helvetica",
"size": 14
}
}
{
"background_color": "#0A1014",
"background_image": "./dark.png",
"bubble": {
"color": "#144D37",
"color_other": "#233138"
},
"fonts": {
"color": "#F7F8FA",
"family": "Helvetica",
"size": 14
}
}
Theme JSON supports:
Use with:
whatsapp2pdf chat.zip --theme-path ./my-theme.json
npm test
node --max-old-space-size=4096 $(which whatsapp2pdf) chat.zip
Install Noto Emoji font in assets/fonts/NotoEmoji.ttf
Ensure ZIP contains a file starting with "WhatsApp Chat" and ending with .txt
Contributions welcome! Please see our GitHub repository.
MIT © stlong5
If WhatsApp2PDF saves you time or helps preserve your memories:
Made with ❤️ for preserving memories
FAQs
Convert WhatsApp chat export to PDF File
We found that whatsapp2pdf demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.