summaryrefslogtreecommitdiff
path: root/source/tools
diff options
context:
space:
mode:
authorSebastian Rasmussen <sebras@gmail.com>2016-08-03 03:40:33 +0800
committerSebastian Rasmussen <sebras@gmail.com>2016-09-08 18:53:00 +0800
commit0c61b5737fd5b8fc03ac1457b2dc85033677e8f0 (patch)
tree3576120d2ed62e5a8c581ace77e425c6098f5157 /source/tools
parentdc2c77351a2b3188c971551b1231cf480dad9986 (diff)
downloadmupdf-0c61b5737fd5b8fc03ac1457b2dc85033677e8f0.tar.xz
Add options to control heuristics in structured text.
Diffstat (limited to 'source/tools')
-rw-r--r--source/tools/mudraw.c2
-rw-r--r--source/tools/murun.c6
2 files changed, 5 insertions, 3 deletions
diff --git a/source/tools/mudraw.c b/source/tools/mudraw.c
index e7dc629b..fde776d2 100644
--- a/source/tools/mudraw.c
+++ b/source/tools/mudraw.c
@@ -626,7 +626,7 @@ static void dodrawpage(fz_context *ctx, fz_page *page, fz_display_list *list, in
else
fz_bound_page(ctx, page, &mediabox);
text = fz_new_stext_page(ctx, &mediabox);
- dev = fz_new_stext_device(ctx, sheet, text);
+ dev = fz_new_stext_device(ctx, sheet, text, 0);
if (lowmemory)
fz_enable_device_hints(ctx, dev, FZ_NO_CACHE);
if (output_format == OUT_HTML)
diff --git a/source/tools/murun.c b/source/tools/murun.c
index 5767d27d..3843ea1f 100644
--- a/source/tools/murun.c
+++ b/source/tools/murun.c
@@ -1627,6 +1627,7 @@ static void ffi_Page_toStructuredText(js_State *J)
{
fz_context *ctx = js_getcontext(J);
fz_page *page = js_touserdata(J, 0, "fz_page");
+ const char *options = js_tointeger(J, 1);
fz_stext_sheet *sheet = NULL;
fz_stext_page *text;
@@ -1634,7 +1635,7 @@ static void ffi_Page_toStructuredText(js_State *J)
fz_try(ctx) {
sheet = fz_new_stext_sheet(ctx);
- text = fz_new_stext_page_from_page(ctx, page, sheet);
+ text = fz_new_stext_page_from_page(ctx, page, sheet, options);
}
fz_always(ctx)
fz_drop_stext_sheet(ctx, sheet);
@@ -2458,6 +2459,7 @@ static void ffi_DisplayList_toStructuredText(js_State *J)
{
fz_context *ctx = js_getcontext(J);
fz_display_list *list = js_touserdata(J, 0, "fz_display_list");
+ const char *options = js_tointeger(J, 1);
fz_stext_sheet *sheet = NULL;
fz_stext_page *text;
@@ -2465,7 +2467,7 @@ static void ffi_DisplayList_toStructuredText(js_State *J)
fz_try(ctx) {
sheet = fz_new_stext_sheet(ctx);
- text = fz_new_stext_page_from_display_list(ctx, list, sheet);
+ text = fz_new_stext_page_from_display_list(ctx, list, sheet, options);
}
fz_always(ctx)
fz_drop_stext_sheet(ctx, sheet);