poppler/Annot.cc | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
New commits: commit a24536c619a463763517401045eaf251190c7db0 Author: José Aliste <[email protected]> Date: Tue Jun 25 21:32:24 2019 -0400 Handle Ink annots without an InkList but with an AP According to the pdf spec, the AP entry should take precedence over the InkList entry. Thus, it is safe to render Ink annots with an AP entry but missing an InkList entry. This fixes rendering of some Onyx Generated files. diff --git a/poppler/Annot.cc b/poppler/Annot.cc index 8a0c261d..18357a9c 100644 --- a/poppler/Annot.cc +++ b/poppler/Annot.cc @@ -5833,8 +5833,14 @@ void AnnotInk::initialize(PDFDoc *docA, Dict* dict) { } else { inkListLength = 0; inkList = nullptr; - error(errSyntaxError, -1, "Bad Annot Ink List"); - ok = false; + obj1 = dict->lookup("AP"); + + // Although InkList is required, it should be ignored + // when there is an AP entry in the Annot. + if (!obj1.isDict()) { + error(errSyntaxError, -1, "Bad Annot Ink List"); + ok = false; + } } obj1 = dict->lookup("BS"); _______________________________________________ poppler mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/poppler
