How sumatrapdfreader/sumatrapdf works
SumatraPDF is a Windows multi-format document reader. Its principal workflow is that a reader opens a document and the application provides format-specific document handling and page rendering; the README names the supported formats, while the source index identifies several corresponding engines and their shared engine interface. The graph also preserves the documented preview capability. Source excerpts are partial, so relationships are limited to README statements and dependencies visible in the source index; UI-to-engine runtime calls are not asserted.
Main entry points: GuessFileType.h File type detection · EngineBase.h Engine interface · Settings.h SumatraPDF app · EngineMupdf.cpp PDF and XPS
Components 12
Document reading
- SumatraPDF app
src/Settings.h - Virtual document control
src/gui/VirtCtrl.cpp
Document engines
- PDF and XPS
src/shared/EngineMupdf.cpp - Ebook formats
src/shared/EngineEbook.cpp - Images and archives
src/shared/EngineImages.cpp - DjVu documents
src/shared/EngineDjvuDec.cpp
Shared document model
- File type detection
src/base/GuessFileType.h - Engine interface
src/shared/EngineBase.h - UI data models
src/shared/gui/UIModels.h
Windows preview
- PDF preview
src/previewer/PdfPreview.cpp - Preview registration
src/RegistryPreview.cpp
Other components
- Reader
Connections 13
- Reader → SumatraPDF app: uses
- SumatraPDF app → File type detection: identifies formats
- PDF and XPS → Engine interface: uses interface
src/shared/EngineMupdf.cpp - Ebook formats → Engine interface: uses interface
src/shared/EngineEbook.cpp - Images and archives → Engine interface: uses interface
src/shared/EngineImages.cpp - DjVu documents → Engine interface: uses interface
src/shared/EngineDjvuDec.cpp - PDF and XPS → File type detection: uses detection
src/shared/EngineMupdf.cpp - Ebook formats → File type detection: uses detection
src/shared/EngineEbook.cpp - Images and archives → File type detection: uses detection
src/shared/EngineImages.cpp - DjVu documents → File type detection: uses detection
src/shared/EngineDjvuDec.cpp - SumatraPDF app → PDF preview: offers preview
src/previewer/PdfPreview.cpp - PDF preview → Engine interface: uses interface
src/previewer/PdfPreview.cpp - Preview registration → SumatraPDF app: registers preview
src/RegistryPreview.cpp