poppler/Gfx.cc | 6 +++--- poppler/Object.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/poppler/Gfx.cc b/poppler/Gfx.cc index a8f5be9..8d05811 100644 --- a/poppler/Gfx.cc +++ b/poppler/Gfx.cc @@ -931,7 +931,7 @@ GBool Gfx::checkArg(Object *arg, TchkType type) { case tchkBool: return arg->isBool(); case tchkInt: return arg->isInt(); case tchkNum: return arg->isNum(); - case tchkString: return arg->isString(); + case tchkString: return arg->isString() || arg->isHexString(); case tchkName: return arg->isName(); case tchkArray: return arg->isArray(); case tchkProps: return arg->isDict() || arg->isName(); @@ -3910,7 +3910,7 @@ void Gfx::opShowSpaceText(Object args[], int numArgs) { state->getHorizScaling(), 0); } out->updateTextShift(state, obj.getNum()); - } else if (obj.isString()) { + } else if (obj.isString() || obj.isHexString()) { doShowText(obj.getString()); } else { error(errSyntaxError, getPos(), @@ -3923,7 +3923,7 @@ void Gfx::opShowSpaceText(Object args[], int numArgs) { a = args[0].getArray(); for (i = 0; i < a->getLength(); ++i) { a->get(i, &obj); - if (obj.isString()) { + if (obj.isString() || obj.isHexString()) { doIncCharCount(obj.getString()); } obj.free(); diff --git a/poppler/Object.h b/poppler/Object.h index 21b9030..b0244cc 100644 --- a/poppler/Object.h +++ b/poppler/Object.h @@ -213,7 +213,7 @@ public: // Where the exact value of integers up to 2^63 is required, use isInt64()/getInt64(). double getNum() { OBJECT_3TYPES_CHECK(objInt, objInt64, objReal); return type == objInt ? (double)intg : type == objInt64 ? (double)int64g : real; } - GooString *getString() { OBJECT_TYPE_CHECK(objString); return string; } + GooString *getString() { OBJECT_2TYPES_CHECK(objString, objHexString); return string; } // After takeString() the only method that should be called for the object is free() // because the object it's not expected to have a NULL string. GooString *takeString() {