summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2018-06-19 11:50:45 +0200
committerRobin Watts <robin.watts@artifex.com>2018-06-22 16:48:47 +0100
commit148b0934370336fc8b260e8c3aef83daf4d80ba4 (patch)
tree3f0636f809b9f019afdb3a12c96d556f3f30368c
parentbb3e6c89934e56b7b4e9425adc0f9c9ff6d93043 (diff)
downloadmupdf-148b0934370336fc8b260e8c3aef83daf4d80ba4.tar.xz
Look up DA in Root/AcroForm/DA if missing in annotation property.
-rw-r--r--source/pdf/pdf-annot.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/pdf/pdf-annot.c b/source/pdf/pdf-annot.c
index 30afe149..ed6856de 100644
--- a/source/pdf/pdf-annot.c
+++ b/source/pdf/pdf-annot.c
@@ -1478,6 +1478,11 @@ void
pdf_annot_default_appearance(fz_context *ctx, pdf_annot *annot, const char **font, float *size, float color[3])
{
pdf_obj *da = pdf_dict_get(ctx, annot->obj, PDF_NAME(DA));
+ if (!da)
+ {
+ pdf_obj *trailer = pdf_trailer(ctx, annot->page->doc);
+ da = pdf_dict_getl(ctx, trailer, PDF_NAME(Root), PDF_NAME(AcroForm), PDF_NAME(DA), NULL);
+ }
pdf_parse_default_appearance(ctx, pdf_to_str_buf(ctx, da), font, size, color);
}