Commit Graph

2298 Commits

Author SHA1 Message Date
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
Fabian Lange
b2d7c285c0 For JPX decoding only read next packet after checking for byte aligning.
This patch makes the image from #5349 appear correctly, the artefacts
for the last packet are fixed in #5426.
This patch also optimizes some "in-checks" and adds a few header parsings.
2014-10-21 22:06:10 +02:00
Yury Delendik
419ba54e58 Merge pull request #5418 from Rob--W/issue-5417-annot-error
Fix error in WidgetAnnotation
2014-10-21 14:27:39 -05:00
fkaelberer
e5477c3156 Simplify nextMissingChunk(), getEndChunk() 2014-10-21 10:24:32 +02:00
Jonas Jenwald
4ac4d49158 Avoid rendering invisible Type3 fonts (issue 5421) 2014-10-18 22:29:21 +02:00
Rob Wu
c889e4e679 Fix error in WidgetAnnotation 2014-10-16 18:08:24 +02:00
Yury Delendik
2d7a34d692 Fixes decoding for CMYK jpegs. 2014-10-15 15:56:29 -05:00
Brendan Dahl
ccd7ae33e4 Merge pull request #5352 from Snuffleupagus/issue-2840
Use |toUnicode| when creating the glyph map for standard CIDFontType2 fonts without embedded font file
2014-10-08 10:09:10 -07:00
Tim van der Meij
aaa1f2cb11 Implemented NameTree.get() using binary search 2014-10-07 00:02:15 +02:00
Tim van der Meij
b215af30d3 Require destinations when they are needed and do not fetch all of them in advance 2014-10-06 22:26:18 +02:00
Brendan Dahl
8a536ac346 Map missing glyphs in encoding to notdef glyph. 2014-10-03 12:11:20 -07:00
Brendan Dahl
2fc5e6a9ad Don't map glyphs to unicode non breaking space. 2014-10-02 10:58:56 -07:00
Yury Delendik
fb6d87c77b Merge pull request #5376 from yurydelendik/fontface3
Adds optional argument to FontFace contructor call.
2014-10-01 18:50:30 -05:00
Yury Delendik
8bec7ea8bd Adds optional argument to FontFace contructor call. 2014-10-01 18:15:23 -05:00
Jonas Jenwald
cb3e5903cb Fix disableAutoFetch regression in the generic viewer
After PR 5263, setting `disableAutoFetch = true` in the generic viewer no longer works correctly, since the entire file loads even with `disableStream = true`.
2014-10-01 20:53:17 +02:00
Rob Wu
d0845df971 Use Font Loading API if available
http://dev.w3.org/csswg/css-font-loading/
2014-09-30 22:18:53 +02:00
Rob Wu
6a230af332 Rename FontFace to FontFaceObject
This name clashes with the FontFace constructor from the Font Loading CSS module:
http://dev.w3.org/csswg/css-font-loading/#font-face-constructor
2014-09-30 19:33:16 +02:00
Jonas Jenwald
df2a4afd36 Use |toUnicode| when creating the glyph map for standard CIDFontType2 fonts without embedded font file 2014-09-27 13:20:04 +02:00
Yury Delendik
744c8e8d7e Merge pull request #5250 from Snuffleupagus/issue-5238
Fix Symbol fonts without font file but with Encoding dictionary (issue 5238)
2014-09-26 15:18:33 -05:00
Brendan Dahl
9c56c6f9f6 Merge pull request #5263 from yurydelendik/stream
Implement streaming using moz-chunk-arraybuffer
2014-09-25 16:40:28 -07:00
Yury Delendik
07a2539867 Replaces (chunk in this.loadedChunks) 2014-09-19 19:05:25 -05:00
Yury Delendik
c3f191a27c Implement streaming using moz-chunk-arraybuffer 2014-09-19 19:05:25 -05:00
Jonas Jenwald
3c759e296a Add support for MMType1 fonts with embedded font files 2014-09-18 16:10:46 +02:00
Jonas Jenwald
b16c973d9d Fix Symbol fonts without font file but with Encoding dictionary (issue 5238) 2014-09-16 21:38:53 +02:00
Yury Delendik
15681adbb9 Merge pull request #5245 from Snuffleupagus/issue-5244
Further amend GlyphMapForStandardFonts (issue 5244)
2014-09-16 10:12:07 -05:00
Yury Delendik
ffb613bbac Merge pull request #5275 from Snuffleupagus/exception-propagation
Fix the exception propagation when rejecting workerReadyCapability
2014-09-16 10:05:34 -05:00
Brendan Dahl
403b7df6e7 Merge pull request #5233 from Snuffleupagus/bug-1057544
Workaround for TrueType fonts with exotic cmap tables (bug 1057544)
2014-09-15 14:47:31 -07:00
Jonas Jenwald
ed5fc43510 Add |UnexpectedResponseException| to fix the exception handling when file loading fails because the server responds with a non 404 status message 2014-09-14 11:52:33 +02:00
Jonas Jenwald
2003d83ea6 Fix loading of inline JPEG images 2014-09-11 16:42:51 +02:00
Jonas Jenwald
d1974eae34 Add peekByte method to Stream, DecodeStream and ChunkedStream 2014-09-11 16:42:41 +02:00
sangm
d716fe438a Fixed typo in core/jpx.js #5227 2014-09-10 22:26:20 -05:00
Jonas Jenwald
7c044bc30d Fetch decodeParams if it's a |Ref| in JBIG2Decode streams 2014-09-09 21:49:35 +02:00
Yury Delendik
aa8d3d98f8 Fetches params in makeFilter 2014-09-09 08:29:31 -05:00
Jonas Jenwald
2701edc7c6 Change getDocumentError in web/viewer.js to use instanceof instead of the exception name 2014-09-08 22:34:25 +02:00
Jonas Jenwald
ca027ebfdb Fix the exception propagation when rejecting workerReadyCapability
Currently when an exception is thrown, we try to reject `workerReadyCapability` with multiple arguments in src/core/api.js. This obviously doesn't work, hence this patch changes that to instead reject with the exception object as is.
In src/core/worker.js the exception is currently (unncessarily) wrapped in an object, so this patch also simplifies that to directly send the exception object instead.
2014-09-08 22:20:41 +02:00
Jonas Jenwald
007d7b2d95 Fix handling of RGBA buffers in CalRGB colorspace (issue 5270) 2014-09-08 12:26:32 +02:00
Jonas Jenwald
7b3f222787 Add |SpecialPUASymbols| map and refactor |mapSpecialUnicodeValues| 2014-09-04 13:41:15 +02:00
Jonas Jenwald
2d5596172c Add more cases to |mapSpecialUnicodeValues| to fix the rendering of various Symbol encoded brackets 2014-09-04 12:40:15 +02:00
Yury Delendik
467b3247b3 Merge pull request #5249 from Rob--W/issue-5243
CCITTFaxStream parser: resolve xref if needed
2014-09-03 17:38:13 -05:00
Jonas Jenwald
4bda6ba1b8 Add basic support for ZapfDingbats 2014-09-03 21:54:04 +02:00
Jonas Jenwald
be595d0721 Further amend GlyphMapForStandardFonts (issue 5244) 2014-09-01 10:51:22 +02:00
Rob Wu
07a4837763 CCITTFaxStream parser: resolve xref if needed
Fixes #5243
2014-08-31 11:03:24 +02:00
Jonas Jenwald
64d95bedaa In src/display/api.js, add documentation for the |progressCallback| parameter in |PDFJS.getDocument| 2014-08-28 14:11:14 +02:00
Jonas Jenwald
cc8710acbf Workaround for TrueType fonts with exotic cmap tables (bug 1057544) 2014-08-23 11:27:41 +02:00
Jonas Jenwald
ae896fc071 Avoid creating intermediate strings in sanitizeMetrics
This patch avoids creating many intermediate strings, when adding dummy width/lsb entries for glyphs where those are missing.
For the relevant PDF files in our test suite, the average number of intermediate strings are well over 1000.
2014-08-20 23:55:57 +02:00
Yury Delendik
6969ed4760 Merge pull request #5204 from nnethercote/needsDecode
Apply the GRAYSCALE_1BPP optimization when `needsDecode` is set.
2014-08-19 07:24:49 -05:00
Jonas Jenwald
0dbac150d5 Merge pull request #5212 from fkaelberer/fixFunctionName
Fix ensureByte() function name (copy-and-paste error)
2014-08-19 12:22:47 +02:00
fkaelberer
a7bbc12a81 Fix ensureByte() function name (copy-and-paste error) 2014-08-19 12:19:22 +02:00
Nicholas Nethercote
48de7651ce Apply the GRAYSCALE_1BPP optimization when needsDecode is set.
The scanned, black-and-white document at
https://bugzilla.mozilla.org/show_bug.cgi?id=835380 doesn't benefit from
the critical GRAYSCALE_1BPP optimization because the optimization is
skipped if `needsDecode` is set.

