Merge pull request #16462 from calixteman/last_elem_TJ
Take into account the final space if any in the TJ command
This commit is contained in:
commit
1886012874
@ -3074,7 +3074,7 @@ class PartialEvaluator {
|
|||||||
const spaceFactor =
|
const spaceFactor =
|
||||||
((textState.font.vertical ? 1 : -1) * textState.fontSize) / 1000;
|
((textState.font.vertical ? 1 : -1) * textState.fontSize) / 1000;
|
||||||
const elements = args[0];
|
const elements = args[0];
|
||||||
for (let i = 0, ii = elements.length; i < ii - 1; i++) {
|
for (let i = 0, ii = elements.length; i < ii; i++) {
|
||||||
const item = elements[i];
|
const item = elements[i];
|
||||||
if (typeof item === "string") {
|
if (typeof item === "string") {
|
||||||
showSpacedTextBuffer.push(item);
|
showSpacedTextBuffer.push(item);
|
||||||
@ -3096,11 +3096,6 @@ class PartialEvaluator {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const item = elements.at(-1);
|
|
||||||
if (typeof item === "string") {
|
|
||||||
showSpacedTextBuffer.push(item);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (showSpacedTextBuffer.length > 0) {
|
if (showSpacedTextBuffer.length > 0) {
|
||||||
const str = showSpacedTextBuffer.join("");
|
const str = showSpacedTextBuffer.join("");
|
||||||
showSpacedTextBuffer.length = 0;
|
showSpacedTextBuffer.length = 0;
|
||||||
|
@ -265,6 +265,15 @@
|
|||||||
"type": "eq",
|
"type": "eq",
|
||||||
"about": "Fonts referenced only by name and not by an object identifier."
|
"about": "Fonts referenced only by name and not by an object identifier."
|
||||||
},
|
},
|
||||||
|
{ "id": "bug946506-text",
|
||||||
|
"file": "pdfs/bug946506.pdf",
|
||||||
|
"md5": "c28911b5c31bdc337c2ce404c5971cfc",
|
||||||
|
"rounds": 1,
|
||||||
|
"link": false,
|
||||||
|
"firstPage": 1,
|
||||||
|
"lastPage": 1,
|
||||||
|
"type": "text"
|
||||||
|
},
|
||||||
{ "id": "bug931481",
|
{ "id": "bug931481",
|
||||||
"file": "pdfs/bug931481.pdf",
|
"file": "pdfs/bug931481.pdf",
|
||||||
"md5": "547de872cbb2ecc653ae83d5be7e5be9",
|
"md5": "547de872cbb2ecc653ae83d5be7e5be9",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user