Yury Delendik
a00f854848
Refactors buildImage to use Promise; don't draw bad images
11 years ago
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.
11 years ago
Yury Delendik
65fa25ca36
Fixes number of glyphs in the generated font
11 years ago
Tim van der Meij
dd3df20a88
Makes PDF files load when xrefEntry is undefined
11 years ago
Brendan Dahl
b242826d29
Fix seac regression.
11 years ago
Yury Delendik
88c1747cc3
Heuristics to recognize the unknown glyphs for toUnicode
11 years ago
Tim van der Meij
f463f96f35
Resolving new lint issues
11 years ago
Tim van der Meij
df91acf239
Fixes lint warning W004 in src/core
11 years ago
Yury Delendik
791c9a7b13
Relaxes murmurhash array requirement.
11 years ago
Brendan Dahl
5bd8a83c9b
Build the text layer geometry on the worker.
11 years ago
p01
b77e647f4f
JPX decoder 20-25% speed optimization
11 years ago
Jonas Jenwald
3a9b5b3951
Check that images have valid dimensions (issue 4575)
11 years ago
Jonas Jenwald
811f1b1d05
Workaround for cases where FontName in the FontDescriptor differs from BaseFont in the Font (bug 847420)
11 years ago
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.
11 years ago
Jonas Jenwald
9e6c66be12
Handle 'space' character correctly in WinAnsiEncoding (bug 850854)
11 years ago
Jonas Jenwald
8fc4ebd5cb
Handle 'space' character correctly in MacRomanEncoding (bug 878026)
11 years ago
fkaelberer
2982de8f33
Use Stream instead of byte array access
11 years ago
fkaelberer
1ccc8a64b7
Read color info from JPX stream
...
Fix colors problem #4540 + minor cleanup
fix lint warnings
11 years ago
Yury Delendik
1e8d70af98
Prescales shading pattern packed data indices
11 years ago
fkaelberer
c978c026fa
clean up string conversion functions
11 years ago
Yury Delendik
31f081ae17
Doesn't traverse cyclic references in Dict.getAll; reduces empty-Dict garbage
11 years ago
Manas (prometheansacrifice)
3025445cbe
Fix for #3181 : jbig2 encoding for number of instances greater than 1
11 years ago
Jonas Jenwald
6883362a84
Fix coding style in src/core/stream.js
11 years ago
Jonas Jenwald
67b5c8868c
Fix coding style in src/core/worker.js
11 years ago
Jonas Jenwald
75de115938
Fix coding style in src/core/font_renderer.js
11 years ago
Jonas Jenwald
131a16b65e
Fix coding style in src/core/core.js
11 years ago
Jonas Jenwald
53bbdcb0a1
Fix coding style in src/core/chunked_stream.js
11 years ago
Tim van der Meij
c6a06c0f16
Making src/core/evaluator.js adhere to the style guide
11 years ago
Jonas Jenwald
66e243f506
Fix coding style in src/core/fonts.js
11 years ago
Tim van der Meij
284288f1d0
Making src/core/{image,obj,parser}.js adhere to the style guide
11 years ago
Yury Delendik
20a91bcdbf
Fixes ignoring of the escaped CR LF
11 years ago
Christian Krebs
fc9edfcf76
Introduce paintSolidColorImageMask command to handle 1x1 solid image masks
...
See https://github.com/mozilla/pdf.js/issues/4436 for details
11 years ago
Thorben Bochenek
0fa44d7233
refactor src/core/pdf_manager.js: rename pdfModel to pdfDocument
...
Rename pdfModel to pdfDocument to let the name closer resemble what the
variable actually holds
11 years ago
Thorben Bochenek
8edebc797b
Refactor and fix style of core.js
11 years ago
Thorben Bochenek
1ddb019449
Fix Issue #4461 : Pages without \Resources in their dictionary fail to load
...
When no "\Resource" entry could be found return an empty dictionary
11 years ago
Nicholas Nethercote
292b96a0bf
Make fnArray always be a plain array.
...
This makes the code much simpler, and the extra memory use is tiny -- a vanilla
1000 element array is only 4000 bytes larger than a Uint32Array of the same
size.
11 years ago
Nicholas Nethercote
42d175efd4
Fix some indenting within OperatorList.
11 years ago
Jonas Jenwald
5f021b067c
Prevent infinite loop in CFFParser_parseHeader
11 years ago
Yury Delendik
69efd9cb96
CMaps binary packing
11 years ago
Juraj Sukop
4c2a462a76
Fix copy-paste typo
...
The Compact Font Format Specification defines the Standard String of SID 237 as "twodotenleader", and not "266 ff".
11 years ago
Nicholas Nethercote
6c698519cd
Avoid allocations in executeCommand().
11 years ago
Nicholas Nethercote
3759c11f42
Avoid more allocations in bidi().
11 years ago
Nicholas Nethercote
2e93a0cc98
Avoid allocations in bidi().
11 years ago
Nicholas Nethercote
6a75e45309
Allocate fewer objects when parsing 2 and 4 byte chunks.
...
This is achieved by adding getBytes2() and getBytes4() to streams, and by
changing int16() and int32() to take multiple scalar args instead of an array
arg.
11 years ago
Nicholas Nethercote
0866ad5bff
Add a cache for glyphs.
...
This reduces memory consumption for text heavy documents. I tested five
documents and saw hit rates ranging from 97.4% to 99.8% (most of the misses are
due to |width| varying even when |fontChar| matches). On two of those documents
I saw improvements of 40 and 50 MiB.
The patch also introduces the Glyph constructor, and renames the |unicodeChars|
local variable as |unicode| for consistency with the corresponding Glyph
property.
11 years ago
p01
bd9419f1ef
Micro optimization of ArithmeticDecoder_readBit
11 years ago
p01
2b6cb317db
Optmized decodeRefinement, moving the prediction error outside the inner loop
...
There is no need to slow down the inner loop with a test for ltp as it can only
change if prediction is true in which case it only changes in the outer loop.
11 years ago
p01
840d9d40b6
Reuse the row Uint8Array in JBIG2's decodeBitmap
11 years ago
p01
b2b3836683
Process only once the offset and starting mask JBIG2's drawBitmap
11 years ago
p01
0bca56cbb2
Use changingTemplateX, Y and Bit in JBIG2's decodeBitmap
11 years ago