Dear popplers,
I lately noticed a lot of warnings
'Bad color space - expected name, array or dict'
These warnings are due to
0 0 0 rg
or similar (different numbers) in the content stream of a page. This command
is valid pdf.
IMHO the cause is a typo in Gfx::opSetFillRGBColor where
------------
if !obj.isNull()) {
colorSpace = GfxColorSpace::parse(&obj, this);
}
------------
should be changed to
------------
if (!obj.isNull()) {
colorSpace = GfxColorSpace::parse(&obj, this);
}
------------
Despite this warning the further processing seems to be correct.
Please feel free to comment or correct me.
--
regards
Axeldiff --git a/poppler/Gfx.cc b/poppler/Gfx.cc
index 2f481f0..72e96c9 100644
--- a/poppler/Gfx.cc
+++ b/poppler/Gfx.cc
@@ -1453,7 +1453,7 @@ void Gfx::opSetFillRGBColor(Object args[], int numArgs) {
}
state->setFillPattern(NULL);
res->lookupColorSpace("DefaultRGB", &obj);
- if (obj.isNull()) {
+ if (!obj.isNull()) {
colorSpace = GfxColorSpace::parse(&obj, this);
}
if (colorSpace == NULL) {_______________________________________________
poppler mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/poppler