[gs-commits] mupdf 1.16.1.89 Fix Widgets to only display if they have
[email protected] (Robin Watts) Mon, 14 Oct 2019 15:01:44 +0000 (UTC)
| Newsgroups | gmane.comp.printing.ghostscript.cvs |
|---|---|
| Message-ID | <[email protected]> |
commit 3cb769c05226c7e746d4041ab60df9eb2fcfdfd1 Author: Robin Watts <[email protected]> Date: Mon Oct 14 15:37:30 2019 +0100 Fix Widgets to only display if they have both T and FT. As near as we can work out, Widget annotations are only displayed in Acrobat if they have both T and FT flags. diff --git a/source/pdf/pdf-run.c b/source/pdf/pdf-run.c index 665c7c0..67ebb7f 100644 --- a/source/pdf/pdf-run.c +++ b/source/pdf/pdf-run.c @@ -16,6 +16,17 @@ pdf_run_annot_with_usage(fz_context *ctx, pdf_document *doc, pdf_page *page, pdf if (cookie && page->super.incomplete) cookie->incomplete = 1; + /* Widgets only get displayed if they have both a T and a TF flag, + * apparently */ + if (pdf_name_eq(ctx, pdf_dict_get(ctx, annot->obj, PDF_NAME(Subtype)), PDF_NAME(Widget))) + { + pdf_obj *ft = pdf_dict_get_inheritable(ctx, annot->obj, PDF_NAME(FT)); + pdf_obj *t = pdf_dict_get_inheritable(ctx, annot->obj, PDF_NAME(T)); + + if (ft == NULL || t == NULL) + return; + } + fz_try(ctx) { default_cs = pdf_load_default_colorspaces(ctx, doc, page); http://git.ghostscript.com/?p=mupdf.git;a=commit;h=3cb769c05226c7e746d4041ab60df9eb2fcfdfd1 -- MuPDF library Artifex Software, Inc.