Skip to content

Rendering

David Lazarescu edited this page Jul 8, 2025 · 2 revisions

Library

Librum is using mupdf to render, edit, annotate and transform pages. To learn more about mupdf, please refer to its repository (https://github.com/ArtifexSoftware/mupdf). Librum added mupdf as a submodule and builds it from source to achieve maximal portability.

All the calls to mupdf happen in the Application Layer by classes prefixed with Mupdf, such as MupdfPageRenderer. All actions involving the mupdf document are happening in the MupdfDocumentAccess class, which is abstracted by the DocumentAccess class.

Architecture

The following dependency Graph shows an overview of the core rendering functionality.


Rendering Architecture Diagram

A description

At first there is the QML Interface, which contains the MReadingPage, which is the main page that is being displayed to the user in the reading view. At it's center it displays the MDocumentView which is the actual document that is being displayed. To the side of the MDocumentView, the MReadingPage also displays multiple other things like the Chapter/ Bookmarks-Sidebar, the Searchbar, the Taskbar, etc. The MDocumentView itself is simply a wrapper to the Document class which adds Scrollbars to it.

Clone this wiki locally