mupdf 1.19.0-windows

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

  1. Build and install from MuPDF sources, or alternatively:

    sudo apt install -y libmupdf-dev
    
  2. Add the package via DUB:

    dub add mupdf
    
  3. 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 with PDF_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:

  1. Install DPP.

  2. 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
    
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
Show all 6 versions
Download Stats:
  • 0 downloads today

  • 0 downloads this week

  • 0 downloads this month

  • 1304 downloads total

Score:
1.0
Short URL:
mupdf.dub.pm