From caafb37ddf3d58f4d37d8c7b535021ff18d57861 Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Wed, 13 Jul 2016 19:36:39 +0100 Subject: Bug 696699: Fix Text extraction mediabox information. Since the removal of the begin_page device function, structured text extraction has been unable to correctly establish the mediabox for extracted pages. Update the fz_new_stext_page call to take this mediabox information. This is an API change, but hopefully most people are calling fz_new_stext_page_from_page or fz_new_stext_page_from_display_list which are updated here to cope. Update all the apps/tools to behave properly. --- source/fitz/stext-device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/fitz/stext-device.c') diff --git a/source/fitz/stext-device.c b/source/fitz/stext-device.c index 55f2033b..607dcbab 100644 --- a/source/fitz/stext-device.c +++ b/source/fitz/stext-device.c @@ -456,10 +456,10 @@ fz_lookup_stext_style(fz_context *ctx, fz_stext_sheet *sheet, fz_text_span *span } fz_stext_page * -fz_new_stext_page(fz_context *ctx) +fz_new_stext_page(fz_context *ctx, const fz_rect *mediabox) { fz_stext_page *page = fz_malloc(ctx, sizeof(*page)); - page->mediabox = fz_empty_rect; + page->mediabox = *mediabox; page->len = 0; page->cap = 0; page->blocks = NULL; -- cgit v1.2.3