diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2018-02-23 00:02:35 +0100 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2018-02-27 14:08:27 +0100 |
commit | 185707aabfe5b80e926dfc781335bfe0b42f2669 (patch) | |
tree | 390fa0b2097cc92b910ad6d2920ee20b3ad76e0d /source | |
parent | 8eb356906b06a5cd31a0677909da33fda094fca3 (diff) | |
download | mupdf-185707aabfe5b80e926dfc781335bfe0b42f2669.tar.xz |
Get border width from BS/W if Border is missing.
Diffstat (limited to 'source')
-rw-r--r-- | source/pdf/pdf-annot-edit.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source/pdf/pdf-annot-edit.c b/source/pdf/pdf-annot-edit.c index ccaf1c1c..53be06d2 100644 --- a/source/pdf/pdf-annot-edit.c +++ b/source/pdf/pdf-annot-edit.c @@ -423,9 +423,14 @@ pdf_set_annot_line_ending_styles(fz_context *ctx, pdf_annot *annot, int start_st float pdf_annot_border(fz_context *ctx, pdf_annot *annot) { - pdf_obj *border = pdf_dict_get(ctx, annot->obj, PDF_NAME_Border); + pdf_obj *border, *bs, *bs_w; + border = pdf_dict_get(ctx, annot->obj, PDF_NAME_Border); if (pdf_is_array(ctx, border)) return pdf_to_real(ctx, pdf_array_get(ctx, border, 2)); + bs = pdf_dict_get(ctx, annot->obj, PDF_NAME_BS); + bs_w = pdf_dict_get(ctx, bs, PDF_NAME_W); + if (pdf_is_number(ctx, bs_w)) + return pdf_to_real(ctx, bs_w); return 1; } |