diff options
author | Robin Watts <robin.watts@artifex.com> | 2016-07-13 19:36:39 +0100 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2016-07-13 20:09:13 +0100 |
commit | caafb37ddf3d58f4d37d8c7b535021ff18d57861 (patch) | |
tree | f7d8352640c645266d78c1d72ffdb1a88109d30c /source/fitz/stext-device.c | |
parent | ed8501ed7f52ba96cbdf12594340e629ab99beef (diff) | |
download | mupdf-caafb37ddf3d58f4d37d8c7b535021ff18d57861.tar.xz |
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.
Diffstat (limited to 'source/fitz/stext-device.c')
-rw-r--r-- | source/fitz/stext-device.c | 4 |
1 files changed, 2 insertions, 2 deletions
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; |