1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-22 16:18:08 +02:00

Always flush the current item with MarkedContent stuff when getting text (#15094)

This commit is contained in:
Calixte Denizet 2022-06-25 16:40:46 +02:00
parent 23fcdabb37
commit 3789dab307
2 changed files with 28 additions and 3 deletions

View file

@ -3290,6 +3290,7 @@ class PartialEvaluator {
);
return;
case OPS.beginMarkedContent:
flushTextContentItem();
if (includeMarkedContent) {
textContent.items.push({
type: "beginMarkedContent",
@ -3298,8 +3299,8 @@ class PartialEvaluator {
}
break;
case OPS.beginMarkedContentProps:
flushTextContentItem();
if (includeMarkedContent) {
flushTextContentItem();
let mcid = null;
if (args[1] instanceof Dict) {
mcid = args[1].get("MCID");
@ -3314,8 +3315,8 @@ class PartialEvaluator {
}
break;
case OPS.endMarkedContent:
flushTextContentItem();
if (includeMarkedContent) {
flushTextContentItem();
textContent.items.push({
type: "endMarkedContent",
});