poppler/TextOutputDev.cc | 4 ++++
1 file changed, 4 insertions(+)
New commits:
commit fea7bfc3978cb962e2372df3c407114effd5f831
Author: Jason Crain <[email protected]>
Date: Sat Jul 30 03:38:29 2016 -0500
TextOutputDev: Remove null characters from PDF text
Null characters in the PDF text cause problems with the glib frontend's
handling of C strings. Filter them out.
Bug #97144
diff --git a/poppler/TextOutputDev.cc b/poppler/TextOutputDev.cc
index cf39bd8..56ea3cc 100644
--- a/poppler/TextOutputDev.cc
+++ b/poppler/TextOutputDev.cc
@@ -2611,6 +2611,10 @@ void TextPage::addChar(GfxState *state, double x, double
y,
charPos += nBytes;
endWord();
return;
+ } else if (uLen == 1 && u[0] == (Unicode)0x0) {
+ // ignore null characters
+ charPos += nBytes;
+ return;
}
state->getFontTransMat(&mat.m[0], &mat.m[1], &mat.m[2], &mat.m[3]);
_______________________________________________
poppler mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/poppler