[gs-commits] mupdf 1.16.1.23 Respect deprecated Border entry if BS is
[email protected] (Tor Andersson)
| Newsgroups | gmane.comp.printing.ghostscript.cvs |
|---|---|
| Message-ID | <[email protected]> |
commit ebea50c84bbf6f95804d333858c7166f3b69850d Author: Tor Andersson <[email protected]> Date: Tue Aug 27 12:45:45 2019 +0200 Respect deprecated Border entry if BS is missing. diff --git a/source/pdf/pdf-annot.c b/source/pdf/pdf-annot.c index 12e04cc..0ef1a2f 100644 --- a/source/pdf/pdf-annot.c +++ b/source/pdf/pdf-annot.c @@ -744,11 +744,15 @@ pdf_set_annot_line_end_style(fz_context *ctx, pdf_annot *annot, enum pdf_line_en float pdf_annot_border(fz_context *ctx, pdf_annot *annot) { - pdf_obj *bs, *bs_w; + pdf_obj *bs, *bs_w, *border; 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); + border = pdf_dict_get(ctx, annot->obj, PDF_NAME(Border)); + bs_w = pdf_array_get(ctx, border, 2); + if (pdf_is_number(ctx, bs_w)) + return pdf_to_real(ctx, bs_w); return 1; } http://git.ghostscript.com/?p=mupdf.git;a=commit;h=ebea50c84bbf6f95804d333858c7166f3b69850d -- MuPDF library Artifex Software, Inc.