LibPDF: Tolerate comments before drawing operators

Necessary to be able to render
https://github.com/pdf-association/pdf20examples/blob/master/pdf20-utf8-test.pdf
This commit is contained in:
Nico Weber 2023-11-21 21:43:19 -05:00 committed by Sam Atkins
parent 9e8cf4fc1a
commit 14bcb5219d
Notes: sideshowbarker 2024-07-17 03:45:48 +09:00

View File

@ -530,6 +530,7 @@ PDFErrorOr<Vector<Operator>> 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();