Skip to main content

Interactive GUI tool to add named destinations and clickable links to PDF files

Project description

PDF Destinator

An interactive GUI tool to add named destinations and clickable link regions to PDF files - without expensive software like Adobe Acrobat.

Features

  • Visual PDF navigation with zoom and page controls
  • Click to set destination positions for internal navigation
  • Drag to create link regions pointing to destinations or external URLs
  • Load/save destinations - preserves existing destinations in PDF
  • Hover-to-delete link regions with visual feedback
  • Mouse wheel scrolling with automatic page changes at boundaries
  • Keyboard shortcuts for efficient workflow
  • JSON configuration support for batch workflows
  • Diagnose mode to inspect existing PDF structure

Installation

pip install pdf-destinator

System Requirements

  • Python 3.8+
  • tkinter (GUI toolkit)

Windows: tkinter is included with the standard Python installer - no extra steps needed.

Linux: Install tkinter separately:

sudo apt-get install python3-tk  # Debian/Ubuntu
sudo dnf install python3-tkinter  # Fedora

macOS: Included with python.org installer. If using Homebrew Python:

brew install python-tk

Usage

Basic Usage

Open a PDF and add destinations interactively:

pdf-destinator document.pdf

With Pre-defined Titles

Pre-populate the destination list with titles:

pdf-destinator document.pdf --titles "Introduction" "Chapter 1" "Chapter 2" "Conclusion"

With JSON Configuration

Load destinations from a JSON file:

pdf-destinator document.pdf --json destinations.json

JSON format:

[
  {
    "pdfFile": "document.pdf",
    "destinations": [
      { "id": "intro", "title": "Introduction" },
      { "id": "chapter-1", "title": "Chapter 1" },
      { "id": "https://example.com", "title": "External Link", "type": "url" }
    ]
  }
]

Diagnose Mode

Inspect existing destinations and links in a PDF:

pdf-destinator document.pdf --diagnose

Workflow

  1. Open PDF - Run pdf-destinator with your PDF file
  2. Navigate - Use arrow keys or buttons to browse pages
  3. Click - Click on the page to set a destination position
  4. Drag - Drag a rectangle to create a clickable link region
  5. Delete - Hover over a link region (cursor changes to X) and click to delete
  6. Save - Click "Save and quit" when done

Keyboard Shortcuts

Key Action
Left/Right Navigate pages
Up/Down Navigate destinations
Mouse wheel Scroll page (changes pages at boundaries)

Mouse Actions

Action Result
Click Set destination position at click location
Drag Create link region pointing to current destination
Hover + Click on link Delete the link region

Status Indicators

In the destination list:

  • [x] - Destination has a position set
  • [o] - Destination exists in PDF (loaded)
  • [ ] - Destination needs a position
  • [URL] - External URL (no position needed)

Use Cases

  • Create table of contents links in newsletters or reports
  • Add navigation to long PDF documents
  • Link external resources from PDF pages
  • Fix or update existing PDF destinations
  • Batch processing with JSON configuration

Python API

You can also use pdf-destinator programmatically:

from pdf_destinator import PDFDestinationPicker

destinations = [
    {"id": "intro", "title": "Introduction"},
    {"id": "chapter-1", "title": "Chapter 1"},
]

app = PDFDestinationPicker("document.pdf", destinations)
app.run()

Dependencies

  • PyMuPDF - PDF rendering and link annotations
  • pypdf - Named destinations
  • Pillow - Image processing for display

License

MIT License - see LICENSE file.

Contributing

Contributions welcome! Please open an issue or pull request on GitHub.

Acknowledgments

Created with the help of Claude (Anthropic) as a free alternative to expensive PDF editing tools.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pdf_destinator-0.1.1.tar.gz (17.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pdf_destinator-0.1.1-py3-none-any.whl (16.0 kB view details)

Uploaded Python 3

File details

Details for the file pdf_destinator-0.1.1.tar.gz.

File metadata

  • Download URL: pdf_destinator-0.1.1.tar.gz
  • Upload date:
  • Size: 17.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for pdf_destinator-0.1.1.tar.gz
Algorithm Hash digest
SHA256 f9863ff4f048f1cb5f3fde14dd949cc041554711350d3b22b230f9a83de2f7fd
MD5 9281f63212483ce7224ac74187ad66a5
BLAKE2b-256 eff863549f3c41ebb91852963360e3a69db27b8b82b1e09927018f4e8f55f464

See more details on using hashes here.

File details

Details for the file pdf_destinator-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: pdf_destinator-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 16.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for pdf_destinator-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0498fcda661438fd260c95a43314c4392d5e159c1123592b4793a54c081a9592
MD5 4f4efe7f37170a020d034821edd5e062
BLAKE2b-256 4851c068724020629477dd3d03903fbd7548a514bfba3b0679be7c853bd733ec

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page