This change addresses that, and reduces both rendering time and memory
usage for that document by almost 10x.
2014-08-18 16:45:19 -07:00
Yury Delendik
be998261cc Fixes Type3 negative font direction 2014-08-18 17:57:52 -05:00
Nicholas Nethercote
96b9af68dd Remove setGStateForKey() closure.
setGStateForKey() is a closure that serves no particularly useful
purpose. This change inlines it at the single call site. This avoids 1.7
MiB of allocations (because closures are objects) for the MTA map
mentioned in https://bugzilla.mozilla.org/show_bug.cgi?id=835380#c17.
2014-08-17 22:21:45 -07:00
Kalervo Kujala
0c5525dc8a CalRGB: optimize CalRGB calculations
Also fix one silly mistake.
2014-08-16 11:38:15 +03:00
Yury Delendik
90d79d1577 Merge pull request #5198 from timvandermeij/svg-paintformxobject
Implements paintFormXObject in svg.js
2014-08-15 16:29:30 -05:00
Tim van der Meij
32853c07f4 Implements paintFormXObject in svg.js 2014-08-15 23:23:04 +02:00
Yury Delendik
e53a28c996 Merge pull request #5192 from nnethercote/empty-setGState
Ignore setGState no-ops.
2014-08-15 10:20:14 -05:00
Yury Delendik
fa8d385818 Merge pull request #5165 from kkujala/calrgb
implement CalRGB color space
2014-08-15 10:19:49 -05:00
Yury Delendik
5eb6a353d9 Merge pull request #5181 from timvandermeij/svg-optimizations
Optimizes defaults for svg.js
2014-08-15 09:40:41 -05:00
Yury Delendik
9b3c96d5d3 Merge pull request #5186 from Snuffleupagus/fix-CMap-unavailable-error-handling
Fix the error handling for CMaps that fail to load
2014-08-15 08:31:33 -05:00
Yury Delendik
992e7613c1 Merge pull request #5187 from nnethercote/EI-checking
Reduce ASCII checks in makeInlineImage().
2014-08-15 08:29:03 -05:00
Jonas Jenwald
9b480d70eb Merge pull request #5168 from nnethercote/EvaluatorPreprocessor_read
Avoid unnecessary array allocations in EvaluatorPreprocessor_read().
2014-08-15 13:35:05 +02:00
Jonas Jenwald
9d87cbc516 Merge pull request #5191 from nnethercote/getSampleArray-array-length
Right-size the array in getSampleArray().
2014-08-15 11:36:35 +02:00
Nicholas Nethercote
9674abc542 Ignore setGState no-ops.
For the document in #2504, 11% of the ops are `setGState` with a
`gStateObj` that is an empty array, which is a no-op. This is possible
because we ignore various setGState keys (OP, OPM, BG, etc).

