Attach (recommended) or Link to PDF file
lex-diff.pdf
Web browser and its version
Firefox Nightly
Operating system and its version
macOS
PDF.js version
recent
Is the bug present in the latest PDF.js version?
Yes
Is a browser extension
No
Steps to reproduce the problem
- Load lex-diff.pdf
- Observe a large red rectangle
What is the expected behavior?
The PDF should not have a red rectangle. Acrobat, Preview and PDFium do not have a red rectangle.
What went wrong?
In a PDF stream like:
q
1 0 0 rg
100 450 400 150 re
5f
Q
pdf.js will lex 5f as Number(5), Keyword(f).
From PDF spec 7.2.3:
"All characters except the white-space characters and delimiters are referred to as regular characters. These characters include bytes that are outside the ASCII character set. A sequence of consecutive regular characters comprises a single token."
Link to a viewer
No response
Additional context
No response
Attach (recommended) or Link to PDF file
lex-diff.pdf
Web browser and its version
Firefox Nightly
Operating system and its version
macOS
PDF.js version
recent
Is the bug present in the latest PDF.js version?
Yes
Is a browser extension
No
Steps to reproduce the problem
What is the expected behavior?
The PDF should not have a red rectangle. Acrobat, Preview and PDFium do not have a red rectangle.
What went wrong?
In a PDF stream like:
pdf.js will lex
5fas Number(5), Keyword(f).From PDF spec 7.2.3:
"All characters except the white-space characters and delimiters are referred to as regular characters. These characters include bytes that are outside the ASCII character set. A sequence of consecutive regular characters comprises a single token."
Link to a viewer
No response
Additional context
No response