Skip to content

Commit

Permalink
Merge pull request #7714 from cemerick/fix-non-numeric-TJ
Browse files Browse the repository at this point in the history
Fix getTextContent evaluation to only apply TJ horizontal offsets using numeric items/args
  • Loading branch information
timvandermeij authored Oct 13, 2016
2 parents 8c5b925 + 85c52f1 commit c457e60
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/evaluator.js
Original file line number Diff line number Diff line change
Expand Up @@ -1531,7 +1531,7 @@ var PartialEvaluator = (function PartialEvaluatorClosure() {
for (var j = 0, jj = items.length; j < jj; j++) {
if (typeof items[j] === 'string') {
buildTextContentItem(items[j]);
} else {
} else if (isNum(items[j])) {
ensureTextContentItem();

// PDF Specification 5.3.2 states:
Expand Down
1 change: 1 addition & 0 deletions test/pdfs/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -258,3 +258,4 @@
!annotation-text-widget.pdf
!annotation-choice-widget.pdf
!zero_descent.pdf
!operator-in-TJ-array.pdf
Binary file added test/pdfs/operator-in-TJ-array.pdf
Binary file not shown.
7 changes: 7 additions & 0 deletions test/test_manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3267,5 +3267,12 @@
"rounds": 1,
"lastPage": 1,
"type": "text"
},
{ "id": "operator-in-TJ-array",
"file": "pdfs/operator-in-TJ-array.pdf",
"md5": "dfe0f15a45be18eca142adaf760984ee",
"link": false,
"rounds": 1,
"type": "text"
}
]

0 comments on commit c457e60

Please sign in to comment.