diff --git a/src/core/parser.js b/src/core/parser.js index 94b2e7894cbcd..50ea563dbad31 100644 --- a/src/core/parser.js +++ b/src/core/parser.js @@ -248,8 +248,12 @@ class Parser { } // Check that the "EI" sequence isn't part of the image data, since // that would cause the image to be truncated (fixes issue11124.pdf). + // + // Check more than the `followingBytes` to be able to find operators + // with multiple arguments, e.g. transform (cm) with decimal arguments + // (fixes issue19494.pdf). const tmpLexer = new Lexer( - new Stream(followingBytes.slice()), + new Stream(stream.peekBytes(5 * n)), knownCommands ); // Reduce the number of (potential) warning messages. diff --git a/test/pdfs/issue19494.pdf.link b/test/pdfs/issue19494.pdf.link new file mode 100644 index 0000000000000..a6093208279b1 --- /dev/null +++ b/test/pdfs/issue19494.pdf.link @@ -0,0 +1 @@ +https://github.com/user-attachments/files/18810079/VERAPDF-1335-InlineImage.pdf diff --git a/test/test_manifest.json b/test/test_manifest.json index f1b8f1d560f4a..d4deda4079f5f 100644 --- a/test/test_manifest.json +++ b/test/test_manifest.json @@ -5617,6 +5617,15 @@ "rounds": 1, "type": "eq" }, + { + "id": "issue19494", + "file": "pdfs/issue19494.pdf", + "md5": "2ec2ccbe6aa7e622ef981ca5ca443d55", + "link": true, + "rounds": 1, + "type": "eq", + "lastPage": 1 + }, { "id": "issue11768", "file": "pdfs/issue11768_reduced.pdf",