Andrea Vacondio created PDFBOX-3589:
---------------------------------------
Summary: Double negative float
Key: PDFBOX-3589
URL: https://issues.apache.org/jira/browse/PDFBOX-3589
Project: PDFBox
Issue Type: Improvement
Components: Parsing
Affects Versions: 2.0.3
Environment: Latest 2.0.x checked out the 22nd of November
Reporter: Andrea Vacondio
Priority: Minor
We have a document where the content stream contains a float with double
negative so something like --242.0 and this result in a wrong operator:
{code}
0 -242.0 72.08 TD
{code}
while it should be
{code}
-242.0 72.08 TD
{code}
Compared to Acrobat Reader or pdf.js, this results in missing text when
rendering the page. Here is a relevant section in pdf.js source code:
{code}
if (ch === 0x2D) { // '-'
sign = -1;
ch = this.nextChar();
if (ch === 0x2D) { // '-'
// Ignore double negative (this is consistent with Adobe Reader).
ch = this.nextChar();
}
}
{code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]