pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
zathura-pdf-mupdf: Import zathura-pdf-mupdf-0.3.0nb5 as wip/zathura-pdf-mupdf
Module Name: pkgsrc-wip
Committed By: Leonardo Taccari <leot%NetBSD.org@localhost>
Pushed By: leot
Date: Wed Nov 23 11:03:17 2016 +0100
Changeset: 22f0efe1123c8d2652d5a27ffde864a9d03236f7
Modified Files:
Makefile
Added Files:
zathura-pdf-mupdf/DESCR
zathura-pdf-mupdf/Makefile
zathura-pdf-mupdf/PLIST
zathura-pdf-mupdf/TODO
zathura-pdf-mupdf/distinfo
zathura-pdf-mupdf/patches/patch-document.c
zathura-pdf-mupdf/patches/patch-image.c
zathura-pdf-mupdf/patches/patch-index.c
zathura-pdf-mupdf/patches/patch-links.c
zathura-pdf-mupdf/patches/patch-page.c
zathura-pdf-mupdf/patches/patch-plugin.h
zathura-pdf-mupdf/patches/patch-render.c
zathura-pdf-mupdf/patches/patch-search.c
zathura-pdf-mupdf/patches/patch-utils.c
Log Message:
zathura-pdf-mupdf: Import zathura-pdf-mupdf-0.3.0nb5 as wip/zathura-pdf-mupdf
The zathura-pdf-mupdf plugin adds PDF support to zathura by using the
mupdf rendering library.
TODO: Review patches and add update comments to reflect current reality
TODO: The local update to 1.10 API seems working but it will need to be
TODO: better tested and to double-check that all the patches do not
TODO: introduce newer regressions.
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=22f0efe1123c8d2652d5a27ffde864a9d03236f7
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
Makefile | 1 +
zathura-pdf-mupdf/DESCR | 2 +
zathura-pdf-mupdf/Makefile | 28 ++++++++
zathura-pdf-mupdf/PLIST | 3 +
zathura-pdf-mupdf/TODO | 1 +
zathura-pdf-mupdf/distinfo | 15 +++++
zathura-pdf-mupdf/patches/patch-document.c | 33 +++++++++
zathura-pdf-mupdf/patches/patch-image.c | 15 +++++
zathura-pdf-mupdf/patches/patch-index.c | 104 +++++++++++++++++++++++++++++
zathura-pdf-mupdf/patches/patch-links.c | 65 ++++++++++++++++++
zathura-pdf-mupdf/patches/patch-page.c | 36 ++++++++++
zathura-pdf-mupdf/patches/patch-plugin.h | 17 +++++
zathura-pdf-mupdf/patches/patch-render.c | 33 +++++++++
zathura-pdf-mupdf/patches/patch-search.c | 15 +++++
zathura-pdf-mupdf/patches/patch-utils.c | 15 +++++
15 files changed, 383 insertions(+)
diffs:
diff --git a/Makefile b/Makefile
index 258529d..009b3c3 100644
--- a/Makefile
+++ b/Makefile
@@ -4417,6 +4417,7 @@ SUBDIR+= zabbix-server
SUBDIR+= zabbix-server-mysql
SUBDIR+= zabbix-server-pgsql
SUBDIR+= zapping
+SUBDIR+= zathura-pdf-mupdf
SUBDIR+= zbackup
SUBDIR+= zbar
SUBDIR+= zenity
diff --git a/zathura-pdf-mupdf/DESCR b/zathura-pdf-mupdf/DESCR
new file mode 100644
index 0000000..3c71cd5
--- /dev/null
+++ b/zathura-pdf-mupdf/DESCR
@@ -0,0 +1,2 @@
+The zathura-pdf-mupdf plugin adds PDF support to zathura by using the
+mupdf rendering library.
diff --git a/zathura-pdf-mupdf/Makefile b/zathura-pdf-mupdf/Makefile
new file mode 100644
index 0000000..7f023eb
--- /dev/null
+++ b/zathura-pdf-mupdf/Makefile
@@ -0,0 +1,28 @@
+# $NetBSD: Makefile,v 1.7 2016/10/07 18:26:09 adam Exp $
+#
+
+DISTNAME= zathura-pdf-mupdf-0.3.0
+PKGREVISION= 5
+CATEGORIES= print
+MASTER_SITES= http://pwmt.org/projects/zathura/plugins/download/
+
+MAINTAINER= leot%NetBSD.org@localhost
+HOMEPAGE= http://pwmt.org/projects/zathura-pdf-mupdf/
+COMMENT= Add PDF support to zathura using mupdf rendering engine
+LICENSE= zlib
+
+CONFLICTS+= zathura-pdf-poppler-[0-9]*
+
+USE_TOOLS+= pkg-config gmake
+USE_LIBTOOL= yes
+
+CPPFLAGS+= -D_XOPEN_SOURCE=600
+
+MAKE_ENV+= MUPDF_LIB="-lmupdf -lmupdfthird"
+
+.include "../../graphics/cairo/buildlink3.mk"
+.include "../../wip/mupdf/buildlink3.mk"
+.include "../../print/zathura/buildlink3.mk"
+.include "../../sysutils/desktop-file-utils/desktopdb.mk"
+.include "../../x11/gtk3/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/zathura-pdf-mupdf/PLIST b/zathura-pdf-mupdf/PLIST
new file mode 100644
index 0000000..4ef2958
--- /dev/null
+++ b/zathura-pdf-mupdf/PLIST
@@ -0,0 +1,3 @@
+@comment $NetBSD: PLIST,v 1.1 2016/02/14 14:01:49 leot Exp $
+lib/zathura/pdf.so
+share/applications/zathura-pdf-mupdf.desktop
diff --git a/zathura-pdf-mupdf/TODO b/zathura-pdf-mupdf/TODO
new file mode 100644
index 0000000..135c64e
--- /dev/null
+++ b/zathura-pdf-mupdf/TODO
@@ -0,0 +1 @@
+- Review patches and add comments to them
diff --git a/zathura-pdf-mupdf/distinfo b/zathura-pdf-mupdf/distinfo
new file mode 100644
index 0000000..dceafdf
--- /dev/null
+++ b/zathura-pdf-mupdf/distinfo
@@ -0,0 +1,15 @@
+$NetBSD: distinfo,v 1.3 2016/04/27 12:38:45 leot Exp $
+
+SHA1 (zathura-pdf-mupdf-0.3.0.tar.gz) = ae0be41ea7c75b8ddc083fe01f1366673ea9751a
+RMD160 (zathura-pdf-mupdf-0.3.0.tar.gz) = 377e7848a5ea7f43f020e131aacc24c51453bf8f
+SHA512 (zathura-pdf-mupdf-0.3.0.tar.gz) = c83eef453176c6317be338260e311c39e049b8ae1ae719445c6303725b4e993758ed3f3a61f0af31032d09f1f2f03574f862d24e36b27fa38732e0b6c7aa18ea
+Size (zathura-pdf-mupdf-0.3.0.tar.gz) = 9914 bytes
+SHA1 (patch-document.c) = 0693cf6b52083383115e74a002e054d42d37389e
+SHA1 (patch-image.c) = 6f55a31ac3426af5ce312c86530400a6057c9a28
+SHA1 (patch-index.c) = 86f18b26a8c595dbc753d07a2dab3f6b0aed94da
+SHA1 (patch-links.c) = 9496fc74e480afd6c428835c7e1c90256e11737a
+SHA1 (patch-page.c) = f12d6e3e1ed2d1a59975d1f87becfdb64dc5813b
+SHA1 (patch-plugin.h) = 4ec3e1510938f4bf7c10194ee7702666b1e18eb9
+SHA1 (patch-render.c) = b484908e3f6ae6be377ad765f7bad9c0361e4d19
+SHA1 (patch-search.c) = 312d29bd2463df3bbbe4410f5f5fad07f9f04b93
+SHA1 (patch-utils.c) = 8b669ff734e94d6a248431a01d490efebb1b981a
diff --git a/zathura-pdf-mupdf/patches/patch-document.c b/zathura-pdf-mupdf/patches/patch-document.c
new file mode 100644
index 0000000..04cc9a4
--- /dev/null
+++ b/zathura-pdf-mupdf/patches/patch-document.c
@@ -0,0 +1,33 @@
+$NetBSD: patch-document.c,v 1.2 2016/04/27 12:38:45 leot Exp $
+
+o Correct the glib-2.0 include header file path.
+o Update to mupdf-1.9 API
+
+--- document.c.orig 2016-02-14 22:49:46.000000000 +0000
++++ document.c
+@@ -3,10 +3,9 @@
+ #define _POSIX_C_SOURCE 1
+
+ #include <mupdf/fitz.h>
+-#include <mupdf/xps.h>
+ #include <mupdf/pdf.h>
+
+-#include <glib-2.0/glib.h>
++#include <glib.h>
+
+ #include "plugin.h"
+
+@@ -109,12 +108,7 @@ pdf_document_save_as(zathura_document_t*
+ }
+
+ fz_try (mupdf_document->ctx) {
+- /* fz_write_document claims to accepts NULL as third argument but doesn't.
+- * pdf_write_document does not check if the third arguments is NULL for some
+- * options. */
+-
+- fz_write_options opts = { 0 }; /* just use the default options */
+- fz_write_document(mupdf_document->ctx, mupdf_document->document, (char*) path, &opts);
++ pdf_save_document(mupdf_document->ctx, pdf_specifics(mupdf_document->ctx, mupdf_document->document), (char*) path, NULL);
+ } fz_catch (mupdf_document->ctx) {
+ return ZATHURA_ERROR_UNKNOWN;
+ }
diff --git a/zathura-pdf-mupdf/patches/patch-image.c b/zathura-pdf-mupdf/patches/patch-image.c
new file mode 100644
index 0000000..0b4184f
--- /dev/null
+++ b/zathura-pdf-mupdf/patches/patch-image.c
@@ -0,0 +1,15 @@
+$NetBSD: patch-image.c,v 1.1 2016/04/27 12:38:45 leot Exp $
+
+Update to mupdf-1.9 API.
+
+--- image.c.orig 2016-02-14 22:49:46.000000000 +0000
++++ image.c
+@@ -93,7 +93,7 @@ pdf_page_image_get_cairo(zathura_page_t*
+ fz_pixmap* pixmap = NULL;
+ cairo_surface_t* surface = NULL;
+
+- pixmap = fz_new_pixmap_from_image(mupdf_page->ctx, mupdf_image, 0, 0);
++ pixmap = fz_get_pixmap_from_image(mupdf_page->ctx, mupdf_image, NULL, NULL, NULL, NULL);
+ if (pixmap == NULL) {
+ goto error_free;
+ }
diff --git a/zathura-pdf-mupdf/patches/patch-index.c b/zathura-pdf-mupdf/patches/patch-index.c
new file mode 100644
index 0000000..6561b3d
--- /dev/null
+++ b/zathura-pdf-mupdf/patches/patch-index.c
@@ -0,0 +1,104 @@
+$NetBSD$
+
+--- index.c.orig 2016-02-14 22:49:46.000000000 +0000
++++ index.c
+@@ -6,7 +6,7 @@
+
+ #include "plugin.h"
+
+-static void build_index(fz_outline* outline, girara_tree_node_t* root);
++static void build_index(mupdf_document_t* mupdf_document, fz_outline* outline, girara_tree_node_t* root);
+
+ girara_tree_node_t*
+ pdf_document_index_generate(zathura_document_t* document, mupdf_document_t* mupdf_document, zathura_error_t* error)
+@@ -29,7 +29,7 @@ pdf_document_index_generate(zathura_docu
+
+ /* generate index */
+ girara_tree_node_t* root = girara_node_new(zathura_index_element_new("ROOT"));
+- build_index(outline, root);
++ build_index(mupdf_document, outline, root);
+
+ /* free outline */
+ fz_drop_outline(mupdf_document->ctx, outline);
+@@ -38,7 +38,7 @@ pdf_document_index_generate(zathura_docu
+ }
+
+ static void
+-build_index(fz_outline* outline, girara_tree_node_t* root)
++build_index(mupdf_document_t* mupdf_document, fz_outline* outline, girara_tree_node_t* root)
+ {
+ if (outline == NULL || root == NULL) {
+ return;
+@@ -50,49 +50,24 @@ build_index(fz_outline* outline, girara_
+ zathura_link_type_t type = ZATHURA_LINK_INVALID;
+ zathura_rectangle_t rect = { .x1 = 0, .y1 = 0, .x2 = 0, .y2 = 0 };
+
+- switch (outline->dest.kind) {
+- case FZ_LINK_NONE:
+- type = ZATHURA_LINK_NONE;
+- break;
+- case FZ_LINK_URI:
++ if (fz_is_external_link(mupdf_document->ctx, outline->uri)) {
+ type = ZATHURA_LINK_URI;
+- target.value = outline->dest.ld.uri.uri;
+- break;
+- case FZ_LINK_GOTO:
++ target.value = outline->uri;
++ } else if (outline->uri) {
++ float tx, ty;
++ tx = 0.0;
++ ty = 0.0;
+ type = ZATHURA_LINK_GOTO_DEST;
+- target.page_number = outline->dest.ld.gotor.page;
++ target.page_number = 0;
+ target.destination_type = ZATHURA_LINK_DESTINATION_XYZ;
+- target.left = 0;
+- target.top = 0;
++ target.left = 0.0;
++ target.top = 0.0;
+ target.scale = 0.0;
+- {
+- int gflags = outline->dest.ld.gotor.flags;
+- if (gflags & fz_link_flag_l_valid) {
+- target.left = outline->dest.ld.gotor.lt.x;
+- }
+- if (gflags & fz_link_flag_t_valid) {
+- target.top = outline->dest.ld.gotor.lt.y;
+- }
+- /* if (gflags & fz_link_flag_r_is_zoom) { */
+- /* target.scale = outline->dest.ld.gotor.rb.x; */
+- /* } */
+- }
+- break;
+- case FZ_LINK_LAUNCH:
+- type = ZATHURA_LINK_LAUNCH;
+- target.value = outline->dest.ld.launch.file_spec;
+- break;
+- case FZ_LINK_NAMED:
+- type = ZATHURA_LINK_NAMED;
+- target.value = outline->dest.ld.named.named;
+- break;
+- case FZ_LINK_GOTOR:
+- type = ZATHURA_LINK_GOTO_REMOTE;
+- target.value = outline->dest.ld.gotor.file_spec;
+- break;
+- default:
+- outline = outline->next; // TODO: Don't skip unknown type
+- continue;
++ target.page_number = fz_resolve_link(mupdf_document->ctx, mupdf_document->document, outline->uri, &tx, &ty);
++ target.left = tx;
++ target.top = ty;
++ } else {
++ type = ZATHURA_LINK_NONE;
+ }
+
+ index_element->link = zathura_link_new(type, rect, target);
+@@ -104,7 +79,7 @@ build_index(fz_outline* outline, girara_
+ girara_tree_node_t* node = girara_node_append_data(root, index_element);
+
+ if (outline->down != NULL) {
+- build_index(outline->down, node);
++ build_index(mupdf_document, outline->down, node);
+ }
+
+ outline = outline->next;
diff --git a/zathura-pdf-mupdf/patches/patch-links.c b/zathura-pdf-mupdf/patches/patch-links.c
new file mode 100644
index 0000000..1dbca0e
--- /dev/null
+++ b/zathura-pdf-mupdf/patches/patch-links.c
@@ -0,0 +1,65 @@
+$NetBSD$
+
+--- links.c.orig 2016-02-14 22:49:46.000000000 +0000
++++ links.c
+@@ -44,48 +44,22 @@ pdf_page_links_get(zathura_page_t* page,
+ zathura_link_target_t target = { 0 };
+
+ char* buffer = NULL;
+- switch (link->dest.kind) {
+- case FZ_LINK_NONE:
+- type = ZATHURA_LINK_NONE;
+- break;
+- case FZ_LINK_URI:
++ if (fz_is_external_link(mupdf_document->ctx, link->uri)) {
+ type = ZATHURA_LINK_URI;
+- target.value = link->dest.ld.uri.uri;
+- break;
+- case FZ_LINK_GOTO:
++ target.value = link->uri;
++ } else {
++ float tx, ty;
++ tx = 0.0;
++ ty = 0.0;
+ type = ZATHURA_LINK_GOTO_DEST;
+- target.page_number = link->dest.ld.gotor.page;
++ target.page_number = 0;
+ target.destination_type = ZATHURA_LINK_DESTINATION_XYZ;
+- target.left = 0;
+- target.top = 0;
++ target.left = 0.0;
++ target.top = 0.0;
+ target.scale = 0.0;
+- {
+- int gflags = link->dest.ld.gotor.flags;
+- if (gflags & fz_link_flag_l_valid) {
+- target.left = link->dest.ld.gotor.lt.x;
+- }
+- if (gflags & fz_link_flag_t_valid) {
+- target.top = link->dest.ld.gotor.lt.y;
+- }
+- /* if (gflags & fz_link_flag_r_is_zoom) { */
+- /* target.scale = link->dest.ld.gotor.rb.x; */
+- /* } */
+- }
+- break;
+- case FZ_LINK_LAUNCH:
+- type = ZATHURA_LINK_LAUNCH;
+- target.value = link->dest.ld.launch.file_spec;
+- break;
+- case FZ_LINK_NAMED:
+- type = ZATHURA_LINK_NAMED;
+- target.value = link->dest.ld.named.named;
+- break;
+- case FZ_LINK_GOTOR:
+- type = ZATHURA_LINK_GOTO_REMOTE;
+- target.value = link->dest.ld.gotor.file_spec;
+- break;
+- default:
+- continue;
++ target.page_number = fz_resolve_link(mupdf_document->ctx, mupdf_document->document, link->uri, &tx, &ty);
++ target.left = tx;
++ target.top = ty;
+ }
+
+ zathura_link_t* zathura_link = zathura_link_new(type, position, target);
diff --git a/zathura-pdf-mupdf/patches/patch-page.c b/zathura-pdf-mupdf/patches/patch-page.c
new file mode 100644
index 0000000..e66f038
--- /dev/null
+++ b/zathura-pdf-mupdf/patches/patch-page.c
@@ -0,0 +1,36 @@
+$NetBSD: patch-page.c,v 1.1 2016/04/27 12:38:45 leot Exp $
+
+Update to mupdf-1.9 API.
+
+--- page.c.orig 2016-02-14 22:49:46.000000000 +0000
++++ page.c
+@@ -43,12 +43,13 @@ pdf_page_init(zathura_page_t* page)
+ /* setup text */
+ mupdf_page->extracted_text = false;
+
+- mupdf_page->text = fz_new_text_page(mupdf_page->ctx);
++ fz_rect rect;
++ mupdf_page->text = fz_new_stext_page(mupdf_page->ctx, &rect);
+ if (mupdf_page->text == NULL) {
+ goto error_free;
+ }
+
+- mupdf_page->sheet = fz_new_text_sheet(mupdf_page->ctx);
++ mupdf_page->sheet = fz_new_stext_sheet(mupdf_page->ctx);
+ if (mupdf_page->sheet == NULL) {
+ goto error_free;
+ }
+@@ -74,11 +75,11 @@ pdf_page_clear(zathura_page_t* page, mup
+
+ if (mupdf_page != NULL) {
+ if (mupdf_page->text != NULL) {
+- fz_drop_text_page(mupdf_page->ctx, mupdf_page->text);
++ fz_drop_stext_page(mupdf_page->ctx, mupdf_page->text);
+ }
+
+ if (mupdf_page->sheet != NULL) {
+- fz_drop_text_sheet(mupdf_page->ctx, mupdf_page->sheet);
++ fz_drop_stext_sheet(mupdf_page->ctx, mupdf_page->sheet);
+ }
+
+ if (mupdf_page->page != NULL) {
diff --git a/zathura-pdf-mupdf/patches/patch-plugin.h b/zathura-pdf-mupdf/patches/patch-plugin.h
new file mode 100644
index 0000000..e7b7483
--- /dev/null
+++ b/zathura-pdf-mupdf/patches/patch-plugin.h
@@ -0,0 +1,17 @@
+$NetBSD: patch-plugin.h,v 1.1 2016/04/27 12:38:45 leot Exp $
+
+Update to mupdf-1.9 API.
+
+--- plugin.h.orig 2016-02-14 22:49:46.000000000 +0000
++++ plugin.h
+@@ -21,8 +21,8 @@ typedef struct mupdf_page_s
+ {
+ fz_page* page; /**< Reference to the mupdf page */
+ fz_context* ctx; /**< Context */
+- fz_text_sheet* sheet; /**< Text sheet */
+- fz_text_page* text; /**< Page text */
++ fz_stext_sheet* sheet; /**< Text sheet */
++ fz_stext_page* text; /**< Page text */
+ fz_rect bbox; /**< Bbox */
+ bool extracted_text; /**< If text has already been extracted */
+ } mupdf_page_t;
diff --git a/zathura-pdf-mupdf/patches/patch-render.c b/zathura-pdf-mupdf/patches/patch-render.c
new file mode 100644
index 0000000..613a0d0
--- /dev/null
+++ b/zathura-pdf-mupdf/patches/patch-render.c
@@ -0,0 +1,33 @@
+$NetBSD$
+
+--- render.c.orig 2016-02-14 22:49:46.000000000 +0000
++++ render.c
+@@ -20,7 +20,10 @@ pdf_page_render_to_buffer(mupdf_document
+ return ZATHURA_ERROR_UNKNOWN;
+ }
+
+- fz_display_list* display_list = fz_new_display_list(mupdf_page->ctx);
++ fz_irect irect = { .x1 = page_width, .y1 = page_height };
++ fz_rect rect = { .x1 = page_width, .y1 = page_height };
++
++ fz_display_list* display_list = fz_new_display_list(mupdf_page->ctx, &rect);
+ fz_device* device = fz_new_list_device(mupdf_page->ctx, display_list);
+
+ fz_try (mupdf_document->ctx) {
+@@ -33,14 +36,11 @@ pdf_page_render_to_buffer(mupdf_document
+
+ fz_drop_device(mupdf_page->ctx, device);
+
+- fz_irect irect = { .x1 = page_width, .y1 = page_height };
+- fz_rect rect = { .x1 = page_width, .y1 = page_height };
+-
+ fz_colorspace* colorspace = fz_device_bgr(mupdf_document->ctx);
+- fz_pixmap* pixmap = fz_new_pixmap_with_bbox_and_data(mupdf_page->ctx, colorspace, &irect, image);
++ fz_pixmap* pixmap = fz_new_pixmap_with_bbox_and_data(mupdf_page->ctx, colorspace, &irect, 1, image);
+ fz_clear_pixmap_with_value(mupdf_page->ctx, pixmap, 0xFF);
+
+- device = fz_new_draw_device(mupdf_page->ctx, pixmap);
++ device = fz_new_draw_device(mupdf_page->ctx, NULL, pixmap);
+ fz_run_display_list(mupdf_page->ctx, display_list, device, &fz_identity, &rect, NULL);
+ fz_drop_device(mupdf_page->ctx, device);
+
diff --git a/zathura-pdf-mupdf/patches/patch-search.c b/zathura-pdf-mupdf/patches/patch-search.c
new file mode 100644
index 0000000..b4cecea
--- /dev/null
+++ b/zathura-pdf-mupdf/patches/patch-search.c
@@ -0,0 +1,15 @@
+$NetBSD: patch-search.c,v 1.1 2016/04/27 12:38:45 leot Exp $
+
+Update to mupdf-1.9 API.
+
+--- search.c.orig 2016-02-14 22:49:46.000000000 +0000
++++ search.c
+@@ -40,7 +40,7 @@ pdf_page_search_text(zathura_page_t* pag
+ }
+
+ fz_rect* hit_bbox = fz_malloc_array(mupdf_page->ctx, N_SEARCH_RESULTS, sizeof(fz_rect));
+- int num_results = fz_search_text_page(mupdf_page->ctx, mupdf_page->text,
++ int num_results = fz_search_stext_page(mupdf_page->ctx, mupdf_page->text,
+ (char*) text, hit_bbox, N_SEARCH_RESULTS);
+
+ for (int i = 0; i < num_results; i++) {
diff --git a/zathura-pdf-mupdf/patches/patch-utils.c b/zathura-pdf-mupdf/patches/patch-utils.c
new file mode 100644
index 0000000..08e83fd
--- /dev/null
+++ b/zathura-pdf-mupdf/patches/patch-utils.c
@@ -0,0 +1,15 @@
+$NetBSD: patch-utils.c,v 1.1 2016/04/27 12:38:45 leot Exp $
+
+Update to mupdf-1.9 API.
+
+--- utils.c.orig 2016-02-14 22:49:46.000000000 +0000
++++ utils.c
+@@ -14,7 +14,7 @@ mupdf_page_extract_text(mupdf_document_t
+ fz_device* text_device = NULL;
+
+ fz_try (mupdf_page->ctx) {
+- text_device = fz_new_text_device(mupdf_page->ctx, mupdf_page->sheet, mupdf_page->text);
++ text_device = fz_new_stext_device(mupdf_page->ctx, mupdf_page->sheet, mupdf_page->text, NULL);
+
+ /* Disable FZ_IGNORE_IMAGE to collect image blocks */
+ fz_disable_device_hints(mupdf_page->ctx, text_device, FZ_IGNORE_IMAGE);
Home |
Main Index |
Thread Index |
Old Index