PDF Viewer

PDF Viewer

A modern, feature-rich PDF viewer built with JavaFX that provides a smooth and intuitive experience for viewing and managing PDF documents.

Features

  • 🎯 Smooth PDF rendering with high-quality display
  • 📱 Responsive zoom and pan controls
  • 📑 Thumbnail navigation panel
  • 🔍 Text search functionality
  • 📥 Page download capability
  • 🖨️ Document printing support
  • ⌨️ Keyboard shortcuts for quick navigation
  • 🖱️ Mouse-based panning and zooming
  • 💾 Snippet tool for saving selected areas
  • 🔄 Continuous scrolling mode
  • 📊 Page caching for improved performance

Installation

Prerequisites

  • Java Development Kit (JDK) 11 or higher
  • Maven for building the project

Building from Source

  1. Clone the repository:
git clone https://github.com/CaydenDev/pdf-viewer.git
cd pdf-viewer
  1. Build the project using Maven:
mvn clean package

The built JAR file will be available in the target directory.

Running the Application

Run the application using:

java -jar target/pdf-viewer.jar

Usage

Basic Navigation

  • Open a PDF: File > Open or press Ctrl+O
  • Navigate pages:
    • Use arrow keys (← →)
    • Click navigation buttons
    • Enter page number in the page input field
  • Zoom:
    • Use Ctrl + Mouse Wheel
    • Select zoom level from dropdown
    • Use Ctrl + '+' or Ctrl + '-'

Advanced Features

Thumbnail Panel

  • Toggle thumbnails view using the sidebar button
  • Click on thumbnails to jump to specific pages
  • Thumbnails are generated asynchronously for better performance

Search

  • Toggle search panel using the search button
  • Enter text to search within the document
  • Results will highlight matching text

Document Actions

  • Download current page: File > Download Page
  • Print document: File > Print or Ctrl+P
  • Save snippet: Select area and use Save Snippet tool

View Modes

  • Toggle continuous scrolling mode for smooth page transitions
  • Adjust zoom levels for comfortable reading
  • Pan around pages using mouse drag

Keyboard Shortcuts

ShortcutAction
Ctrl+OOpen PDF
Ctrl+PPrint Document
Previous Page
Next Page
Ctrl++Zoom In
Ctrl+-Zoom Out
Ctrl+GGo to Page
Ctrl+FSearch
Ctrl+TToggle Thumbnails

Technical Details

The application is built using:

  • JavaFX for the user interface
  • Apache PDFBox for PDF rendering
  • Concurrent processing for smooth performance
  • Memory-efficient page caching
  • Asynchronous thumbnail generation

Contributing

Contributions are welcome! Please feel free to submit pull requests.

  1. Fork the repository
  2. Create your feature branch
  3. Commit your changes
  4. Push to the branch
  5. Open a Pull Request

Support

For support, please open an issue in the GitHub repository or contact the maintainers.