Commit Graph
102 Commits
Author SHA1 Message Date
Yury Delendik 20a91bcdbf Fixes ignoring of the escaped CR LF 2014-03-20 11:50:12 -05:00
Thorben Bochenek c547f17ee5 Add Test for PDFDocumentProxy_getPageIndex 2014-03-19 10:17:58 +01:00
Jonas Jenwald 2bd81786c2 Fix coding style in test/unit/testreporter.js 2014-03-14 15:46:23 +01:00
Jonas Jenwald 9e3f7e4d6d Fix coding style in test/unit/crypto_spec.js 2014-03-14 15:41:12 +01:00
Jonas Jenwald 6489a80dd0 Fix coding style in test/unit/font_spec.js 2014-03-14 15:38:34 +01:00
Jonas Jenwald 3cd64a85ba Fix coding style in test/unit/function_spec.js 2014-03-14 15:35:04 +01:00
Jonas Jenwald 7d4acc13fb Fix coding style in test/unit/parser_spec.js 2014-03-14 15:32:32 +01:00
Jonas Jenwald 9dfc26e1e3 Fix coding style in test/unit/stream_spec.js 2014-03-14 15:31:00 +01:00
Yury Delendik 1c0e1cc591 Merge pull request #4444 from nnethercote/min-length
Estimate the size of decoded streams in advance.
2014-03-13 10:58:31 -05:00
Yury Delendik 7963f22545 Merge pull request #4259 from brendandahl/built-in-cmaps-squash
Adds built in CMaps and unifies the glyph mapping.
2014-03-13 10:27:48 -05:00
Nicholas Nethercote b3024db677 Estimate the size of decoded streams in advance.
When decoding a stream, the decode buffer is often grown multiple times, its
byte size increasing like so: 512, 1024, 2048, etc. This patch estimates the
minimum size in advance (using the length of the encoded stream), often
allowing the smaller sizes to be skipped. It also renames numerous |length|
variables as |maybeLength| to make it clear that they can be |null|.

I measured this change on eight documents. This change reduces the cumulative
size of decode buffer allocations by 0--32%, with 10--20% being typical. This
reduces peak RSS by 10 or 20 MiB for several of them.
2014-03-13 02:06:58 -07:00
Yury Delendik ad4eb9a21d Merge pull request #4354 from nnethercote/Name-cache
Use a cache to minimize the number of Name objects.
2014-03-02 18:44:29 -06:00
Mitar 2c82e720b8 Updated to current latest stable version of jshint. 2014-03-01 13:31:25 -08:00
Nicholas Nethercote fdb7c218da Use a cache to minimize the number of Name objects. 2014-02-27 20:41:03 -08:00
Brendan Dahl b5b94a4af3 Use built in CMaps and unify the glyph mapping. 2014-02-11 10:27:09 -08: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 e9327050c3 Basic function.js split 2014-01-27 20:29:47 -06:00
Yury Delendik bf432a37bb Refactors shared/pattern.js into core/ and display/ 2014-01-25 12:18:22 -06:00
Yury Delendik 09f8f951c8 Extracts evaluator preprocessor and refactor text extraction 2014-01-17 07:16:52 -06:00
Yury Delendik 5bf3e44e30 Introduces LegacyPromise; polyfills DOM Promise 2014-01-03 18:17:05 -06:00
Brendan Dahl f4942b11f8 Reduce the memory usage of the operator list. 2013-11-13 11:43:38 -08:00
Yury Delendik 1c7f1cee00 Merge pull request #3674 from brendandahl/cmap-squash
Read multi-byte character codes based on codespace ranges.
2013-09-25 18:04:49 -07:00
Brendan Dahl f32e65b19f Read multi-byte character codes based on codespace ranges. 2013-09-25 10:32:04 -07:00
Brendan Dahl 730a2cc550 Increase api unit tests timeout for chrome. 2013-09-24 09:30:54 -07:00
Brendan Dahl 5ecce4996b Split files into worker and main thread pieces. 2013-08-12 10:48:06 -07:00
Brendan Dahl bf72bc94e2 Incrementally render by sending the operator list by chunks as they're ready. 2013-07-31 11:17:36 -07:00
Yury Delendik 19e8f2f059 lookChar refactoring 2013-07-08 21:25:55 -05:00
Brendan Dahl ae1f973204 Use A+ spec compatible promises. 2013-06-05 12:28:31 -07:00
Yury Delendik ffeec0572c Fixes incorrect unit test 2013-05-16 12:15:01 -05:00
Mack Duan f8f4b3f45d Refactor code for annotations 2013-05-07 14:22:13 -04:00
Yury Delendik 65a884c421 Merge pull request #3075 from brendandahl/font-encoding
Fix priority of which font encoding is used.
2013-04-30 09:40:52 -07:00
Mack Duan 2ce00279be Address more of brendan's comments 2013-04-18 10:41:33 -07:00
Mack Duan dbccbaaa27 Make getOperatorList() calls independent and merge queues at end 2013-04-18 00:16:41 -07:00
Mack Duan 6b2c6fc223 Changes to regression tests for progressive loading 2013-04-18 00:16:36 -07:00
Mack Duan ef423ef30c Implement progressive loading of PDFs 2013-04-12 16:13:22 -07:00
Brendan Dahl 0f41b2db44 Fix priority of which font encoding is used. 2013-04-10 09:51:06 -07:00
Brendan Dahl 028151d13a Restructure/rewrite of the Type1 font parser. 2013-03-27 17:17:01 -07:00
Yury Delendik 8ee193892b Seac support for Windows 2013-03-04 12:37:59 -06: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
vyv03354 a254de86fb CFF parser didn't count hints defined by hstem/vstem 2013-01-26 22:08:45 +09:00
mduan 5ab3bb1e03 Skip commands that have too few arguments
- Commands that have too few args will be skipped
- Commands that have too many args will generate an info, but still
execute
2013-01-15 14:07:16 -08:00
Brendan Dahl a79f005527 Fix isDict when type is missing in dictionary. 2013-01-10 16:32:26 -08: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
khodzha 18da086b96 fix of combineUrl(baseUrl, url) in case of url - null, empty, undefined + unittests 2012-11-24 04:25:49 +04:00
Yury Delendik 4c0f9eb924 Fixes getNumber at the end of stream 2012-10-24 10:47:16 -05:00
Brendan Dahl 66563d0f95 Increase wait timeout for api unit tests. 2012-10-15 11:37:50 -07:00
Yury Delendik e32ecc44d3 Fixes CFF test and CFF int16 parsing 2012-08-29 12:58:12 -05:00
Yury Delendik 0dd445bf18 Fixes unit tests and adds few for util.js 2012-06-23 15:35:59 -05:00
Yury Delendik 43f1946c7a Add prefixes for literals 2012-05-20 14:05:23 -05:00