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 (usually included with Python)

On Linux, you may need to install tkinter separately:

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

On macOS:

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.0.tar.gz (17.1 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.0-py3-none-any.whl (15.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pdf_destinator-0.1.0.tar.gz
  • Upload date:
  • Size: 17.1 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.0.tar.gz
Algorithm Hash digest
SHA256 3f79226f8c7a70398497a453e3969fe139877c407257620d96cd71c6573a9a1f
MD5 a9c7b4233ce2680b15cc19c8124dc1ef
BLAKE2b-256 24cec1079eb88d3a2e4e45fa1232f0715a789fa0a685609244154517c3f8d6fa

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pdf_destinator-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 15.9 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 447e389efb87f5150c2c2b7d921774607f7f332bbeb9709dac9468e6cc8b37e3
MD5 e12da094569a85ea7beb018de24c987c
BLAKE2b-256 03ed9663d36659bfb10c3af62f79965947406c3ad88b0a35abd67a1e04c1f85b

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