summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/mupdf/pdf/interpret.h2
-rw-r--r--source/pdf/pdf-op-filter.c11
2 files changed, 11 insertions, 2 deletions
diff --git a/include/mupdf/pdf/interpret.h b/include/mupdf/pdf/interpret.h
index f7104499..cbe1d665 100644
--- a/include/mupdf/pdf/interpret.h
+++ b/include/mupdf/pdf/interpret.h
@@ -248,7 +248,7 @@ pdf_processor *pdf_new_filter_processor(fz_context *ctx, pdf_document *doc, pdf_
typedef int (pdf_text_filter_fn)(fz_context *ctx, void *opaque, int *ucsbuf, int ucslen, fz_matrix *trm, fz_rect *bbox);
-typedef void (pdf_after_text_object_fn)(fz_context *ctx, void *opaque, pdf_document *doc, pdf_processor *chain);
+typedef void (pdf_after_text_object_fn)(fz_context *ctx, void *opaque, pdf_document *doc, pdf_processor *chain, const fz_matrix *ctm);
/*
pdf_new_filter_processor_with_text_filter: Create a filter
diff --git a/source/pdf/pdf-op-filter.c b/source/pdf/pdf-op-filter.c
index b69f51ac..c3f64b3f 100644
--- a/source/pdf/pdf-op-filter.c
+++ b/source/pdf/pdf-op-filter.c
@@ -1035,7 +1035,16 @@ pdf_filter_ET(fz_context *ctx, pdf_processor *proc)
if (p->chain->op_ET)
p->chain->op_ET(ctx, p->chain);
if (p->after_text)
- p->after_text(ctx, p->opaque, p->doc, p->chain);
+ {
+ fz_matrix ctm;
+
+ fz_concat(&ctm, &p->gstate->sent.ctm, &p->gstate->pending.ctm);
+ if (p->chain->op_q)
+ p->chain->op_q(ctx, p->chain);
+ p->after_text(ctx, p->opaque, p->doc, p->chain, &ctm);
+ if (p->chain->op_Q)
+ p->chain->op_Q(ctx, p->chain);
+ }
}
/* text state */