How l4rzy/okular-mupdf-ng works
okular-mupdf-ng is an Okular document backend that moves parsing and rendering into a hardened worker process. The principal flow is Okular opening a document through the plugin, which transfers it to the worker; the worker dispatches document operations to format engines and returns rendered pages and document data. The README also documents OCR, export, annotations, signing, theming, and configuration capabilities. Edges reflect README statements or SOURCE INDEX references; unsampled feature wiring is not asserted.
Main entry points: command_service.cpp Command Service · worker_transport.cpp Plugin Transport · worker_client.cpp Worker Client · main.cpp Worker Process
Components 25
Okular Integration
- Generator Backend
src/generator/mupdfng.cpp - Worker Client
src/plugin/worker_client.cpp - Command Line Client
src/tools/cli/main.cpp
Worker Runtime
- Worker Process
src/worker/main.cpp - Worker Server
src/worker/runtime/worker_server.cpp - Command Service
src/worker/runtime/command_service.cpp - Sandbox
src/worker/sys/sandbox.cpp
Document Engines
- PDF Engine
src/worker/engine/pdf/document.cpp - EPUB Engine
src/worker/engine/epub/document.cpp - MOBI Engine
src/worker/engine/mobi/document.cpp - AZW3 KFX Engine
src/worker/engine/kindle/document.cpp - XPS Engine
src/worker/engine/xps/document.cpp
Document Features
- OCR Controller
src/plugin/ocr/controller.cpp - Certificate Manager
src/plugin/crypto/certificate_database.cpp - Link Preview
src/generator/ui/link_preview.cpp - Annotation Support
src/generator/proxy/annotation.cpp - XFDF Import Export
src/plugin/xfdf/export.cpp - Worker OCR
src/worker/engine/ocr/ocr.cpp - Export Jobs
src/worker/engine/export/jobs.cpp
IPC and Shared Types
- Plugin Transport
src/plugin/worker_transport.cpp - Control Channel
src/shared/transport/ctrl_channel.cpp - Descriptor Channel
src/shared/transport/fd_channel.cpp - IPC Codec
src/shared/protocol/zpp_codec.cpp - Shared Data Model
src/shared/model/types.hpp
Other components
- Okular
Connections 27
- Okular → Generator Backend: uses backend
- Generator Backend → Worker Client: requests document work
- Worker Client → Plugin Transport: delegates transport
src/plugin/worker_client.cpp - Plugin Transport → Worker Process: starts worker
- Plugin Transport → Control Channel: sends control messages
- Plugin Transport → Descriptor Channel: transfers descriptors
src/plugin/worker_transport.cpp - Plugin Transport → IPC Codec: encodes requests
src/plugin/worker_transport.cpp - Plugin Transport → Shared Data Model: exchanges data
src/plugin/worker_transport.cpp - Worker Process → Worker Server: runs server
src/worker/main.cpp - Worker Process → Sandbox: configures isolation
src/worker/main.cpp - Worker Server → Command Service: dispatches requests
- Command Service → PDF Engine: dispatches document work
- Command Service → EPUB Engine: dispatches document work
- Command Service → MOBI Engine: dispatches document work
- Command Service → AZW3 KFX Engine: dispatches document work
- Command Service → XPS Engine: dispatches document work
- Command Service → Worker OCR: uses OCR jobs
- Command Service → Export Jobs: uses export jobs
- Command Service → Shared Data Model: exchanges messages
- OCR Controller → Worker Client: requests OCR
- Okular → Link Preview: previews links
- Okular → Annotation Support: edits annotations
- Okular → XFDF Import Export: imports exports XFDF
- Okular → Certificate Manager: manages certificates
- Command Line Client → Worker Client: calls worker
src/tools/cli/main.cpp - PDF Engine → Worker OCR: performs page OCR
- EPUB Engine → Export Jobs: supports export