summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);
}