Skip to content

Repository files navigation

iMessage PDF Exporter

A local macOS app for browsing iMessage history and exporting conversations as printable books. Messages and attachments stay on the computer; the Apple Messages database is opened read-only.

Features

  • Browse, search, and pin individual or group conversations
  • Inspect available history by year and month
  • Render images, videos, reactions, rich links, and attachments
  • Filter long conversations to a date range
  • Export an A5 print-ready PDF with optional QR codes for links
  • Keep contact names and pinned conversations in a separate local app database

Installation

The packaged app currently supports Apple Silicon Macs. Download the latest DMG from GitHub Releases, open it, and drag iMessage PDF Exporter into Applications. Node.js is bundled in the app.

The app is currently unsigned. First try to open it from Applications. If macOS blocks it, open System Settings > Privacy & Security, scroll down to the Security section, and choose Open Anyway for iMessage PDF Exporter. Confirm Open when prompted. The Open Anyway option only appears after you have tried to launch the app once.

As a last-resort quarantine workaround for a release you downloaded from this repository:

xattr -dr com.apple.quarantine "/Applications/iMessage PDF Exporter.app"

Only run that command for a DMG you obtained from this project's release page and whose checksum matches SHA256SUMS.txt.

Usage

First Launch

The app checks the standard ~/Library/Messages location automatically. macOS requires Full Disk Access for this folder, so the app will explain the permission and open the correct System Settings pane. Add iMessage PDF Exporter, enable it, then relaunch the app.

You can also point the app at a copied backup containing chat.db and an Attachments directory.

PDF Features

  • Clean, print-friendly layout
  • iMessage-style message bubbles
  • Timestamps and sender information
  • Embedded images and link previews
  • Proper page breaks and formatting
  • Date separators for better organization
  • Optional QR codes in the inner margin for printed links

The default page size is A5 (148 x 210 mm / 5.83 x 8.27 in). One tested physical-book configuration is Lulu with Color, 80# White Coated paper, Hardcover Case Wrap, and a Matte cover.

Technical Details

Built With

  • Next.js 15 - React framework with App Router
  • TypeScript - Type safety
  • Tailwind CSS - Styling
  • node:sqlite - built-in SQLite database access (read-only)
  • Electron - packaged macOS desktop shell and native PDF export
  • date-fns - Date formatting

Database Schema

The app reads from the standard iMessage SQLite database with these key tables:

  • chat - Conversation metadata
  • message - Individual messages
  • handle - Contact information
  • attachment - File attachments
  • Various join tables for relationships

Security Notes

  • The app runs locally and only accesses your local files
  • No data is sent to external servers
  • Database access is read-only
  • Paths are stored in browser localStorage

Troubleshooting

Common Issues

  1. "Database not found": Confirm Messages has downloaded locally or select a copied backup
  2. "No conversations found": Check that the database file is accessible and not corrupted
  3. "Attachments not loading": Verify the attachments folder path is correct
  4. Permission errors: Add the app under Full Disk Access, then quit and reopen it

File Permissions

For the packaged app, grant iMessage PDF Exporter permission:

  1. Open System Settings > Privacy & Security > Full Disk Access
  2. Add iMessage PDF Exporter from Applications
  3. Enable it, then quit and reopen the app

Development

Requires Node 24 and pnpm 10.

pnpm install
pnpm dev             # browser development at localhost:3000
pnpm electron:dev    # prepare and launch the Electron shell
pnpm test
pnpm seed:demo       # build .demo/chat.db + .demo/Attachments for visual QA
pnpm electron:build  # unsigned Apple Silicon DMG, including Node 24

The synthetic backup includes Component Gallery — Incoming & Outgoing, a single conversation with paired examples of every rendered message/media card. Point the app at .demo/chat.db and .demo/Attachments; the data is entirely synthetic and safe to use for screenshots and regression checks.

electron:dev rebuilds the standalone Next server before launching Electron. Renderer hot reload remains available through pnpm dev; the packaged-server development command requires a restart after code changes.

Project Structure

├── app/                    # Next.js app directory
│   ├── api/               # API routes
│   ├── conversation/      # Conversation pages
│   └── layout.tsx         # Root layout
├── components/            # React components
├── lib/                   # Utilities and database code
│   ├── db/               # Database connection and queries
│   └── pdf/              # PDF generation
└── public/               # Static assets

API Endpoints

  • GET /api/conversations - List all conversations
  • GET /api/messages - Get messages for a conversation
  • GET /api/attachments/[id] - Serve attachment files
  • POST /api/generate-pdf - Generate PDF from conversation

License

This project is for personal use. Please respect Apple's terms of service and privacy policies when using this tool.

Release verification is tracked in docs/release-checklist.md. Future product direction is tracked in docs/roadmap.md.

Disclaimer

This tool is not affiliated with Apple Inc. Use at your own risk. Always backup your data before using third-party tools with your personal information.

About

No description or website provided.

Topics

Resources

Stars

6 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages