From 185707aabfe5b80e926dfc781335bfe0b42f2669 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Fri, 23 Feb 2018 00:02:35 +0100 Subject: Get border width from BS/W if Border is missing. --- source/pdf/pdf-annot-edit.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'source') 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; } -- cgit v1.2.3