mupdf ~master
Bindings for MuPDF
To use this package, run the following command in your project's root directory:
Manual usage
Put the following dependency into your project's dependences section:
MuPDF for Dlang
This repository contains Dlang bindings for MuPDF and tools to auto-generate them for arbitrary versions.
Usage
Build and install from MuPDF sources, or alternatively:
sudo apt install -y libmupdf-dev
Add the package via DUB:
dub add mupdf
Import the package, and follow the MuPDF API documentation as needed, e.g.:
import mupdf;
void main() {
auto ctx = fz_new_context(null, null, FZ_STORE_UNLIMITED); auto doc = pdf_open_document(ctx, "path/to/file.pdf"); // ...
}
Note the following remarks:
- All
PDF_NAME(x)
macro invocations must be replaced withPDF_NAME_x
shorthands.
Current known limitations of these bindings:
- Only POSIX support for now.
- Many helper functions defined via preprocessor macros are not available.
- Exceptions via
fz_try
,fz_always
,fz_catch
are not supported.
Build
To generate Dlang bindings for an arbitrary version of MuPDF:
Run the script
generate.sh
and follow usage instructions, e.g. to generate bindings for mupdf-1.19.0 run the following command:./generate.sh 1.19.0
- ~master released a year ago
- AlexAltea/mupdf-d
- mupdf.com/
- AGPL-3.0 or proprietary
- Dependencies:
- none
- Versions:
-
1.21.1 2023-Feb-06 1.21.0 2022-Nov-29 1.21.0-patch1 2023-Jan-24 1.19.0 2021-Dec-02 1.19.0-windows 2022-Nov-29 - Download Stats:
-
-
0 downloads today
-
0 downloads this week
-
0 downloads this month
-
1305 downloads total
-
- Score:
- 1.1
- Short URL:
- mupdf.dub.pm