This change prevents these ops from being inserted into the operator
list.
2014-08-14 20:46:28 -07:00
Nicholas Nethercote
bcc31b666f Right-size the array in getSampleArray().
This allows the JS engine to do a better job of allocating the right
number of elements for the array, avoiding some resizings. For the PDF
in #2504, this avoids 100s of MiBs of allocations in Firefox.
2014-08-14 18:56:12 -07:00
Nicholas Nethercote
ffae848f4e Reduce ASCII checks in makeInlineImage().
makeInlineImage() has a "are the next five chars ASCII?" check which is
run after an "EI" sequence has been found. This check involves the
creation of a new object because peekBytes() calls subarray().

Unfortunately, the check is currently run on whitespace chars even when
an "EI" sequence has not yet been found, i.e. when it's not needed. For
the PDF in #2618, there are over 820,000 such checks.

This change reworks the relevant loop so that the check is only done
once an "EI" sequence has been seen. This reduces the number of checks
to 157,000, and speeds up rendering by somewhere between 2% and 7% (the
measurements are noisy).
2014-08-14 16:20:58 -07:00
Jonas Jenwald
cd5bd9fb7e Merge pull request #5184 from yurydelendik/cff-width
Use cff glyph width in the hmtx table
2014-08-14 23:40:12 +02:00
Tim van der Meij
1d02ace81f Optimizes defaults for svg.js 2014-08-14 23:14:55 +02:00
Yury Delendik
a2c2f81167 Use cff glyph width in the hmtx table 2014-08-14 16:11:09 -05:00
Kalervo Kujala
1e4a7f981e implement CalRGB color space
Both whitespace and blackspace support are implemented.
2014-08-14 23:49:19 +03:00
Yury Delendik
de23d3791e Fixes image and font embedding 2014-08-14 15:11:27 -05:00
Yury Delendik
0f862e7eb3 Adds svg.js to the generic and singlefile builds 2014-08-14 13:02:30 -05:00
Yury Delendik
bc574aa629 Refactors SVG api 2014-08-14 12:56:11 -05:00
Jonas Jenwald
9ef0d0b878 Fix the error handling for CMaps that fail to load 2014-08-14 16:29:10 +02:00
Yury Delendik
0ad323f621 Adds width at the beginning of the Type2 charstring 2014-08-13 21:15:40 -05:00
pramodhkp
6d53fc4db7 Minor changes for api.js, font_loader.js and svg.js 2014-08-14 01:01:09 +05:30
Tim van der Meij
44fbf0ce14 Miscellaneous code improvements for svg.js 2014-08-13 20:31:21 +02:00
Jonas Jenwald
06b5d97bc6 Remove two instances of leftover console.log debug statements
The `console.log` statement in evaluator_spec.js is obviously not needed. In obj.js it could have been replaced by `info`, but that seemed unnecessary given the already existing `error`.
2014-08-13 14:29:46 +02:00
Jonas Jenwald
c3691500fa Merge pull request #5172 from nnethercote/readCharCode-retval
Avoid an allocation in readCharCode().
2014-08-13 11:03:07 +02:00
Nicholas Nethercote
61e6b576d4 Avoid an allocation in readCharCode().
readCharCode() returns two values, and currently allocates a length-2
array on every call to do so. This change makes it instead us a
passed-in object which can be reused.

