Fabian Lange
532d7246ea
add object id to streams to prevent infinite loops.
...
fixes http://bugzil.la/1020858
11 years ago
Jonas Jenwald
26bbcedcae
Prevent infinite loop when scanning for endstream (bug 1020226)
11 years ago
Fabian Lange
22a0e7fe65
Optimization for FlateStream_getCode, making more pdfs parsable.
...
This commit cleans up the FlateStream_getCode method, and removes a few error
conditions.
Previously it would fail if the codeSize is less than maxLen if end of stream
is reached. However in the document linked below there is a sub-stream
(the one starting at pos 337) which has maxLen set to 11, but actually
contains only 10. After breaking the sanity check still applies, and in this
case passes validating codeSize(10)==codeLen(10).
http://www.cafeculture.com/wp-content/uploads/2014/03/V-CM-BR-086-04002-1346-0258-GP-Brazil-Fazenda-Cafe-Cambara-Terra-Preta-Microlot-Sample-0460-13-Pulped-Natural-60Kg.pdf
11 years ago
Fabian Lange
030a188af7
Deleted unused variables in jpgjs buildComponentData.
11 years ago
Fabian Lange
0a42edf82f
Optimize JPG.js receiveAndExtend for 1 bit case.
...
Profiling showed that receiveAndExtend is frequently called with the length of
one bit. This happens for example in decodeBaseline.
For a single bit, the loop and shift in receive, as well as the shifts in
receiveAndExtend are overhead.
This shortcut manually calculates the shifts by either returning 1 or -1 from
receiveAndExtend by reading the bit and deciding on the return value.
While it comes with an overhead for each non-one length, the speedup is at about
10% in the hot parse/decode path.
11 years ago
Yury Delendik
6b411b559d
Fixes masked JPEG image
11 years ago
Yury Delendik
b20b404061
Fixes typo in getAsync
11 years ago
Fabian Lange
dcde59fa76
Optimized loops in JPG conversion.
...
This change makes the 4 conversion loops look the same.
It optimizes access of the array length and access of the property
numComponents, which is known to be constant.
11 years ago
Yury Delendik
6235e3a61c
Adds color components decoding to the JPEG
11 years ago
Jonas Jenwald
d1c71ab7ad
Prevent adding undefined array entries to CMap.map in mapRangeToArray (issue 4875)
11 years ago
Yury Delendik
a09aecb24a
Fixes murmurhash for old webkit.
11 years ago
Yury Delendik
9c87fa24f7
Removes mozResponseArrayBuffer
11 years ago
Mohammed Abu-alsaad
e6546642db
Added more preference variables from the available hash parameters
11 years ago
Tim van der Meij
e128bdc397
Fixes unhandled XObject subtype PS error
11 years ago
Jonas Jenwald
3c5dedf60d
Prevent font error when no preferred cmap table is found (workaround for issue 4800)
11 years ago
koderok
81d3f4a89b
merged with earlier commits
11 years ago
Yury Delendik
fcc4dfd9b5
Moves shared/function.js to core/
11 years ago
Yury Delendik
7a19085159
Moves shared/colorspace.js into core/
11 years ago
Yury Delendik
542c9c4c7a
Moves ColorSpace logic into evaluator
11 years ago
Yury Delendik
d53dc2e7d6
Refactors showText: split type3, remove showSpacedText
11 years ago
fkaelberer
f88118dbf9
small optimizations in parser.getObj(), lexer.getObj()
11 years ago
Samuel Chantaraud
37c3641fad
Added Promise.catch
...
Fixed Promise so it rejects on uncaught exception
Catch possible rejection on ViewHistory.setMultiple
11 years ago
Yury Delendik
f4baea900e
Fixes regression in the cleanup
11 years ago
p01
455c6b2d35
Removed several 'in' operators in canvas.js
...
This gives up to 6x speed improvement on these methods
11 years ago
p01
cf5ff3d327
Fewer lookups in CanvasGraphics_constructPath
11 years ago
p01
7b68737baa
Strict isEOF / ~22% faster on issue2813, from 16.5s to 13.5s
11 years ago
Yury Delendik
e5a0d89da9
Refactors loadFont for translateFont be async; fixes type3 dup data
11 years ago
Yury Delendik
88aa396aca
Terminate getOperationList and getTextContent every 20 ms
11 years ago
Yury Delendik
d8eb8b1de1
Adds Promise to the getOperatorList
11 years ago
Jonas Jenwald
a984fe5b55
Add more unit tests for the API
11 years ago
Jonas Jenwald
3e1db41ddd
Fix loading of fonts with empty font files (bug 866395 and issue 3522)
11 years ago
Jonas Jenwald
ea0453f106
Add isEmpty method to Stream, DecodeStream and ChunkedStream
11 years ago
Christian Krebs
3e7bcaa892
Handle nested post script arguments in the preprocessor
...
Fix for issue #4785
11 years ago
p01
330b99f428
Optimized stream.js / 9-10x faster DecodeStream_ensureBuffer
11 years ago
p01
8cfd024e48
Optimized colorspace.js AlternateCS_getRgbBuffer
11 years ago
p01
95fda4fcdc
Optimized function.js / 2x Faster PDFFunction_constructPostScriptFromIR
11 years ago
Jonas Jenwald
c68ffcf978
Check if the Names dictionary actually contains a Dests dictionary before attempting to get the destinations
11 years ago
Jonas Jenwald
c4d4682924
Fix regression that prevents downloading the PDF file (PR 4752)
11 years ago
Jonas Jenwald
b907e15a90
Build paths for glyph accents when drawing text as curves
11 years ago
fkaelberer
8c38c2cbe3
Simplify Jbig2Image.decodeInteger()
11 years ago
Jonas Jenwald
67a3b59864
Handle more cases of invalid line dash patterns in annotation borders
11 years ago
Yury Delendik
c5eb058b09
Uses rAF to interrupt the operator list execution
11 years ago
Tim van der Meij
7656408579
Refactoring Util.inherit.getOperatorList in annotation.js
11 years ago
Yury Delendik
cc9643cf32
Refactors GetAnnotationsRequest and GetPageRequest
11 years ago
Yury Delendik
2008f74185
Refactors MessageHandler.send to remove callbacks
11 years ago
Jonas Jenwald
652dde48da
Fix typo when rejecting Promise in getPage
11 years ago
Jonas Jenwald
f3f3db0d15
Remove 'info' and 'metadata' from GetDoc
11 years ago
Jonas Jenwald
069f0cc8c0
Remove 'javaScript' from GetDoc
11 years ago
Jonas Jenwald
4bfcb27d0b
Remove 'outline' from GetDoc
11 years ago
Yury Delendik
95e61ad0e3
Adds pageviewport documentation
11 years ago