From 0b7754a4c353913d0b181376dd25b9c2a9edd303 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Mon, 13 Nov 2017 15:23:59 +0100 Subject: Never draw Popup annotations. Popup annotations should never have an appearance stream, but in case they do we shouldn't draw them. The Open property is only to toggle whether the GUI should be showing the Content text editing in a Popup (or Text) annotation, and should not affect drawing the page. --- source/pdf/pdf-interpret.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source') diff --git a/source/pdf/pdf-interpret.c b/source/pdf/pdf-interpret.c index 5f974ac5..8b44079e 100644 --- a/source/pdf/pdf-interpret.c +++ b/source/pdf/pdf-interpret.c @@ -1078,7 +1078,8 @@ pdf_process_annot(fz_context *ctx, pdf_processor *proc, pdf_document *doc, pdf_p if (flags & (PDF_ANNOT_IS_INVISIBLE | PDF_ANNOT_IS_HIDDEN)) return; - if (pdf_annot_has_open(ctx, annot) && !pdf_annot_is_open(ctx, annot)) + /* popup annotations should never be drawn */ + if (pdf_annot_type(ctx, annot) == PDF_ANNOT_POPUP) return; if (proc->usage) -- cgit v1.2.3