This tiny change reduces the total JS allocations done for the document
in Mozilla bug 992125 by 4.2%.
2014-08-12 16:12:58 -07:00
Nicholas Nethercote
7cbd057deb Avoid unnecessary array allocations in EvaluatorPreprocessor_read().
EvaluatorPreprocessor_read() is called in two cases. For the normal
layer, the args array it produces is used beyond the bounds of the loop
in which EvaluatorPreprocessor_read() is called.

But for the text layer, the args array is used in a very short-term
fashion. This change reworks things so that a single array is repeatedly
used for the text layer. This reduces total JS allocations for the
Spoorkaart map by 11%, and has similar effects on many other PDFs.
2014-08-11 16:57:40 -07:00
Brian Ng
5365fa9de7 Fix typo 2014-08-11 11:40:49 -05:00
Yury Delendik
dae92b9cc7 Uses float number formatter to print numbers in SVG 2014-08-11 11:18:32 -05:00
Yury Delendik
ab8270ae3a Fixes searchRange calculation 2014-08-10 14:11:04 -05:00
Yury Delendik
42771159ca Removes stringToArray 2014-08-10 14:11:04 -05:00
Yury Delendik
350556f085 Removes bytesToString/stringToArray conversions in the font.js 2014-08-10 14:11:04 -05:00
Yury Delendik
4ce1b1e987 Merge pull request #5150 from nnethercote/toUnicode
Fix #4935
2014-08-10 14:07:26 -05:00
Tim van der Meij
b6e4ac9070 Nit fixes for svg.js 2014-08-10 14:40:49 +02:00
Yury Delendik
99b08ed223 Merge pull request #5162 from yurydelendik/pramodhkp-fixupgstate2
[SVG] Reduces amount of used memory during PNG creation.
2014-08-09 15:56:11 -05:00
Yury Delendik
56f0539045 Reduces amount of used memory during PNG creation. 2014-08-09 15:53:05 -05:00
pramodhkp
458b69b649 Adds image and mask features, fixes clippath 2014-08-10 01:06:43 +05:30
Yury Delendik
13f1a964a7 Merge pull request #5154 from Rob--W/aes-padding-5152
AES cipher: make padding optional
2014-08-09 09:25:54 -05:00
Jonas Jenwald
66c56ac546 Fixes a regression from PR 4982
After PR 4982, the rendering of the first two pages of http://www.openmagazin.cz/pdf/2011/openMagazin-2011-04.pdf (from issue 215) no longer completes.

