Skip to content

MuPDF version change requires minor change in mupdf_renderer.cpp #3980

Description

@kovzol

On Ubuntu 26.04 there is a new version of MuPDF (1.27) which requires a signature change for pdf_new_run_processor. This patch handles this issue:

diff --git a/src/Plugins/MuPDF/mupdf_renderer.cpp b/src/Plugins/MuPDF/mupdf_renderer.cpp
index dfea84ec3..6b3bd6ee1 100644
--- a/src/Plugins/MuPDF/mupdf_renderer.cpp
+++ b/src/Plugins/MuPDF/mupdf_renderer.cpp
@@ -215,8 +215,15 @@ mupdf_renderer_rep::begin (void* handle) {
     h            = fz_pixmap_height (ctx, pixmap);
     dev          = fz_new_draw_device (ctx, fz_identity, pixmap);
     fz_matrix ctm= fz_make_matrix (1, 0, 0, -1, 0, 0);
+
+#include <mupdf/fitz/version.h>
+#if FZ_VERSION_MAJOR > 1 || (FZ_VERSION_MAJOR == 1 && FZ_VERSION_MINOR >= 27)
+    proc= pdf_new_run_processor (ctx, mupdf_document (), dev, ctm, -1, "View",
+                                 NULL, NULL, NULL, NULL, NULL);
+#else
     proc= pdf_new_run_processor (ctx, mupdf_document (), dev, ctm, -1, "View",
                                  NULL, NULL, NULL);
+#endif
 
     fg              = -1;
     bg              = -1;

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions