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

Add a dummy beginMarkedContentProps operator when optional content parsing fails (issue 17679)

This commit is contained in:
Jonas Jenwald 2024-02-16 12:53:09 +01:00
parent a83a8d7e4f
commit a7bcc81eb1
6 changed files with 209 additions and 2 deletions

View file

@ -2184,6 +2184,7 @@ class PartialEvaluator {
case OPS.beginMarkedContentProps:
if (!(args[0] instanceof Name)) {
warn(`Expected name for beginMarkedContentProps arg0=${args[0]}`);
operatorList.addOp(OPS.beginMarkedContentProps, ["OC", null]);
continue;
}
if (args[0].name === "OC") {
@ -2204,6 +2205,10 @@ class PartialEvaluator {
warn(
`getOperatorList - ignoring beginMarkedContentProps: "${reason}".`
);
operatorList.addOp(OPS.beginMarkedContentProps, [
"OC",
null,
]);
return;
}
throw reason;

View file

@ -13,7 +13,7 @@
* limitations under the License.
*/
import { objectFromMap, unreachable, warn } from "../shared/util.js";
import { info, objectFromMap, unreachable, warn } from "../shared/util.js";
import { MurmurHash3_64 } from "../shared/murmurhash3.js";
const INTERNAL = Symbol("INTERNAL");
@ -130,7 +130,7 @@ class OptionalContentConfig {
return true;
}
if (!group) {
warn("Optional content group not defined.");
info("Optional content group not defined.");
return true;
}
if (group.type === "OCG") {