The issue is that we cannot have `args === null` in `PartialEvaluator_buildPath`, but *must* use an empty array instead.

In this patch I've also moved the `argsLength` variable definition in `EvaluatorPreprocessor_read`, to make sure that it's always defined.
2014-08-08 13:19:18 +02:00
Rob Wu
58cd3349db AES cipher: make padding optional
Fixes #5152
2014-08-08 12:36:29 +02:00
Nicholas Nethercote
f82977caf9 Simplify isIdentityUnicode detection. 2014-08-08 02:02:42 -07:00
Nicholas Nethercote
6c8cca1284 Add IdentityToUnicodeMap class.
When loading the PDF from issue #4935, this change reduces peak RSS from
~2400 to ~300 MiB, and improves overall speed by ~81%, from 6336 ms to
1222 ms.
2014-08-07 20:45:11 -07:00
Nicholas Nethercote
9576047f0d Add ToUnicodeMap class. 2014-08-07 20:05:24 -07:00
Yury Delendik
669a4d196e Merge pull request #5114 from fkaelberer/fasterJBIG2decodeBitmap
Faster JBIG2 bitmap decoding
2014-08-07 16:14:30 -05:00
Tim van der Meij
238a5f8a30 Fixes CCITTFaxStream regression 2014-08-07 22:07:20 +02:00
Jonas Jenwald
643ad37f2a Revert commit 9a41659 (PR 5005) for breaking the loading of certain PDF files in the Firefox addon when range requests are active 2014-08-07 12:07:45 +02:00
Yury Delendik
57860149e9 Merge pull request #5135 from nnethercote/identity-cmap-proper
Make IdentityCMaps more compact.
2014-08-06 09:11:08 -05:00
Jonas Jenwald
179bb2e136 Merge pull request #5140 from yurydelendik/fetchAsync
Removes some bind() calls from fetchAsync
2014-08-06 12:34:27 +02:00
Yury Delendik
682b93ac9e Fixes lint errors 2014-08-05 21:55:59 -05:00
Yury Delendik
cc180d7e2b Removes some bind() calls from fetchAsync 2014-08-05 21:22:12 -05:00
Yury Delendik
46a9a35ddc Merge pull request #5071 from nnethercote/font-savings
Optimize a font-heavy document
2014-08-05 18:57:46 -05:00
Yury Delendik
fa53fcbf57 Merge pull request #5095 from Snuffleupagus/issue-5070
Adjust the heuristics to recognize more cases of unknown glyphs for |toUnicode| (issue 5070)
2014-08-05 17:41:38 -05:00
Yury Delendik
2b87ff9286 Merge pull request #5008 from nnethercote/better-QueueOpt
Make QueueOptimizer easier to read.
2014-08-05 16:59:26 -05:00
Jonas Jenwald
cb4a847347 Merge pull request #5134 from yurydelendik/fun4
Improves speed of the functions
2014-08-05 23:51:03 +02:00
Yury Delendik
12b50486de Merge pull request #5136 from timvandermeij/ccitt-lines
Properly set this.eof in CCITTFaxStream
2014-08-05 12:49:50 -05:00
Tim van der Meij
5cc7d23066 Properly set this.eof in CCITTFaxStream 2014-08-05 19:08:00 +02:00
fkaelberer
5b83e0b9a3 Faster JBIG2 bitmap decoding 2014-08-05 16:12:45 +02:00
Nicholas Nethercote
51055e5836 Make IdentityCMaps more compact.
IdentityCMap uses an array to represent a 16-bit unsigned identity
function. This is very space-inefficient, and some files cause multiple
IdentityCMaps to be instantiated (e.g. the one from #4580 has 74).

This patch make the representation implicit.

When loading the PDF from issue #4580, this change reduces peak RSS from
~370 to ~280 MiB. It also improves overall speed on that PDF by ~30%,
going from 522 ms to 366 ms.
2014-08-05 03:01:39 -07:00
Yury Delendik
6865c284a7 Merge pull request #5111 from nnethercote/better-cidchars
Represent cid chars using integers, not strings.
2014-08-04 22:26:55 -05:00
Yury Delendik
f750e35224 Optimizes functions to not create arrays 2014-08-04 11:23:11 -05:00
Yury Delendik
cb81bd6be6 Compiles some of the FunctionType 4 2014-08-04 11:21:31 -05:00
Jonas Jenwald
8ecbb4da05 Adjust the heuristics to recognize more cases of unknown glyphs for |toUnicode| (issue 5070) 2014-08-03 21:18:23 +02:00
Jonas Jenwald
b918df3547 Re-factor heuristics to recognize unknown glyphs for |toUnicode| 2014-08-03 21:12:36 +02:00
Jonas Jenwald
4b54d6fd43 Add strict equalities in src/core/stream.js 2014-08-02 17:59:14 +02:00
Jonas Jenwald
7fa204c805 Add strict equalities in src/core/parser.js 2014-08-02 17:37:24 +02:00
Tim van der Meij
cb59b5772b Merge pull request #5120 from Snuffleupagus/strict-equalities-src-core-2
Add strict equalities in src/core/* (part 2)
2014-08-02 13:51:14 +02:00
Tim van der Meij
4899e9e54f Use strict equalities in src/core/jbig2.js 2014-08-01 23:02:57 +02:00
Tim van der Meij
5d0fde4a2c Use strict equalities in src/core/jpx.js 2014-08-01 23:02:57 +02:00
Tim van der Meij
2796d1bf10 Use strict equalities in src/core/jpg.js 2014-08-01 23:02:56 +02:00
Tim van der Meij
160c7cab33 Use strict equalities in src/core/image.js 2014-08-01 23:02:55 +02:00
Jonas Jenwald
fb9fea2f36 Add strict equalities in src/core/worker.js 2014-08-01 22:17:47 +02:00
Jonas Jenwald
c9fb3e1b6d Add strict equalities in src/core/ps_parser.js 2014-08-01 22:02:10 +02:00
Jonas Jenwald
ee371fe6b2 Add strict equalities in src/core/pattern.js 2014-08-01 21:56:04 +02:00
Jonas Jenwald
ee0c0dd8a9 Add strict equalities in src/core/obj.js 2014-08-01 21:56:04 +02:00
Jonas Jenwald
a154ca2dd3 Add strict equalities in src/core/murmurhash3.js 2014-08-01 21:56:04 +02:00
Jonas Jenwald
8f5894d81a Add strict equalities in src/core/function.js 2014-08-01 21:56:03 +02:00
Jonas Jenwald
97b3eadbc4 Add strict equalities in src/core/fonts.js 2014-08-01 21:56:03 +02:00
Tim van der Meij
00eea3ddb9 Merge pull request #5116 from Snuffleupagus/strict-equalities-src-core
Add strict equalities in src/core/* (part 1)
2014-08-01 21:50:05 +02:00
Tim van der Meij
df0b821141 Merge pull request #5113 from Snuffleupagus/strict-equalities-src-display
Add strict equalities in src/display/*
2014-08-01 20:51:18 +02:00
Tim van der Meij
0b8b763eda Merge pull request #5112 from Snuffleupagus/strict-equalities-src-shared
Add strict equalities in src/shared/*
2014-08-01 20:00:57 +02:00
Jonas Jenwald
87038e44cd Add strict equalities in src/core/evaluator.js 2014-08-01 18:40:10 +02:00
Jonas Jenwald
83a4c68df9 Add strict equalities in src/core/core.js 2014-08-01 18:40:10 +02:00
Jonas Jenwald
0012b8803c Add strict equalities in src/core/colorspace.js 2014-08-01 18:40:09 +02:00
Jonas Jenwald
84503c656d Add strict equalities in src/core/bidi.js 2014-08-01 18:39:46 +02:00
Jonas Jenwald
2162a19ed9 Add strict equalities in src/core/arithmetic_decoder.js 2014-08-01 18:39:46 +02:00
Jonas Jenwald
9cb09324d2 Add strict equalities in src/core/annotation.js 2014-08-01 18:39:45 +02:00
Jonas Jenwald
4a82dac45b Add strict equalities in src/display/svg.js 2014-08-01 12:41:03 +02:00
Jonas Jenwald
790ec92a34 Add strict equalities in src/display/pattern_helper.js 2014-08-01 12:40:38 +02:00
Jonas Jenwald
ec6ec13506 Add strict equalities in src/display/metadata.js 2014-08-01 12:40:16 +02:00
Jonas Jenwald
c1f1f2f0e1 Add strict equalities in src/display/canvas.js 2014-08-01 12:39:56 +02:00
Jonas Jenwald
a4b06d7a02 Add strict equalities in src/display/api.js 2014-08-01 12:39:31 +02:00
Jonas Jenwald
ccd71e0a94 Add strict equalities in src/shared/util.js 2014-08-01 12:18:40 +02:00
Jonas Jenwald
42e541a671 Add strict equalities in src/shared/fonts_utils.js 2014-08-01 12:18:35 +02:00
Nicholas Nethercote
adf58ed687 Represent cid chars using integers, not strings.
cid chars are 16-bit unsigned integers. Currently we convert them to
single-char strings when inserting them into the CMap, and then convert
them back to integers when extracting them from the CMap. This patch
changes CMap so that cid chars stay in integer format throughout, saving
both time and space.

When loading the PDF from issue #4580, this change reduces peak RSS from
~600 to ~370 MiB. It also improves overall speed on that PDF by ~26%,
going from 724 ms to 533 ms.
2014-08-01 02:35:17 -07:00
fkaelberer
c03cf20d37 Fix JBIG2 decoding issue #5026 2014-08-01 09:02:25 +02:00
Yury Delendik
ad2ea78280 Merge pull request #5101 from nnethercote/CMap-forEach
Avoid expensive for..in loops involving CMaps
2014-07-31 23:03:25 -05:00
Nicholas Nethercote
28687bca75 Optimize CMap.prototype.forEach().
This change avoids the element stringification caused by for..in for the
vast majority of CMaps.

When loading the PDF from issue #4580, this change reduces peak RSS from ~650
to ~600 MiB, and improves overall speed by ~20%, from 902 ms to 713 ms.  Other
CMap-heavy documents will also see improvements.
2014-07-30 06:28:47 -07:00
Nicholas Nethercote
b86daed29d Make CMap.map quasi-private.
This makes it easier for the representation to be improved.
2014-07-30 06:26:35 -07:00
Yury Delendik
7026543663 Merge pull request #5059 from timvandermeij/unused-code
Removing unused code and enforcing additional JSHint options
2014-07-29 15:04:43 -05:00
Jonas Jenwald
2264748109 Merge pull request #5096 from nnethercote/bidi-length
Right-size |chars.length| and |type.length| in bidi().
2014-07-29 12:19:22 +02:00
Nicholas Nethercote
f1d5ec407e Right-size |chars.length| and |type.length| in bidi().
This lets the JS engine resize the array elements buffer immediately,
thus avoiding some intermediate resizings. This can save multiple MiBs
of reallocation in text-heavy files.
2014-07-28 16:35:45 -07:00
Yury Delendik
6038ee7cff Merge pull request #5063 from Snuffleupagus/ps-parser-avoid-intermediate-string-creation
Avoid creating intermediate strings in the PostScriptLexer
2014-07-28 15:07:32 -05:00
Jonas Jenwald
4960af3a4c Avoid creating intermediate strings in the PostScriptLexer 2014-07-27 13:51:28 +02:00
Jonas Jenwald
a5c98aab36 Re-factor parsing of the Linearization dictionary 2014-07-27 12:56:09 +02:00
Jonas Jenwald
86f9503876 Remove src/core/cidmaps.js 2014-07-25 21:53:17 +02:00
Jonas Jenwald
c3c72948b9 Stop including cidmaps.js
In b5b94a4af3, i.e. PR #4259, we stopped using cidmaps.js. Despite that, it's still included when PDF.js is built. At almost 0.5 MB (and approx. 7000 lines), this is currently the single largest file in the codebase.
Including such a large file in the builds, when it is not actually used, seems extremely wasteful; hence this patch.
2014-07-25 21:53:09 +02:00
Yury Delendik
1e21bac9d3 Merge pull request #5077 from Snuffleupagus/issue-5039
Fix loading of PDF files with invalid or missing Type3 characters (issue 5039)
2014-07-25 14:34:51 -05:00
Tim van der Meij
62e6265fb3 Merge pull request #5074 from nnethercote/readPostScriptTable-join
Use Array.join to build up strings in readPostScriptTable().
2014-07-25 21:26:54 +02:00
Yury Delendik
5d4eebc6a7 Merge pull request #5034 from pramodhkp/fixupgstate2
[SVG] Adds clip operator, fixes setGState, fill, stroke operators
2014-07-25 13:52:29 -05:00
pramodhkp
6e4dd83a4d Added endPath, endText. fixes extra <g> elements 2014-07-25 23:30:29 +05:30
pramodhkp
2380b38b27 Fixed setGState, viewport transform 2014-07-25 23:21:23 +05:30
pramodhkp
a55c9856e9 Misc variable initialization 2014-07-25 23:21:23 +05:30
pramodhkp
0688fd3d70 Added fill, stroke, line-join & font attr 2014-07-25 23:20:55 +05:30
pramodhkp
03f1de3403 Added clip operator 2014-07-25 23:13:52 +05:30
Yury Delendik
2aea7d7047 Merge pull request #5078 from nnethercote/Ref-toString
Optimize Ref_toString().
2014-07-25 10:10:10 -05:00
Nicholas Nethercote
1039791472 Use Array.join to build up strings in readPostScriptTable().
This avoids about 5 MiB of string allocations on one test case.
2014-07-24 16:12:08 -07:00
Tim van der Meij
41faa78368 Fixes typo in promises implementation for legacy browsers 2014-07-24 17:11:22 +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