summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source/pdf/pdf-interpret.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/source/pdf/pdf-interpret.c b/source/pdf/pdf-interpret.c
index 1508e829..f0271cf3 100644
--- a/source/pdf/pdf-interpret.c
+++ b/source/pdf/pdf-interpret.c
@@ -461,17 +461,16 @@ pdf_process_annot(pdf_document *doc, pdf_page *page, pdf_annot *annot, const pdf
pdf_csi *csi;
int flags;
- flags = pdf_to_int(pdf_dict_gets(annot->obj, "F"));
-
- /* TODO: NoZoom and NoRotate */
- if (flags & (1 << 0)) /* Invisible */
- return;
- if (flags & (1 << 1)) /* Hidden */
- return;
-
csi = pdf_new_csi(doc, cookie, process);
fz_try(ctx)
{
+ flags = pdf_to_int(pdf_dict_gets(annot->obj, "F"));
+
+ /* Check not invisible (bit 0) and hidden (bit 1) */
+ /* TODO: NoZoom and NoRotate */
+ if (flags & ((1 << 0) | (1 << 1)))
+ break;
+
csi->process.processor->process_annot(csi, csi->process.state, page->resources, annot);
}
fz_always(ctx)