Yury Delendik
ffe42f580a
Merge pull request #4178 from peerlibrary/worker-loader
...
Allow fake worker loader with namespaced bundling of PDF.js
2014-01-23 15:14:07 -08:00
Mitar
9e8c75a7ff
Allow fake worker loader with namespaced bundling of PDF.js.
2014-01-23 14:33:17 -08:00
Tim van der Meij
3c6ac0dad5
Merge pull request #4161 from yurydelendik/smask
...
SMask emulation
2014-01-23 11:49:19 -08:00
Yury Delendik
4054b0c385
SMask emulation
2014-01-23 11:13:32 -06:00
Yury Delendik
5a6862decc
Merge pull request #4164 from Snuffleupagus/bug-957034-followup
...
Only check for line dash pattern when annotation has a visible border (bug 957034 followup)
2014-01-22 08:27:47 -08:00
Rob Wu
b35ced8c9e
RFC 3986-compliant isValidUrl (protocol parsing)
...
To avoid misinterpreting URLs like "/File:wikipedia.png" as a
non-relative URLs.
2014-01-22 15:10:06 +01:00
Rob Wu
3c0b8073be
Try to recover from bad URI value
...
See https://github.com/mozilla/pdf.js/issues/4159
BAD (http://cms.di.unipi.it/files/bbec7791fac20e98127c77531e4031912392156c/testo.pdf )
<< /S /URI /URI /v#2findex.php#2fFile:Logo.png >>
GOOD (http://www.ioi2012.org/wp-content/uploads/2011/12/practice.pdf ):
<< /S /URI /URI (http://127.0.0.1/v/index.php/File:Logo.png >>
The URL should be wrapped in parentheses, but sometimes it isn't.
Consequently, the value is interpreted as a Name (because of the leading "/"),
and the resulting object is `{name: "v/index.php/File:Logo.png" }`. Obviously,
this is not a string, so `url.indexOf` throws an error here.
2014-01-22 15:09:29 +01:00
Jonas Jenwald
46ba8d10b0
Only check for line dash pattern when annotation has a visible border (bug 957034 followup)
2014-01-22 14:04:55 +01:00
Yury Delendik
2c34807fa3
Merge pull request #4149 from timvandermeij/document-properties
...
Document properties
2014-01-21 15:13:16 -08:00
Tim van der Meij
5f7ded4ff6
Document properties
2014-01-22 00:07:07 +01:00
Tim van der Meij
e612da2c3d
Fixes this.reject regression
2014-01-22 00:01:43 +01:00
Brendan Dahl
f18e3e9e0f
Merge pull request #4144 from yurydelendik/api-doc
...
Misc fixes for the API docs
2014-01-21 11:31:16 -08:00
Brendan Dahl
f7e354dfe5
Merge pull request #4139 from nnethercote/RGBA
...
Write color and opacity values directly to the final RGBA array when possible, so as to avoid allocating unnecessary memory.
2014-01-21 11:28:52 -08:00
Yury Delendik
27573ddbad
Minor fixes for the jsdocs and removing unused members.
2014-01-21 13:28:18 -06:00
Jonas Jenwald
575bdd8863
Fix loading of fonts with invalid encoding name entry (bug 859204 and 878112)
2014-01-21 02:03:28 +01:00
Nicholas Nethercote
0685214a77
Don't create the RGB buffer for images that don't need resizing.
2014-01-19 14:21:36 -08:00
Yury Delendik
96fff4cc74
Refactors getTextContent return value
2014-01-17 13:26:00 -06:00
Brendan Dahl
ac91047f6d
Merge pull request #4072 from yurydelendik/check-aa
...
Checks if subpixel-aa enabled before scaling the fonts
2014-01-17 10:45:17 -08:00
Yury Delendik
e7d16ba1a2
Merge pull request #4138 from nnethercote/chunk-ImageData
...
Do createImageData/putImageData in chunks, to save memory.
2014-01-17 08:55:24 -08:00
Yury Delendik
09f8f951c8
Extracts evaluator preprocessor and refactor text extraction
2014-01-17 07:16:52 -06:00
Nicholas Nethercote
c044652320
Remove unneeded srcOffset arguments from createRgbBuffer.
2014-01-16 20:15:37 -08:00
Nicholas Nethercote
3de5d6ad0c
Don't create the opacity buffer for images that lack a mask.
2014-01-16 20:15:37 -08:00
Nicholas Nethercote
4332c2fabe
Do createImageData/putImageData in chunks, to save memory.
2014-01-16 17:20:20 -08:00
Brendan Dahl
455265474a
Merge pull request #4093 from yurydelendik/issue4068
...
Fixes fips regression from #4068
2014-01-16 13:45:10 -08:00
Brendan Dahl
ff66c23e6e
Merge pull request #4089 from yurydelendik/issue3725
...
Takes ascent/descent in account in the text layer
2014-01-16 13:12:04 -08:00
Brendan Dahl
c57fdcceed
Merge pull request #4125 from yurydelendik/issue4111
...
Fixes and refactors log functionality
2014-01-16 10:54:09 -08:00
Brendan Dahl
3b829f4a45
Merge pull request #4103 from yurydelendik/issue3977
...
Introduces disableObjectCreateURL
2014-01-16 10:51:22 -08:00
Yury Delendik
754e000907
Fixes and refactors log functionality
2014-01-15 15:28:31 -06:00
Yury Delendik
ab4f27b272
Merge pull request #4124 from tkristiansen/with-credentials
...
Allow setting xhr.withCredentials
2014-01-15 11:42:41 -08:00
terje.kristiansen
08737375f8
Added withCredentials parameter and passing it to xhr requests
2014-01-15 10:12:40 +01:00
Yury Delendik
7e75a665d2
Checks if subpixel-aa enabled before scaling the fonts
2014-01-14 17:31:23 -06:00
Yury Delendik
1991efe4f0
Fixes type3 glyph compilation for bitpacked mask
2014-01-13 21:21:03 -06:00
Nicholas Nethercote
3f533a1cb0
Use a more compact typed array to pass the image mask from the worker to the main thread.
2014-01-13 20:09:05 -06:00
Yury Delendik
a8c11ad1e5
Introduces disableObjectCreateURL
2014-01-10 16:30:41 -06:00
Jonas Jenwald
7c616502c2
Fix annotation border issue (bug 957034)
2014-01-09 13:44:21 +01:00
Yury Delendik
96eaa15578
Fixes fips regression from #4068
2014-01-08 16:33:22 -06:00
Brendan Dahl
508b00a34f
Merge pull request #4071 from yurydelendik/bug921760
...
Adds glyph mapping for standard fonts
2014-01-08 12:36:54 -08:00
Yury Delendik
0131101275
Takes ascent/descent in account in the text layer
2014-01-08 13:50:52 -06:00
Brendan Dahl
bac4133f21
Merge pull request #4068 from yurydelendik/bug864847
...
Adjusts heuristic for disabling Symbol encoding
2014-01-08 10:48:18 -08:00
Yury Delendik
4d01ff4079
Merge pull request #4062 from kkujala/calgray
...
calgray: fix getRgbBuffer problem
2014-01-07 10:54:09 -08:00
Brendan Dahl
2e7c71c75e
Merge pull request #4011 from Rob--W/issue-3885
...
Set eof to true at the end of a FlateStream
2014-01-07 10:52:37 -08:00
Yury Delendik
5bf3e44e30
Introduces LegacyPromise; polyfills DOM Promise
2014-01-03 18:17:05 -06:00
Yury Delendik
51b958dc2b
Adds glyph mapping for standard fonts
2014-01-03 14:17:50 -06:00
Brendan Dahl
2228343f77
Only trigger warning bar on certain unsupported features.
2014-01-03 09:34:13 -08:00
Yury Delendik
5973d40afe
Adjusts heuristic for disabling Symbol encoding
2014-01-02 18:44:11 -06:00
Yury Delendik
c389451a5b
Merge pull request #4045 from brendandahl/verbosity
...
Add verbosity as an api setting.
2014-01-02 12:25:00 -08:00
Kalervo Kujala
4c040dd955
calgray: fix getRgbBuffer problem
...
This fixes issue 3903.
2014-01-01 23:49:03 +02:00
Yury Delendik
cfb4e95521
Merge pull request #4025 from gjuggler/singlefile
...
Add singlefile build target
2013-12-20 05:44:40 -08:00
Jonas Jenwald
e6c805490b
[JBIG2] Fix getting decodeParms when it's an array
2013-12-19 20:23:58 +01:00
Rob Wu
43847d7ff8
Set eof to true at the end of a FlateStream
...
At the initialization of `Lexer_getObj` (in `parser.js`), there's a loop
that skips whitespace and breaks out whenever EOF is encountered.
(https://github.com/mozilla/pdf.js/blob/88ec2bd1a/src/core/parser.js#L586-L599 )
Whenever the current character is not a whitespace character,
`ch = this.nextChar();` is used to find the next character
(using `return this.currentChar = this.stream.getByte())`).
The aforementioned `getByte` method retrieves the next byte using
(https://github.com/mozilla/pdf.js/blob/88ec2bd1a/src/core/stream.js#L122-L128 )
var pos = this.pos;
while (this.bufferLength <= pos) {
if (this.eof)
return -1;
this.readBlock();
}
return this.buffer[this.pos++];
This piece of code relies on this.eof to detect whether the last character
has been read. When the stream is a `FlateStream`, and the end of the stream
has been reached, then **`this.eof` is not set to `true`**, because this check
is done inside a loop that does not occur when the read block size is zero:
(https://github.com/mozilla/pdf.js/blob/88ec2bd1ac/src/core/stream.js#L511-L517 )
for (var n = bufferLength; n < end; ++n) {
if (typeof (b = bytes[bytesPos++]) == 'undefined') {
this.eof = true;
break;
}
buffer[n] = b;
}
This commit fixes the issue by setting this.eof to true whenever the loop is not
going to run (i.e. when bufferLength === end, i.e. blockLen === 0).
2013-12-19 18:37:39 +01:00