MuPDF Explored
Robin Watts
June 7, 2021
Preface
Acknowledgements
Contents
1
Introduction
1.1
What is MuPDF?
1.2
License
1.3
Dependencies
2
About this book
I
The MuPDF C API
3
Quick Start
3.1
How to open a document and render some pages
4
Naming Conventions
4.1
Prefixes
4.2
Naming
4.3
Types
5
The Context
5.1
Overview
5.2
Creation
5.3
Custom Allocators
5.4
Multi-threading
5.5
Cloning
5.6
Destruction
5.7
Tuning
5.8
Summary
6
Error handling
6.1
Overview
6.2
Throwing exceptions
6.3
Handling exceptions
6.4
Summary
7
Memory Management and The Store
7.1
Overview
7.2
Creating the Store
7.3
Reacting to Out of Memory events
8
The Document interface
8.1
Overview
8.2
Opening/Closing a document
8.3
Handling password protected documents
8.4
Handling reflowable documents
8.5
Getting Pages from a document
8.6
Anatomy of a Page
8.7
Color Considerations
8.8
Rendering Pages
8.9
Presentations
9
The Device interface
9.1
Overview
9.2
Device Methods
9.3
Cookie
9.4
Device Hints
9.5
Inbuilt Devices
10
Building Blocks
10.1
Overview
10.2
Colorspaces
10.3
Pixmaps
10.4
Bitmaps
10.5
Halftones
10.6
Images
10.7
Buffers
10.8
Transforms
10.9
Paths
10.10
Text
10.11
Shadings
11
Display Lists
11.1
Overview
11.2
Creation
11.3
Playback
11.4
Reference counting
11.5
Miscellaneous operations
12
The Stream interface
12.1
Overview
12.2
Creation
12.3
Usage
13
The Output interface
13.1
Overview
13.2
Creation
13.3
Usage
14
Rendered Output Formats
14.1
Overview
14.2
Band Writers
14.3
PNM
14.4
PAM
14.5
PBM
14.6
PKM
14.7
PNG
14.8
PSD
14.9
PWG/CUPS
14.10
TGA
14.11
PCL
14.12
Postscript
15
The Document Writer interface
15.1
Usage
15.2
Implementation
16
Progressive Mode
16.1
Overview
16.2
Implementation
17
Fonts
17.1
Overview
17.2
Inbuilt Fonts
17.3
Implementation
18
Build configuration
18.1
Overview
18.2
Configuration file
18.3
Plotter selection
18.4
Document handlers
18.5
JPEG 2000 support
18.6
Javascript
18.7
Fonts
II
MuPDF Internals
19
The Image interface
19.1
Overview
19.2
Standard Image Types
19.3
Creating Images
19.4
Implementing an Image Type
19.5
Image Caching
20
The Document Handler interface
20.1
Overview
20.2
Implementing a Document Handler
20.3
Standard Document Handlers
21
Store Internals
21.1
Overview
21.2
Implementation
21.3
Reference Counting
21.4
Scavenging memory allocator
21.5
Using the Store
22
Device Internals
22.1
Line Art
22.2
Text
22.3
Images
22.4
Shadings
22.5
Clipping and Masking
22.6
Groups and Transparency
22.7
Tiling
22.8
Render Flags
22.9
Device Color Spaces
22.10
Layers
23
Path Internals
23.1
Creation
23.2
Reference counting
23.3
Storage
23.4
Transformation
23.5
Bounding
23.6
Stroking
23.7
Walking
24
Image Internals
24.1
Compressed Images
24.2
Pixmap Images
25
Text Internals
25.1
Creation
25.2
Population
25.3
Measurement
25.4
Cloning
25.5
Language
25.6
Implementation
26
Shading Internals
26.1
Creation
26.2
Bounding
26.3
Painting
26.4
Decomposition
27
Stream Internals
28
Output Internals
29
Colorspace Internals
29.1
Non ICC-based Colorspaces
29.2
ICC-based colorspaces
29.3
Calibrated Colorspaces
30
Color Management
30.1
Overview
III
The MuPDF Interpreters
31
PDF Interpreter Details
31.1
Overview
31.2
PDF Document
31.3
PDF Objects
31.4
PDF Operator Processors
31.5
Copying objects between PDF documents
32
XPS Interpreter Details
32.1
Overview
33
EPub/HTML Interpreter Details
33.1
CSS rules
33.2
Shaped text
33.3
Bidirectional text
34
SVG Interpreter Details
IV
Tools, Libraries, and Helper Routines
35
MuTool
35.1
Overview
35.2
Clean
35.3
Convert
35.4
Create
35.5
Draw
35.6
Extract
35.7
Info
35.8
Merge
35.9
Pages
35.10
Portfolio
35.11
Poster
35.12
Run
35.13
Show
36
MuOfficeLib
37
Transitions
38
MuThreads
V
Platform specifics and Language Bindings
39
Platform specifics
39.1
Overview
39.2
C API
39.3
C++ API
39.4
Python
39.5
Java
39.6
Javascript
A
How to contribute to MuPDF
A.1
Licensing
A.2
Copyright Assignment
A.3
Coding Style
[
next
]