Hello, we are experiencing the issue with rendering of form elements of the type:
382 0 obj << /Type /Annot [...] /MK << /BC [ ] /BG [ ] >> [...] endobj Such elements are displayed black with e. g. gimp, evince and okular. Patch attached fixed the problem for us. Thanks, Petr
Handle transparent background and border in the Annotation form
element. For example:
382 0 obj
<<
/Type /Annot
[...]
/MK <<
/BC [ ]
/BG [ ]
>>
[...]
endobj
Index: poppler/Annot.cc
===================================================================
--- poppler/Annot.cc.orig 2014-08-21 21:39:53.000000000 +0200
+++ poppler/Annot.cc 2015-02-10 16:00:51.313836355 +0100
@@ -1045,14 +1045,24 @@
obj1.free();
if (dict->lookup("BC", &obj1)->isArray()) {
- borderColor = new AnnotColor(obj1.getArray());
+ Array *colorComponents = obj1.getArray();
+ if (colorComponents->getLength() > 0) {
+ borderColor = new AnnotColor(colorComponents);
+ } else {
+ borderColor = NULL;
+ }
} else {
borderColor = NULL;
}
obj1.free();
if (dict->lookup("BG", &obj1)->isArray()) {
- backColor = new AnnotColor(obj1.getArray());
+ Array *colorComponents = obj1.getArray();
+ if (colorComponents->getLength() > 0) {
+ backColor = new AnnotColor(colorComponents);
+ } else {
+ backColor = NULL;
+ }
} else {
backColor = NULL;
}
signature.asc
Description: Digital signature
_______________________________________________ poppler mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/poppler
