From 14bcb5219da8871c059e21bf2db18138c28524f9 Mon Sep 17 00:00:00 2001 From: Nico Weber Date: Tue, 21 Nov 2023 21:43:19 -0500 Subject: [PATCH] LibPDF: Tolerate comments before drawing operators Necessary to be able to render https://github.com/pdf-association/pdf20examples/blob/master/pdf20-utf8-test.pdf --- Userland/Libraries/LibPDF/Parser.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Userland/Libraries/LibPDF/Parser.cpp b/Userland/Libraries/LibPDF/Parser.cpp index 672f831680..cd52d641c3 100644 --- a/Userland/Libraries/LibPDF/Parser.cpp +++ b/Userland/Libraries/LibPDF/Parser.cpp @@ -530,6 +530,7 @@ PDFErrorOr> Parser::parse_operators() m_reader.consume_whitespace(); while (!m_reader.done()) { + parse_comment(); auto ch = m_reader.peek(); if (is_operator_char_start(ch)) { auto operator_start = m_reader.offset();