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 .
10 years ago
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.
10 years ago
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.
10 years ago
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.
10 years ago
Jonas Jenwald
70b839386a
Ensure that the cmap position is within the bounds of the font file in |readCmapTable|
10 years ago
Fabian Lange
c2013094e7
Apply char spacing only when there are chars.
10 years ago
Yury Delendik
dd07ef9c6a
Disables rAF for the printing.
10 years ago
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.
10 years ago
Tim van der Meij
0c84899c0a
Revert #5603 regarding Chrome range request bug
10 years ago
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 .
10 years ago
Jonas Jenwald
7c7d05e7a3
Attempt to infer if a CMap file actually contains just a standard `Identity-H`/`Identity-V` map
10 years ago
Jordan Thoms
d0ea772fc6
Fix error reading concatenated pdfs
10 years ago
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 .
10 years ago
Marco Castelluccio
1bd952f897
Use Int32Array instead of Uint32Array in FlateStream
10 years ago
Thomas Leitner
3ebc85e55f
Crypt filter EFF key should have StmF value as default, not StrF
...
This fixes the problem.
10 years ago
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 ).
10 years ago
Jonas Jenwald
a54ec673c5
Move the checks for problematic Unicode locations from |adjustMapping| to a separate helper function
10 years ago
Levi Melamed
a5159a7942
extract more accurate glpyh heights from type-3 fonts
10 years ago
Andrew Dacenko
bdde3d6622
Restrict logging of errors with verbosity level
10 years ago
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.
10 years ago
Jonas Jenwald
d762cad420
Fix the node getinfo.js example
...
This broke in PR 5366.
10 years ago
Tim van der Meij
989eac2f1e
Enable OPS.setHScale in the SVG backend
10 years ago
Jonas Jenwald
e894a0a4c6
Guess CIDFontType0 subtype based on font file contents (issue 5751)
10 years ago
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.
10 years ago
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.
10 years ago
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.
10 years ago
Tim van der Meij
026b57641f
Remove unused isNull utility function
10 years ago
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.
10 years ago
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 .
10 years ago
Mike Lyons
d271811740
Add option to open external links in new window
10 years ago
Jonas Jenwald
888cbe0bde
Avoid getting stuck in empty nodes in the Pages tree when calling |Catalog_getPageDict| (issue 5644)
10 years ago
Jonas Jenwald
7c8996558a
Fetch parameters if they are a |Ref| in CalGray/CalRGB color spaces (issue 5747)
10 years ago
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 .
10 years ago
Collin Anderson
54e984c763
cleaned whitespace
10 years ago
Hengjie
109d67691c
Lower threshold
...
Fixes text selection formatting with https://github.com/vortext/vortext/blob/master/resources/public/examples/TestDocument3.pdf
10 years ago
Jonas Jenwald
3651c9e1f7
Skip fill bytes (0xFF) when decoding JPEG images (issue 5331)
10 years ago
Tim van der Meij
27e3558a41
Fix CCITTStream regression by byte-aligning rows before checking EOL marker
10 years ago
Jonas Jenwald
592890a758
Relax the |isSymbolicFont| check for TrueType (3, 1) cmap tables (issue 5701)
10 years ago
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`.
10 years ago
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.
10 years ago
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.
10 years ago
Brendan Dahl
cb27707277
Try to skip mapping of missing glyphs.
10 years ago
Jonas Jenwald
bb16475070
Use the |shadow| function from src/shared/util.js in viewer.js
10 years ago
Tim van der Meij
06004d6a92
Make sure that an A entry in an annotation dictionary is also a dictionary itself
10 years ago
fkaelberer
8013100ab8
avoid out of range array access in JBIG2 decoder
10 years ago
Jonas Jenwald
daba13aebb
Amend the docs for |disableAutoFetch| to mention that streaming must also be disabled
10 years ago
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.
10 years ago
Yury Delendik
81649b00a9
Base64 example and be more flexible what type of data is passed.
10 years ago
Emanuel Arguinarena
3d01c345a1
Add marker segment (PLT, PLM) and refactor TLM
10 years ago
Jonas Jenwald
ad41a2d574
Add support for TrueType (0, 0) cmap tables (issue 5501 and 5574)
10 years ago