Commit Graph
8 Commits
Author SHA1 Message Date
Yury Delendik 20a91bcdbf Fixes ignoring of the escaped CR LF 2014-03-20 11:50:12 -05:00
Jonas Jenwald 7d4acc13fb Fix coding style in test/unit/parser_spec.js 2014-03-14 15:32:32 +01:00
Ophir LOJKINE 4a66eccedc Rewrite Lexer_getNumber.
Now, it computes the numbers with only basic arithmetic operations, without first creating a string and then calling parseFloat.
The new function doesn't behave exactly the same as the old one.
In particular, the old behaviour was that when there was a number immediatly followed by an 'E', the 'E' was consumed. Now it's not. It allows for "glued" numbers and operators.
Also, the new function is faster and consumes less memory.
2014-02-01 21:46:09 +01:00
Yury Delendik 19e8f2f059 lookChar refactoring 2013-07-08 21:25:55 -05:00
Yury Delendik 95e5429707 Fixes getString 2013-02-23 11:35:18 -06:00
Yury Delendik 81f8f92696 Adds web/* and test/* for jshint target 2013-02-04 12:01:19 -06:00
mduan eb8f4e8343 Handle some illegal characters in hex string
Do not throw exception when hex strings are in the wrong format

Currently pdf.js is throwing an exception for the following hex string:

`<7 0 2 15 5 2 2 2 4 3 2 4>`

The issue is that the 15 is not a valid hex character so pdf.js ends up
throwing an exception.

This diff changes the parser to process the above hex string as follow:

`70 21 55 2 24 32` (Note: the final 4 of the hex string is ignored)

replicating the behaviour of MuPDF, and doesn't throw an exception.
2013-01-08 15:29:24 -08:00
Yury Delendik 4c0f9eb924 Fixes getNumber at the end of stream 2012-10-24 10:47:16 -05:00