Commit Graph

125 Commits

Author SHA1 Message Date
Tim van der Meij
34728ee49b Removing unused code 2014-07-18 22:34:50 +02:00
Nicholas Nethercote
081866a184 Use null instead of [] for ops with no args.
This reduces peak RSS on one test file from ~600 to ~560 MiB.
2014-06-22 16:03:48 -07:00
Yury Delendik
bdeca30fbf Splits shared/annotation.js into core/ and display/ 2014-06-17 17:43:33 -05:00
pramodhkp
1d00e9d13c Added getOperatorList to api.js 2014-06-18 01:30:42 +05:30
Daniel West
1fce2856c6 Added support for decrypting PDF 1.7/2.0 Algorithm 5 revision 5 and 6.
*Added AES128 Encryption
*Added AES258 Encryption/Decryption
*Added SHA256
*Added SHA512
*Added class to handle 8 byte integers and associated bit operations
*Added SHA384
*Added routines to handle new algorithm and perform PDF2.0 hashing.
2014-06-13 13:05:47 -05:00
Yury Delendik
fcc4dfd9b5 Moves shared/function.js to core/ 2014-05-23 14:11:47 -05:00
Yury Delendik
7a19085159 Moves shared/colorspace.js into core/ 2014-05-23 14:11:47 -05:00
Jonas Jenwald
7079992d89 Merge pull request #4770 from yurydelendik/promise-operationlist
Adds Promises to getOperatorList
2014-05-19 23:22:40 +02:00
Yury Delendik
d8eb8b1de1 Adds Promise to the getOperatorList 2014-05-19 16:19:54 -05:00
Jonas Jenwald
a984fe5b55 Add more unit tests for the API 2014-05-18 23:35:29 +02:00
Christian Krebs
3e7bcaa892 Handle nested post script arguments in the preprocessor
Fix for issue #4785
2014-05-15 19:49:43 +02:00
Yury Delendik
179f4231e6 Merge pull request #4795 from Snuffleupagus/getData-unittest
Add unit test for getData
2014-05-14 06:55:40 -05:00
Jonas Jenwald
3adab8b183 Fix unit test for getDestinations 2014-05-14 12:54:18 +02:00
Jonas Jenwald
e00b986bd3 Add unit test for getData 2014-05-14 11:57:48 +02:00
Michał Gołębiowski
e625af3fef Remove type="text/javascript" from script tags.
"text/javascript" is not a correct MIME type (the correct one is
"application/javascript") but it's not even needed; all browsers default
to the correct type and treat it as executable JS when type is ommited.
Since not all browsers recognize the "application/javascript" MIME type
the only way to both stay compliant and to support all popular browsers
is to omit the type. It's also shorter this way.
2014-05-13 02:41:01 +02:00
Yury Delendik
a26d28a393 Merge pull request #4683 from yurydelendik/grouppath
Groups path commands into single operation
2014-05-08 22:16:58 -05:00
Tim van der Meij
4caf5b694e Completes unit tests for PostScript evaluator and fixes two bugs in the evaluator itself 2014-05-03 12:18:18 +02:00
Yury Delendik
63d5aae3f6 Groups path commands into single command 2014-04-30 09:09:04 -05:00
Thorben Bochenek
e8f0700bfa Move the colour conversion to jpg.js
Benchmarking shows that this improves performance for the invitation document
from https://github.com/mozilla/pdf.js/issues/3809 by 35%
2014-04-24 15:07:12 +02:00
Yury Delendik
2c6692050b Merge pull request #4640 from yurydelendik/special-powers
Fix special powers add-on for firefox.
2014-04-17 08:06:54 -05:00
Brendan Dahl
70ce3a88a1 Use special powers quit in unit tests. 2014-04-17 07:34:34 -05:00
Tim van der Meij
7a2cb7cddd Fixes lint warning W004 in /test 2014-04-11 00:02:33 +02:00
Yury Delendik
f57c6935d7 Implements WebGL support 2014-04-03 08:36:22 -05:00
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