Jonas Jenwald
75624c8d82
Clear the |getSinglePixelWidth| cache when rendering Type3 fonts (issue 6117)
...
Fixes 6117.
2015-06-17 14:30:32 +02:00
Jonas Jenwald
60fbb5ef69
Ensure that the result of |constructStichedFromIRResult| is a number (issue 6113)
...
Fixes 6113.
2015-06-14 23:29:38 +02:00
Jonas Jenwald
bc5e43b45c
Use the Alternate entry, if it exists, in ICCBased Colour Space dictionaries (issue 5836, issue 5939, issue 6055)
...
Fixes 5836.
Fixes 5939.
Fixes 6055.
2015-06-14 12:10:22 +02:00
Jonas Jenwald
bf20334bea
Merge pull request #6090 from Snuffleupagus/issue-6068
...
Map missing glyphs to the notdef glyph for TrueType (3, 1) fonts (issue 6068)
2015-06-13 00:29:08 +02:00
Yury Delendik
0259448e13
Merge pull request #6091 from Snuffleupagus/bolder-ArialBlack
...
Increase the font weight used for non-embedded ArialBlack fonts
2015-06-12 10:25:53 -05:00
Jonas Jenwald
a64536901a
Increase the font weight used for non-embedded ArialBlack fonts
...
Currently non-embedded ArialBlack fonts are not rendered bold enough, compared to e.g. Adobe Reader.
The issue is that we set the font weight to `bolder`, but since that is actually relative to the font weight of the parent, the result is that there's no practical difference from just using `bold`.
This patch attempts to address that, by explicitly setting the font weight to the maximum value instead (see https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight ).
*Note:* I expect one test "failure" in `issue5801`, which in this case is an improvement, since that PDF file uses ArialBlack.
2015-06-06 21:29:41 +02:00
Jonas Jenwald
5eae3e29c5
Map missing glyphs to the notdef glyph for TrueType (3, 1) fonts (issue 6068)
...
Fixes 6068.
The most notable issue with the font in question is that the `differences` array contains lots of strange entries (of the type `uniXXXX`, instead of proper glyph names).
2015-06-06 18:28:16 +02:00
Jonas Jenwald
6f2f0700b7
Don't map glyphs to certain problematic Thai/Lao Unicode locations (issue 5994)
...
*This patch depends on PR 5990.*
According to https://dxr.mozilla.org/mozilla-central/source/gfx/harfbuzz/src/hb-ot-shape-fallback.cc#38 , certain Thai/Lao characters are treated as special by the font shaping code in Firefox.
Further down in that file, https://dxr.mozilla.org/mozilla-central/source/gfx/harfbuzz/src/hb-ot-shape-fallback.cc#216 , the vertical position of glyphs is modified, which should thus explain why some glyphs end up in the wrong position in the PDF file.
Fixes 5994.
2015-06-05 23:53:22 +02:00
Brendan Dahl
749a60a0b7
Merge pull request #5990 from Snuffleupagus/missing-glyphs-identityUnicode
...
Skip mapping of CIDFontType2 glyphs in fonts with a |IdentityToUnicodeMap|, unless |properties.widths| is defined for the glyph
2015-06-05 14:50:02 -07:00
Jonas Jenwald
64e1fb99fe
Fetch parameters if they are |Ref|s in Pattern color spaces (issue 6081)
...
Fixes 6081.
2015-06-04 22:01:01 +02:00
Yury Delendik
82c5cf6617
Merge pull request #6062 from Snuffleupagus/revert-parse-all-jpegs
...
Revert PR 6024 "[Firefox] Parse all JPEG images in the addon", since it's fixed upstream
2015-06-01 07:43:18 -05:00
Jonas Jenwald
a28ed7c834
Always traverse the entire parent chain in Page_getInheritedPageProp (issue 5954)
...
This enables us to find resources placed on multiple levels of the tree.
Fixes 5954.
2015-05-30 12:21:05 +02:00
Jonas Jenwald
a1743d9952
Revert PR 6024 "[Firefox] Parse all JPEG images in the addon", since it's fixed upstream
2015-05-29 12:58:17 +02:00
Mike Corbin
4c9b65f0e1
Extract correct PDF format version from the catalog
...
The 'Version' field of the most recent document catalog, if present, is
intended to supersede the value in the file prologue.
This is significant for incrementally-built PDF documents and generators that
emit a low version in the prologue and later apply a format version based on
PDF features used, such as Apple's CoreGraphics/Quartz PDF backend.
Fixes the internal version variable, as well as the PDFFormatVersion reported
by the API and consumed by viewers.
2015-05-26 01:56:09 +01:00
Yury Delendik
07af86cf70
Merge pull request #6016 from Snuffleupagus/issue-6010
...
Convert UTF8 encoded passwords to ISO-8859-1 for |R = 6| encryption (issue 6010)
2015-05-18 08:22:47 -05:00
Jonas Jenwald
dd4fc29cbc
[Firefox] Parse all JPEG images in the addon
...
Workaround for:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1164199 .
- https://github.com/mozilla/pdf.js/issues/6017 .
2015-05-15 21:40:34 +02:00
Tim van der Meij
7da9626d16
Merge pull request #5901 from Snuffleupagus/bug-1050040
...
Fall back to the |defaultEncoding| when no valid "post" table is found in TrueType fonts (bug 1050040)
2015-05-15 12:54:04 +02:00
Jonas Jenwald
6fbc5428bd
Skip mapping of CIDFontType2 glyphs in fonts with a |IdentityToUnicodeMap|, unless |properties.widths| is defined for the glyph
...
Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1142033 .
Also fixes issue 5874.
2015-05-14 22:38:04 +02:00
Jonas Jenwald
44240798be
Convert UTF8 encoded passwords to ISO-8859-1 for |R = 6| encryption (issue 6010)
...
For passwords where the encoding already is correct, the conversion is a no-op.
Also, since `encodeURIComponent` might throw, we need to make sure that we handle that case too.
Fixes 6010.
2015-05-14 21:46:31 +02:00
Tim van der Meij
90982332bf
Merge pull request #5995 from CodingFabian/tweak-char-spacing-text-selection
...
Apply char spacing only when there are chars.
2015-05-14 20:06:22 +02:00
Jonas Jenwald
0365baf5ab
Fall back to the |defaultEncoding| when no valid "post" table is found in TrueType fonts (bug 1050040)
...
Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1050040 .
With this patch the file is completely readable, but given that the font is broken enough to be rejected by OTS the rendering differs slightly from Adobe Reader.
*Note:* the PDF file is sufficiently broken that even Adobe Reader complains about the font, *and* also about another more general issue.
2015-05-14 13:16:14 +02:00
Jonas Jenwald
70b839386a
Ensure that the cmap position is within the bounds of the font file in |readCmapTable|
2015-05-14 13:16:09 +02:00
Tim van der Meij
67816bd085
Merge pull request #5999 from hellemar/handle-utf8-in-url
...
Bug 1122280 - Handle UTF-8 encoding in URI
2015-05-14 12:52:40 +02:00
Fabian Lange
c2013094e7
Apply char spacing only when there are chars.
2015-05-13 23:45:20 +02:00
Tim van der Meij
d484ebd492
Merge pull request #5910 from jordan-thoms/fix-concatenated-files
...
Fix error reading concatenated pdfs
2015-05-13 22:40:55 +02:00
Tim van der Meij
b34366d2fc
Merge pull request #5898 from stri8ed/master
...
Extract more accurate glyph heights from type3 fonts
2015-05-13 21:07:17 +02:00
Yury Delendik
dd07ef9c6a
Disables rAF for the printing.
2015-05-12 08:44:42 -05:00
Martin Heller
a61a4b18cc
URL annotations handled as UTF-8 to accommodate some bad PDFs. For proper 7-bit ASCII this makes no difference. Fixes Bug 1122280.
2015-05-11 00:46:59 +02:00
Jonas Jenwald
6d2d854f65
Merge pull request #5815 from Snuffleupagus/type1-diff-refs
...
Ensure that entries in the Differences array of Type1 fonts are either numbers or names
2015-05-07 22:33:23 +02:00
Brendan Dahl
cd53cbe7d4
Merge pull request #5964 from Snuffleupagus/bug-1157493
...
Handle the Encoding being a dictionary in PartialEvaluator_preEvaluateFont (bug 1157493)
2015-05-05 14:41:32 -07:00
Tim van der Meij
0c84899c0a
Revert #5603 regarding Chrome range request bug
2015-04-30 22:37:52 +02:00
Tim van der Meij
6159da0598
Merge pull request #5828 from Rob--W/mozCurrentTransform-fix
...
Fix flaw in mozCurrentTransform polyfill
2015-04-29 19:27:02 +02:00
Jonas Jenwald
760222cf0b
Handle the Encoding being a dictionary in PartialEvaluator_preEvaluateFont (bug 1157493)
...
*This is a regression from PR 4423.*
Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1157493 .
2015-04-25 16:48:14 +02:00
Jonas Jenwald
7c7d05e7a3
Attempt to infer if a CMap file actually contains just a standard Identity-H
/Identity-V
map
2015-04-25 11:28:33 +02:00
Tim van der Meij
48b2f6d023
Merge pull request #5756 from Snuffleupagus/issue-5751
...
Guess CIDFontType0 subtype based on font file contents (issue 5751)
2015-04-24 23:50:07 +02:00
Brendan Dahl
846eb967cc
Merge pull request #5655 from Snuffleupagus/issue-5644
...
Avoid getting stuck in empty nodes in the Pages tree when calling |Catalog_getPageDict| (issue 5644)
2015-04-20 11:46:27 -07:00
Jordan Thoms
d0ea772fc6
Fix error reading concatenated pdfs
2015-04-18 20:56:07 +12:00
Jonas Jenwald
4c2ad3bc7b
Ensure that entries in the Differences array of Type1 fonts are either numbers or names
...
This patch is yet another installment in the (never ending) series of bugs in PDF files with non-embedded fonts.
Fixes http://www.int.washington.edu/talks/WorkShops/int_08_37W/People/Franz_M/Franz.pdf .
2015-04-17 20:32:27 +02:00
Marco Castelluccio
1bd952f897
Use Int32Array instead of Uint32Array in FlateStream
2015-04-17 16:33:04 +02:00
Brendan Dahl
63aaf1b969
Merge pull request #5923 from Snuffleupagus/bug-911034
...
Don't map glyphs to certain problematic General Punctuation Unicode locations (bug 911034)
2015-04-15 14:31:54 -07:00
Thomas Leitner
3ebc85e55f
Crypt filter EFF key should have StmF value as default, not StrF
...
This fixes the problem.
2015-04-13 21:27:32 +02:00
Jonas Jenwald
fda858ae33
Don't map glyphs to certain problematic General Punctuation Unicode locations (bug 911034)
...
Fixes the remaining missing characters in https://bugzilla.mozilla.org/show_bug.cgi?id=911034 .
For reference, see http://www.unicode.org/charts/PDF/U2000.pdf (and also http://en.wikipedia.org/wiki/General_Punctuation_%28Unicode_block%29 ).
2015-04-09 17:27:03 +02:00
Jonas Jenwald
a54ec673c5
Move the checks for problematic Unicode locations from |adjustMapping| to a separate helper function
2015-04-09 12:56:29 +02:00
Levi Melamed
a5159a7942
extract more accurate glpyh heights from type-3 fonts
2015-04-03 08:49:06 -05:00
Andrew Dacenko
bdde3d6622
Restrict logging of errors with verbosity level
2015-03-28 21:44:41 +02:00
Jonas Jenwald
2b1a13ba28
Don't map glyphs to Unicode position 0x0E33, i.e. Thai character SARA AM (bug1046314)
...
*A similar approach as in PR 5705.*
Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1046314 .
According to https://dxr.mozilla.org/mozilla-central/source/gfx/harfbuzz/src/hb-ot-shape-complex-thai.cc#270-365 , `0x0E33` is treated as a special case (by the font shaping code in Firefox). Hence it seems reasonable to skip it when adjusting the font mapping.
2015-03-26 13:22:45 +01:00
Brendan Dahl
3a8d4a7d72
Merge pull request #5713 from Snuffleupagus/evaluator-IdentityToUnicodeMap
...
Create a IdentityToUnicodeMap in evaluator.js when toUnicode contains IdentityH/IdentityV
2015-03-25 10:33:29 -07:00
Brendan Dahl
519b6669f0
Merge pull request #5705 from Snuffleupagus/bug-1108301
...
Don't map glyphs to Unicode "Dotted circle" combining mark (bug 1108301)
2015-03-24 16:33:04 -07:00
Jonas Jenwald
d762cad420
Fix the node getinfo.js example
...
This broke in PR 5366.
2015-03-17 14:26:58 +01:00
Jonas Jenwald
f7b3852dd5
Merge pull request #5843 from timvandermeij/svg-commands
...
Enable OPS.setHScale in the SVG backend
2015-03-16 12:50:07 +01:00
Tim van der Meij
989eac2f1e
Enable OPS.setHScale in the SVG backend
2015-03-16 00:37:31 +01:00
Jonas Jenwald
e894a0a4c6
Guess CIDFontType0 subtype based on font file contents (issue 5751)
2015-03-15 13:35:48 +01:00
Jonas Jenwald
65a5543efe
Disable PresentationMode for certain problematic configurations
...
Instead of trying to hack around various browser defects, let's just disable PresentationMode in the affected browsers. This patch:
- Disables PresentationMode in IE11+ when the viewer is embedded; fixes 4711.
2015-03-13 22:09:36 +01:00
Rob Wu
6eb9e6a6a4
Fix flaw in mozCurrentTransform polyfill
...
Set transformation matrix in (polyfilled) mozPrintCallback when a scale
is applied. Removed _scaleX and _scaleY in favor of _transformMatrix to
emphasize that the caller MUST ensure that the state of the matrix is
correct before `addContextCurrentTransform` is called.
2015-03-11 20:55:26 +01:00
Jonas Jenwald
4a9ff471c4
Correctly detect the presence of the Adobe specific APP14 JPEG marker (bug 1140761)
...
According to the specification, http://partners.adobe.com/public/developer/en/ps/sdk/5116.DCT_Filter.pdf#G3.851943 , the content of the marker segment should begin with `Adobe`, and not `Adobe\x00` as the code currently look for.
Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1140761 .
Fixes the colour conversion part of issues 4090 and 5623.
2015-03-10 13:07:09 +01:00
Tim van der Meij
c69ad5885c
Merge pull request #5770 from Snuffleupagus/opentype-cff
...
Correctly detect OpenType font files with CFF data
2015-03-06 22:58:43 +01:00
Tim van der Meij
5eedfff647
Merge pull request #5734 from Hengjie/lower-space-threshold
...
Lower space factor threshold
2015-03-06 21:00:01 +01:00
Tim van der Meij
026b57641f
Remove unused isNull utility function
2015-02-28 18:50:58 +01:00
Jonas Jenwald
f81fc9091a
Correctly detect OpenType font files with CFF data
...
Fixes 5334.
Fixes 215.
Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1125614 .
According to the specification, http://www.microsoft.com/typography/otspec/otff.htm , OpenType font files with CFF data should have `OTTO` in the header.
2015-02-28 13:43:53 +01:00
Jonas Jenwald
00ee6bd6b6
Merge pull request #5693 from collinanderson/whitespace
...
cleaned whitespace
2015-02-28 10:09:21 +01:00
Yury Delendik
4c2640dcf0
Merge pull request #5758 from mjlyons/ext-link-new-window
...
Add option to open external links in new window
2015-02-27 10:49:39 -06:00
Yury Delendik
2e14cc70cc
Merge pull request #5731 from Snuffleupagus/issue-5331
...
Skip fill bytes (0xFF) when decoding JPEG images (issue 5331)
2015-02-27 06:36:30 -06:00
Yury Delendik
23916b2b14
Merge pull request #5748 from Snuffleupagus/issue-5747
...
Fetch parameters if they are a |Ref| in CalGray/CalRGB color spaces (issue 5747)
2015-02-26 17:44:46 -06:00
Jonas Jenwald
0a3341dadc
Don't map glyphs to Unicode "Dotted circle" combining mark (bug 1108301)
...
It seems that `0x25CC` is another bad spot for charCodes.
Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1108301 .
2015-02-27 00:20:38 +01:00
Mike Lyons
d271811740
Add option to open external links in new window
2015-02-26 13:34:08 -05:00
Jonas Jenwald
888cbe0bde
Avoid getting stuck in empty nodes in the Pages tree when calling |Catalog_getPageDict| (issue 5644)
2015-02-22 17:42:15 +01:00
Jonas Jenwald
7c8996558a
Fetch parameters if they are a |Ref| in CalGray/CalRGB color spaces (issue 5747)
2015-02-20 12:53:02 +01:00
Jonas Jenwald
417800a1b5
Only skip the |!isSymbolicFont| check for TrueType (3, 1) cmap tables if no previous cmap table was found (PR 5703 followup)
...
Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=894572 .
2015-02-19 13:58:03 +01:00
Brendan Dahl
6bb0a483b1
Merge pull request #5703 from Snuffleupagus/issue-5701
...
Relax the |isSymbolicFont| check for TrueType (3, 1) cmap tables (issue 5701)
2015-02-18 14:50:19 -08:00
Collin Anderson
54e984c763
cleaned whitespace
2015-02-17 11:07:37 -05:00
Hengjie
109d67691c
Lower threshold
...
Fixes text selection formatting with https://github.com/vortext/vortext/blob/master/resources/public/examples/TestDocument3.pdf
2015-02-13 22:27:49 -08:00
Jonas Jenwald
3651c9e1f7
Skip fill bytes (0xFF) when decoding JPEG images (issue 5331)
2015-02-14 00:08:43 +01:00
Tim van der Meij
27e3558a41
Fix CCITTStream regression by byte-aligning rows before checking EOL marker
2015-02-13 21:29:00 +01:00
Jonas Jenwald
592890a758
Relax the |isSymbolicFont| check for TrueType (3, 1) cmap tables (issue 5701)
2015-02-13 01:03:10 +01:00
Brendan Dahl
394b38b22f
Merge pull request #5651 from Snuffleupagus/missing-glyphs
...
Try to skip mapping of missing TrueType and CIDFontType2 glyphs
2015-02-11 19:31:22 -08:00
Brendan Dahl
fb8200096b
Merge pull request #5634 from Snuffleupagus/cmap-0,0
...
Add support for TrueType (0, 0) cmap tables (issue 5501, issue 5574, and bug 1037973)
2015-02-11 15:04:03 -08:00
Jonas Jenwald
f19a1db414
Create a IdentityToUnicodeMap in evaluator.js when toUnicode contains IdentityH/IdentityV
...
Currently if a font contains a `toUnicode` entry, we always create a new `ToUnicodeMap` in evaluator.js. This is done even for `IdentityV/IdentityH`, despite to possibility to use the much more compact `IdentityToUnicodeMap` representation.
This patch refactors the `IdentityH/IdentityV` cases, to:
- Avoid calling `IdentityCMap.getMap`, since this prevents allocating and iterating through an array with 65536 elements.
- Ensure that the handling of `toUnicode` is actually correct in fonts.js.
We rely on `toUnicode instanceof IdentityToUnicodeMap` in a few places, and currently this does not work correctly for `IdentityH/IdentityV`.
2015-02-09 16:52:31 +01:00
Jonas Jenwald
01e6565dd4
Try to skip mapping of missing TrueType glyphs
...
Also don't skip mapping of glyphs which are empty, if the corresponding charCode is included in toUnicode.
2015-02-07 12:19:38 +01:00
Jonas Jenwald
8174da61fb
Don't skip mapping of glyphs for CIDFontType2 fonts with a CIDToGIDMap
...
Also don't skip mapping of glyphs which are empty, if the corresponding charCode is included in toUnicode.
2015-02-07 12:19:37 +01:00
Brendan Dahl
cb27707277
Try to skip mapping of missing glyphs.
2015-02-07 12:19:37 +01:00
Jonas Jenwald
bb16475070
Use the |shadow| function from src/shared/util.js in viewer.js
2015-01-31 22:43:30 +01:00
Tim van der Meij
06004d6a92
Make sure that an A entry in an annotation dictionary is also a dictionary itself
2015-01-29 13:21:18 +01:00
fkaelberer
8013100ab8
avoid out of range array access in JBIG2 decoder
2015-01-23 23:50:09 +01:00
Tim van der Meij
465f52e7ce
Merge pull request #5567 from CodingFabian/fixup-5439
...
Add marker segment (PLT, PLM) and refactor TLM
2015-01-15 00:37:23 +01:00
Jonas Jenwald
daba13aebb
Amend the docs for |disableAutoFetch| to mention that streaming must also be disabled
2015-01-14 18:33:12 +01:00
Jonas Jenwald
c2c54257f2
Prevent setting |isStandardFont| to |undefined| for non-embedded fonts
...
This is a very small follow-up to PR 5536, which sets `isStandardFont` to `false` instead of `undefined` (as currently happens for some font names).
Since the patch is so small, I hope it's OK to also fix an unrelated copy-and-paste error in a comment that was added in PR 5260.
2015-01-13 15:44:34 +01:00
Tim van der Meij
95fcbc2325
Merge pull request #5624 from yurydelendik/base64
...
Base64 example and be more flexible what type of data is passed
2015-01-12 23:06:06 +01:00
Yury Delendik
81649b00a9
Base64 example and be more flexible what type of data is passed.
2015-01-12 14:52:52 -06:00
Emanuel Arguinarena
3d01c345a1
Add marker segment (PLT, PLM) and refactor TLM
2015-01-11 22:54:50 +01:00
Jonas Jenwald
ad41a2d574
Add support for TrueType (0, 0) cmap tables (issue 5501 and 5574)
2015-01-11 14:54:12 +01:00
Jonas Jenwald
eac168f3cc
Refactor searching for end of inline (EI) JPEG image streams
...
This patch changes searching for EI image streams to rely on the EOI (end-of-image) marker for DCTDecode filters (i.e. JPEG images).
2015-01-10 23:55:55 +01:00
Jonas Jenwald
6dfc73a5da
Modify |getUint16| to correctly handle missing data in Stream, DecodeStream and ChunkedStream
2015-01-10 23:55:54 +01:00
Jonas Jenwald
35e668079d
Merge pull request #5627 from yurydelendik/tel
...
Whitelists 'tel' schema.
2015-01-10 18:21:36 +01:00
Brendan Dahl
6ceb652abb
Merge pull request #5554 from yurydelendik/apiref
...
Refactors getDocument and adds PDFDataRangeTransport.
2015-01-08 14:24:38 -08:00
Yury Delendik
982accf1d7
Whitelists 'tel' schema.
2015-01-08 09:10:42 -06:00
Yury Delendik
34bed638bb
Merge pull request #5600 from timvandermeij/str-undefined
...
Implement guards for stringToBytes and bytesToString
2015-01-06 16:27:17 -06:00
Yury Delendik
e0f6071178
Merge pull request #5603 from Rob--W/xhr-range-206-bugfix
...
Use Content-Range instead of Content-Length #5512
2015-01-06 07:40:38 -06:00
Rob Wu
c02b2cb37c
Use Content-Range instead of Content-Length #5512
...
Use Content-Range header instead of Content-Length when the
response has status code 206, to work around issue #5512 ,
which is caused by a bug in Chrome (since version 39):
https://code.google.com/p/chromium/issues/detail?id=442318
2015-01-06 14:26:41 +01:00
Yury Delendik
3a61edfcae
Refactors getDocument and adds PDFDataRangeTransport.
2015-01-05 21:45:01 -06:00
Tim van der Meij
6e99c29cf8
Implement guards for stringToBytes and bytesToString
2015-01-02 23:35:51 +01:00
Jonas Jenwald
1fea44ce14
Ensure that |get fingerprint| doesn't fail if the ID is not an array (issue 5599)
...
According to the [PDF specification](http://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/PDF32000_2008.pdf#page=51 ) the `ID` should be an array. To prevent errors if the PDF file violates that part of the spec, check that the `ID` is actually an array.
Fixes 5599.
2014-12-30 16:16:43 +01:00
Tim van der Meij
b835ef425e
CCITTFaxStream: fix regression when EncodedByteAlign is true and EndOfLine is false
2014-12-30 00:07:35 +01:00
Jonas Jenwald
50fe7c8d0a
Merge pull request #5571 from timvandermeij/annotation-rewrite-2
...
Remove unused hasOperatorList code
2014-12-27 12:14:08 +01:00
Jonas Jenwald
406b57fae4
Merge pull request #5569 from timvandermeij/annotation-rewrite-1
...
Remove unused annotation highlight div
2014-12-23 11:17:20 +01:00
Yury Delendik
72bb48b92e
Merge pull request #5566 from MaMazav/Bug_fix_Empty_packet_advance_iterator
...
Fixed empty packet parsing bug
2014-12-22 08:15:41 -06:00
Yury Delendik
96647877ec
Merge pull request #4615 from Snuffleupagus/canvas-enforce-min-line-width
...
Enforce minimum line widths
2014-12-21 22:12:45 -06:00
Tim van der Meij
91aa3925ee
Remove unused hasOperatorList code
2014-12-21 19:33:14 +01:00
Tim van der Meij
c67ad28673
Remove unused annotation highlight div
...
This is now done using CSS. For annotation-heavy documents this change makes the DOM much lighter.
2014-12-21 17:38:22 +01:00
Tim van der Meij
6e994b15e2
Merge pull request #5214 from CodingFabian/optimize-annotation-layer
...
Improves rendering performance of annotation layers.
2014-12-21 16:50:36 +01:00
Fabian Lange
979635138a
Improves rendering performance of annotation layers.
...
This change does the following:
* Address TODO to remove getEmptyContainer helper.
* Not set container bg-color. The old code is incorrect, causing it to
not have any effect. It sets color to an array (item.color) rather
css string. Also in most cases it would set it to black background
which is incorrect.
* only add border instructions when there is actually a border
* reduce memory consumption by not creating new 3 element arrays for
annotation colors. In fact according to spec, this would be incorrect,
as the default should be "transparent" for an empty array. Adobe
Reader interprets a missing color array as black however.
Note that only Link annotations were actually setting a border style and
color. While Text annotations might have calculated a border they did
not color it. This behaviour is now controlled by the boolean flag.
2014-12-20 22:49:58 +01:00
MaMazav
3d8b71175c
Fixed empty packet parsing bug
...
Packet iterator was not advanced for empty packets.
2014-12-20 22:31:28 +02:00
Jonas Jenwald
fc1e2483b4
Enforce minimum line widths
2014-12-20 18:05:55 +01:00
Jonas Jenwald
d8b905048b
Add fallback for non-embedded "Century Gothic" CIDFontType2 font (issue 4722 and bug 879561)
...
According to practical experiments, falling back to "Helvetica" when we encounter a non-embedded "[Century Gothic](http://en.wikipedia.org/wiki/Century_Gothic )" `CIDFontType2` font seems to work well.
(Also, the section on Wikipedia about "Printer ink usage" *might* provide some anecdotal evidence that Century Gothic is a fairly standard sans-serif font.)
Obviously this patch doesn't make "Century Gothic" fonts render perfectly, as is often the case with non-embedded fonts, but all the text is now legible in the referenced issues.
Fixes 4722.
Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=879561 .
2014-12-18 23:19:34 +01:00
Yury Delendik
a018e933ea
Merge pull request #5446 from CodingFabian/minorImprovementsInCanvasjs
...
minor improvements and code cleanup for canvas.js
2014-12-18 15:05:52 -06:00
Fabian Lange
5405b1c8e4
minor improvements and code cleanup for canvas.js
2014-12-18 21:59:40 +01:00
Yury Delendik
31ae5f2a3d
Merge pull request #5379 from brendandahl/nbsp
...
Don't map glyphs to unicode non breaking space.
2014-12-18 13:38:03 -06:00
Yury Delendik
0c3a8ba657
Merge pull request #5463 from Snuffleupagus/wingdings
...
Add basic support for non-embedded Wingdings fonts
2014-12-18 11:29:37 -06:00
Yury Delendik
c918cc5fa6
Merge pull request #5494 from MaMazav/Issue5418_Progression_Orders
...
Support all progression orders
2014-12-18 10:21:35 -06:00
Yury Delendik
f4fa7aaf19
Merge pull request #5383 from Snuffleupagus/bug-1077808
...
Fix searching for end of inline (EI) images with ASCII85Decode filters (bug 1077808)
2014-12-18 10:03:27 -06:00
Tim van der Meij
ee70aadb56
Merge pull request #5549 from MaMazav/Support_EPH_and_SOP_markers
...
Support EPH and SOP markers.
2014-12-17 22:23:36 +01:00
MaMazav
c7acbfd901
Support EPH and SOP markers.
2014-12-17 12:55:52 +02:00
MaMazav
48ee94e8ed
Added support for all not supported yet progression orders: RPCL, CPRL and PCRL.
2014-12-16 21:45:51 +02:00
Yury Delendik
ee1b1252ff
Merge pull request #5124 from jordan-thoms/improve-fingerprinting
...
Improve fingerprinting of documents
2014-12-15 13:30:14 -06:00
Jonas Jenwald
184880a751
Fix searching for end of inline (EI) images with ASCII85Decode filters (bug 1077808)
...
This patch changes searching for the end of inline image streams to rely on the EOD marker for the filters: ASCII85Decode and ASCIIHexDecode.
2014-12-15 18:48:29 +01:00
Yury Delendik
f5df30f967
Merge pull request #5445 from CodingFabian/fixImageCachingInParser
...
Fixes caching of inline images during parsing.
2014-12-15 10:51:23 -06:00
Yury Delendik
bc27774cfd
Merge pull request #5508 from Snuffleupagus/jpeg-stream-find-soi
...
Refactor searching for the SOI marker of inline JPEG image streams
2014-12-15 09:36:24 -06:00
Jordan Thoms
aa53319c87
Improve fingerprinting of documents
...
Fixes two issues:
- #4456 : The first 100 bytes are often not unique as they can be
filled with standard PDF headers - so we use the first 200 KB instead.
(This may be overkill)
- Some documents we encountered have invalid xref ids, which were
always coming out as ‘0000000000000000’ - so we detect that and use the
MD5 instead.
2014-12-11 12:55:05 +13:00
Jonas Jenwald
96a77e9d6a
Add basic support for non-embedded Wingdings fonts
...
This is a tentative patch that adds *very* basic support for non-embedded Wingdings fonts (a Windows version of Dingbats), by falling back to the ZapfDingbats encoding. Obviously this approach will not work perfectly, but in my opinion it seems to work reasonably well in pratice.
Instead of this very simple patch, another option would be to try and include more complete glyph data for Wingdings, e.g. a Unicode map and glyph widths, similar to what was done for ZapfDingbats.
However there is, in my opinion, one important difference between Wingdings and ZapfDingbats: ZapfDingbats is part of the 14 standard fonts, which in previous versions of the PDF specification was assumed to be available in PDF readers. To improve compatibility with older files, it thus makes sense for us to include data for ZapfDingbats.
However Wingdings has never been a standard font in PDF files, hence PDF files using it *should* thus contain all the necessary font data.
Given the above, I thus believe that it should be OK to fall back to ZapfDingbats for now. If non-embedded Wingdings fonts turns out to be *a lot* more common, then we can revisit this later.
Fixes 4301 completely.
Fixes 4837 almost completely. With this patch the bullets are displayed correctly, but the arrows are not of the correct type.
Fixes `artofwar.pdf`, pages 14 and 15.
2014-12-09 00:28:22 +01:00
Yury Delendik
35474628e3
Merge pull request #5449 from CodingFabian/preferParamsOverArguments
...
Use 3 param method for converting r,g,b into css string.
2014-12-08 15:23:12 -06:00
Yury Delendik
7f24b1d602
Merge pull request #5448 from thejdeep/androidfix
...
Added try/catch #5427
2014-12-08 14:56:27 -06:00
Fabian Lange
ceffeab1de
Use 3 param method for converting r,g,b into css string.
...
This avoids creation of temporary arrays to pass them into the util
method. Also using "arguments" is more expensive then passing in 3
parameters.
2014-12-05 19:25:02 +01:00
Yury Delendik
a3df129e32
Merge pull request #5524 from fkaelberer/increaseSMaskChunkSizeTo1M
...
Increases chunk size in SMask composition to 1M pixels
2014-12-05 08:42:06 -08:00
Yury Delendik
cddb870856
Merge pull request #5523 from CodingFabian/remove-canvas-rounding-luminosity
...
removed rounding of values in composeSMaskLuminosity
2014-12-05 08:40:38 -08:00
Yury Delendik
8a6cc44144
Merge pull request #5507 from palkan/fix-promise-null
...
Fix passing null as onFullfilled (which is broken in Chrome(-ium) 32)
2014-12-05 08:36:46 -08:00
Jonas Jenwald
3e1b5216ac
Refactor searching for the SOI marker of inline JPEG image streams
2014-12-05 17:24:27 +01:00
fkaelberer
7d698a46a9
increase chunk size in SMask composition to 1M pixels
2014-12-03 10:25:53 +01:00
Fabian Lange
b049119d14
removed rounding of values in composeSMaskLuminosity
...
maskData comes out of maskCtx.getImageData, so is 0..255 clamped, and
the used multiplications will not create fractions needing rounding,
neither would addition.
2014-12-02 22:25:54 +01:00
Jonas Jenwald
78d0d269dc
Fallback to the |Dummy| Pattern when we fail to parse a Shading Pattern (issue 5509)
2014-11-30 21:21:45 +01:00
palkan
4764c52b5b
fix passing null as Promise's onFullfilled (which is broken in Chrome 32)
2014-11-25 16:40:27 +04:00
jsundn
2ec7e34541
Fixes typo in webgl.js
2014-11-18 14:31:19 +01:00
Paul Roit
da5c0cf0e2
fixed multi precinct handling in jpx
...
fixes #5475
2014-11-13 09:07:18 +01:00
fkaelberer
5fcf3d37a7
use fewer multiplications in convertYcckToRgb
2014-11-05 15:53:10 +01:00
fkaelberer
ea719ae805
remove null checks that always evaluate to false
2014-11-05 15:19:30 +01:00
Jonas Jenwald
1abad5f290
Fix typed array assignment in the |constructPostScriptFromIRResult| function (issue 5470)
2014-11-04 12:17:27 +01:00
Fabian Lange
970c048d50
fixes caching of inline images during parsing.
...
As described in #5444 , the evaluator will perform identity checking of
paintImageMaskXObjects to decide if it can use
paintImageMaskXObjectRepeat instead of paintImageMaskXObjectGroup.
This can only ever work if the entry is a cache hit. However the
previous caching implementation was doing a lazy caching, which would
only consider a image cache worthy if it is repeated.
Only then the repeated instance would be cached.
As a result of this the sequence of identical images A1 A2 A3 A4 would
be seen as A1 A2 A2 A2 by the evaluator, which prevents using the
"repeat" optimization. Also only the last encountered image is cached,
so A1 B1 A2 B2, would stay A1 B1 A2 B2.
The new implementation drops the "lazy" init of the cache. The threshold
for enabling an image to be cached is rather small, so the potential waste
in storage and adler32 calculation is rather low. It also caches any
eligible image by its adler32.
The two example from above would now be A1 A1 A1 A1 and A1 B1 A1 B1
which not only saves temporary storage, but also prevents computing
identical masks over and over again (which is the main performance impact
of #2618 )
2014-10-28 15:39:41 +01:00
thejdeep
46238c30cf
Fix of pdf not loading on android (issue 5427)
...
Fix for pdf on android not visible
Fix for pdf on android not visible
2014-10-28 00:21:14 +05:30
Yury Delendik
1bf72f3fe8
Merge pull request #5409 from thejdeep/master
...
Black text not visible #5291
2014-10-25 09:21:08 -05:00
thejdeep
39a29cfe03
Fixed text not visible
2014-10-25 07:18:31 +05:30
fkaelberer
141ecfa61f
fix "JPX Out of Packets" Error (issues 4358, 4659, 4814)
2014-10-22 09:53:10 +02:00
Yury Delendik
8bfc4b84cb
Merge pull request #5350 from CodingFabian/issue-5349
...
For JPX decoding only read next packet after checking for byte aligning.
2014-10-21 18:05:32 -05:00