Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

Xournal++ Searchable PDF OCR Export Plugin

Xournal++ Plugin Platform Python License: MIT

A high-performance Xournal++ plugin that exports .xopp documents to searchable PDFs with embedded OCR text layers. Combines Windows Digital Ink handwriting recognition and WinRT Neural OCR for printed images/screenshots.


✨ Features

  • Dual-Engine Recognition:
    • Windows Digital Ink Analyzer: Extracts exact vector strokes from .xopp to recognize handwritten notes and mathematical/code symbols accurately.
    • WinRT Neural OCR: Scans embedded screenshots, diagrams, and inserted images across all pages.
  • Fast Multi-Core Processing: Runs parallel OCR workers across available CPU cores via ThreadPoolExecutor.
  • Non-Blocking UI: Exports run in a detached process, keeping Xournal++ responsive with no freezing.
  • Real-Time Terminal Dashboard: Visual ASCII progress bar and execution metrics.
  • Searchable PDF Output: Embeds an invisible text layer (render_mode=3) so you can search notes using Ctrl + F in Adobe Acrobat, PDF-XChange, Edge, or Chrome.

🖥️ Terminal Preview

  ███████╗██╗  ██╗██████╗  ██████╗ ██████╗ ████████╗ ██████╗  ██████╗██████╗ 
  ██╔════╝╚██╗██╔╝██╔══██╗██╔═══██╗██╔══██╗╚══██╔══╝██╔═══██╗██╔════╝██╔══██╗
  █████╗   ╚███╔╝ ██████╔╝██║   ██║██████╔╝   ██║   ██║   ██║██║     ██████╔╝
  ██╔══╝   ██╔██╗ ██╔═══╝ ██║   ██║██╔══██╗   ██║   ██║   ██║██║     ██╔══██╗
  ███████╗██╔╝ ██╗██║     ╚██████╔╝██║  ██║   ██║   ╚██████╔╝╚██████╗██║  ██║
  ╚══════╝╚═╝  ╚═╝╚═╝      ╚═════╝ ╚═╝  ╚═╝   ╚═╝    ╚═════╝  ╚═════╝╚═╝  ╚═╝
  ─────────────────────────────────────────────────────────────────────────────
  DOCUMENT: Lecture_Notes.xopp
  ENGINE  : Windows Digital Ink + WinRT Neural OCR + PyMuPDF
  ─────────────────────────────────────────────────────────────────────────────

  [1/4] Exporting base vector PDF from Xournal++...  DONE
  [2/4] Extracting handwriting stroke coordinates... DONE
  [3/4] Rasterizing 12 page(s) for visual OCR...     DONE
  [4/4] Executing parallel neural OCR (4 threads)...

  › OCR Processing ████████████████████░░░░░░░░  66.7% [8/12] page 7 ready

  › Embedding invisible searchable text layer...

  ┌───────────────────────────────────────────────────────────────────────────┐
  │  EXPORT COMPLETE                                                          │
  ├───────────────────────────────────────────────────────────────────────────┤
  │  Pages Processed : 12                                                     │
  │  Text Embedded   : 342                                                    │
  │  Time Elapsed    : 4.82s                                                  │
  │  Saved Location  : C:\Users\User\Documents\Lecture_Notes.pdf              │
  └───────────────────────────────────────────────────────────────────────────┘

📋 Prerequisites

  1. Windows 10 / 11 (64-bit)
  2. Xournal++ (v1.1.0 or higher)
  3. Python 3.8+ added to your system PATH
  4. PyMuPDF:
    pip install pymupdf

🚀 Installation

Option 1: Automatic (One-Click)

  1. Clone or download this repository.
  2. Double-click install.bat.
  3. The installer will automatically verify dependencies and copy the plugin to %LOCALAPPDATA%\xournalpp\plugins\ExportOCR.

Option 2: Manual Installation

  1. Clone this repository:
    git clone https://github.com/your-username/xournalpp-export-ocr.git
  2. Copy the ExportOCR folder into your local Xournal++ plugins directory:
    C:\Users\<YourUsername>\AppData\Local\xournalpp\plugins\ExportOCR
    
  3. Install Python dependencies:
    pip install -r requirements.txt
  4. Restart Xournal++.

🎯 How to Use

  1. Open Xournal++ and write your notes or open any .xopp file.
  2. Save your document (Ctrl + S).
  3. Export with OCR by:
    • Pressing Shift + Alt + O
    • Or selecting Plugin → Export with OCR (Searchable PDF) from the top menu bar.
  4. The terminal window will open and display live progress.
  5. Once finished, open the exported .pdf and press Ctrl + F to search your handwritten notes!

🛠️ Project Structure

xournalpp-export-ocr/
├── ExportOCR/
│   ├── plugin.ini                     # Plugin manifest
│   ├── main.lua                       # Lua menu entry & hotkey handler
│   └── helper/
│       ├── super_ocr.py               # Parallel OCR orchestrator & ASCII UI
│       ├── ocr_helper.ps1             # WinRT Optical Character Recognition
│       ├── inkanalyzer_helper.ps1     # Windows Ink handwriting stroke analysis
│       ├── process_pdf.py             # Standalone PDF processor
│       └── watch_folder.ps1           # Auto-OCR watcher utility
├── install.bat                        # Automated Windows installer
├── requirements.txt                   # Python requirements
├── LICENSE                            # MIT License
└── README.md                          # Documentation

📄 License

This project is licensed under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages