Yury Delendik
cc180d7e2b
Removes some bind() calls from fetchAsync
2014-08-05 21:22:12 -05:00
Jonas Jenwald
ee0c0dd8a9
Add strict equalities in src/core/obj.js
2014-08-01 21:56:04 +02:00
Nicholas Nethercote
856e1c600b
Optimize Ref_toString().
...
I have a large PDF where this function is called 1.6 million times
during loading. Minimizing the string concatenations reduces the
cumulative allocations done by Firefox within this function from 113 MB
to 48 MB.
2014-07-24 06:49:56 -07:00
Yury Delendik
84157e039d
Merge pull request #4973 from nnethercote/better-ref-keys
...
Factor out repeated Ref key string generation code.
2014-06-19 21:00:09 -05:00
Nicholas Nethercote
1ad3ffbc7b
Factor out repeated Ref key string generation code.
...
In src/core/obj.js, we convert a Ref to a string to index into a table like
this: 'R1.0'. This conversion is repeated numerous times.
This patch factors out the conversion into a new function.
Ref.prototype.toString().
2014-06-19 18:22:39 -07:00
Yury Delendik
623fa29300
Removes error catch from fetchUncompressed()
2014-06-18 18:30:27 -05:00
Yury Delendik
0cd28ebfa3
Telemetry for used stream and font types
2014-06-16 16:41:04 -05:00
Fabian Lange
532d7246ea
add object id to streams to prevent infinite loops.
...
fixes http://bugzil.la/1020858
2014-06-10 11:29:25 +02:00
Yury Delendik
b20b404061
Fixes typo in getAsync
2014-06-04 11:30:53 -05:00
koderok
81d3f4a89b
merged with earlier commits
2014-05-24 05:37:25 +05:30
Yury Delendik
f4baea900e
Fixes regression in the cleanup
2014-05-20 21:57:04 -05:00
Yury Delendik
e5a0d89da9
Refactors loadFont for translateFont be async; fixes type3 dup data
2014-05-19 16:27:54 -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
Jonas Jenwald
c68ffcf978
Check if the Names dictionary actually contains a Dests dictionary before attempting to get the destinations
2014-05-14 12:43:20 +02:00
Tim van der Meij
6b9aeb34f1
Fixes rendering of PDFs with nested trailer dictionary
2014-05-02 21:01:34 +02:00
Pramodh KP
8616b2ccf3
Remove LegacyPromise from src/core/obj.js
2014-05-01 19:22:47 +05:30
Samuel Chantaraud
25ee0e8572
Preliminary attachments support
...
Added a partial Filespec support
Added getAttachments in API
Added a new attachments view in UI (with a new icon by @shorlander)
2014-04-18 12:11:00 -04:00
Rob Wu
2e97c0d085
Remove some unused variables from src/
...
Only obviously useless, local variables have been removed.
2014-04-15 17:10:23 +02:00
Joshua T Kalis
5828b2c687
Refactor - remove redundant function and all references
...
The function `assertWllFormed` was doing nothing different than `assert` which is
available in the same namespace. Removing it will lighten the filesize - albeit
very slightly - and reduce complexity.
2014-04-13 16:18:07 -04:00
Tim van der Meij
dd3df20a88
Makes PDF files load when xrefEntry is undefined
2014-04-12 12:05:12 +02:00
Tim van der Meij
f463f96f35
Resolving new lint issues
2014-04-11 00:41:18 +02:00
Tim van der Meij
df91acf239
Fixes lint warning W004 in src/core
2014-04-11 00:41:08 +02:00
Christian Krebs
79f34b183c
Treat fonts with the same font descriptor, encoding and unicode map as aliases
...
Different fonts can point to the same font descriptor
(see https://github.com/mozilla/pdf.js/issues/4339 for details). With this
commit such fonts are treated as aliases if they have also the same encoding
and the same toUnicode map. The according info is stored on the font descriptor.
This change must also ensure that aliases use always the same font name
because translated fonts can get cleared depending on the CLEANUP_TIMEOUT setting.
2014-04-08 20:45:21 +02:00
Yury Delendik
31f081ae17
Doesn't traverse cyclic references in Dict.getAll; reduces empty-Dict garbage
2014-03-26 09:07:38 -05:00
Tim van der Meij
284288f1d0
Making src/core/{image,obj,parser}.js adhere to the style guide
2014-03-20 20:28:22 +01:00
Tim van der Meij
026c45e5d1
Start counting from actual beginning of PDF file
2014-03-04 22:16:54 +01: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
Thorben Bochenek
f2f713bf15
Refactor XRef in obj.js
...
- remove unused "if (e instanceof Stream)" in XRef_fetch
- split XRef_fetch into XRef_fetchUncompressed and XRef_fetchCompressed
This explains the actual code flow better
- add line breaks after functions
- change the document to conform to current StyleGuide
2014-02-28 14:00:54 +01:00
Nicholas Nethercote
fdb7c218da
Use a cache to minimize the number of Name objects.
2014-02-27 20:41:03 -08:00
Yury Delendik
754e000907
Fixes and refactors log functionality
2014-01-15 15:28:31 -06:00
Yury Delendik
5bf3e44e30
Introduces LegacyPromise; polyfills DOM Promise
2014-01-03 18:17:05 -06:00
Yury Delendik
98ebf57144
Index objects if Prev xref was not found
2013-11-22 08:49:36 -06:00
Yury Delendik
e712c4136a
Cleaning up fonts when viewer is idle for some time
2013-11-18 13:01:54 -06:00
Brendan Dahl
c2d65fc4ab
Don't traverse all pages to get a single page.
2013-11-13 15:27:46 -08:00
Manas
de179e3d9b
Trying to fix #3611
2013-09-24 22:54:27 +05:30
Yury Delendik
1f232ded90
Stops objects indexing at the end
2013-08-23 13:03:30 -05:00
Brendan Dahl
5ecce4996b
Split files into worker and main thread pieces.
2013-08-12 10:48:06 -07:00