Commit Graph

6198 Commits

Author SHA1 Message Date
Gregory Jordan
04e2235ce7 Fix singlefile build target 2013-12-28 22:33:29 -05:00
Jonas Jenwald
3d523000b9 Fix thumbnail rotation regression 2013-12-25 23:10:17 +01:00
Jonas Jenwald
4bd9767112 Rename 'Settings' to 'ViewHistory' 2013-12-22 00:07:42 +01:00
Jonas Jenwald
1de3fae840 Merge pull request #4050 from Snuffleupagus/isViewFinished-typo
Fix typo in 'isViewFinished' function name
2013-12-20 09:00:18 -08:00
Jonas Jenwald
31ec36d64f Fix typo in 'isViewFinished' function name 2013-12-20 15:32:16 +01:00
Yury Delendik
cfb4e95521 Merge pull request #4025 from gjuggler/singlefile
Add singlefile build target
2013-12-20 05:44:40 -08:00
Yury Delendik
c0088f50bc Merge pull request #4003 from Snuffleupagus/issue-3999
[JBIG2] Fix getting decodeParms when it's an array
2013-12-19 14:47:45 -08:00
Jonas Jenwald
e6c805490b [JBIG2] Fix getting decodeParms when it's an array 2013-12-19 20:23:58 +01:00
Rob Wu
4ff1d45f16 Add pdf from issue 3885 to tests
Source: https://www.dropbox.com/s/ooqk82fq0gr5p6f/test-min-notext-opt.pdf
2013-12-19 18:38:44 +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
Gregory Jordan
1838ec0427 Add a singlefile target to build one concatenated file 2013-12-19 08:18:47 -07:00
Brendan Dahl
53549411b4 Add verbosity as an api setting. 2013-12-18 13:39:03 -08:00
Brendan Dahl
f2b717c637 Merge pull request #4043 from Snuffleupagus/set-page-cleanup
Small cleanup in 'set page'
2013-12-18 09:51:05 -08:00
Brendan Dahl
81cb24bff5 Merge pull request #3997 from Snuffleupagus/bug-946506
Fix loading of fonts that are not referenced by an object identifier
2013-12-18 09:49:14 -08:00
Jonas Jenwald
e4f799a09c Small cleanup in 'set page' 2013-12-18 03:08:50 +01:00
Brendan Dahl
58407cfa94 Merge pull request #4006 from Rob--W/crx-url-in-pageaction
[CRX] Add a pageAction to omnibox showing PDF URL
2013-12-17 11:33:29 -08:00
Brendan Dahl
738ae57960 Merge pull request #3967 from Snuffleupagus/scrollIntoView-horizontal
Add support for horizontal scrolling in 'scrollIntoView' in ui_utils.js
2013-12-17 11:30:22 -08:00
Jonas Jenwald
183893adbf Merge pull request #4040 from EE/api-typo
Correct a typo in `getJavaScript` function expression name.
2013-12-17 04:29:29 -08:00
J. Ryan Stinnett
ea0ca0f810 Clean up test PDF references 2013-12-16 18:39:17 -06:00
Jonas Jenwald
b1c5ef9ccc Fix loading of fonts that are not referenced by an object identifier 2013-12-17 00:19:31 +01:00
Michał Gołębiowski
ba2bbf0677 Correct a typo in getJavaScript function expression name. 2013-12-16 21:40:43 +01:00
Jonas Jenwald
356ebf25cc Merge pull request #4038 from Rob--W/css-unprefixed-cursor-grab
Add unprefixed "grab" / "grabbing" values for cursor
2013-12-16 10:42:51 -08:00
Rob Wu
364676823b Add unprefixed grab/grabbing cursor
Unprefixed "grab" / "grabbing" values of cursor will land in Firefox 27
 (https://bugzilla.mozilla.org/show_bug.cgi?id=880672)
 (https://github.com/Rob--W/grab-to-pan.js/commit/fda961a3)
2013-12-16 19:01:59 +01:00
Rob Wu
8526d3c600 [CRX] Add a pageAction to omnibox showing PDF URL
In Chromium extensions, the viewer's URL looks like this:
chrome-extension://oemmndcbldboiebfnladdacbdfmadadm/http://example.com/file.pdf

Furthermore, the PDF Viewer itself can also add something to the reference fragment:
chrome-extension://oemmndcbldboiebfnladdacbdfmadadm/http://example.com/file.pdf#page=2

Consequently, it is difficult to copy a clean URL (e.g. for sharing over mail)
without having to tidy-up the URL manually.

This commit solves this issue by adding a button to the omnibox,
which shows the clean PDF URL on click.
2013-12-16 19:00:32 +01:00
Jonas Jenwald
ed235b9199 Merge pull request #4037 from Haebaru/master
Update ja locale
2013-12-16 02:56:33 -08:00
haebaru
3196bb4f72 Update ja locale 2013-12-16 16:25:57 +09:00
Jonas Jenwald
694b3d55b1 Fix setScale regression that affects exiting Presentation Mode on narrow window widths 2013-12-14 23:09:36 +01:00
Tim van der Meij
3923b0e677 Merge pull request #4033 from timvandermeij/typo-fix
Fix typo in viewer.css
2013-12-14 14:03:54 -08:00
Tim van der Meij
b1e5c7e068 Fix typo in viewer.css 2013-12-14 23:01:49 +01:00
Tim van der Meij
39c93736a6 Merge pull request #4032 from moztw/1214-zhtw-v2
Update zh-TW again based on latest strings.
2013-12-14 04:11:43 -08:00
Peter Pin-Guang Chen
9b5bf9265d Update zh-TW strings again. Pulled from latest mozilla-aurora 2013-12-14 19:58:05 +08:00
Jonas Jenwald
58807ec860 Merge pull request #4024 from lpy/l10n-zh_cn
Update viewer.properties in l10n for zh-CN
2013-12-12 05:09:07 -08:00
lpy
5e744029ff Update viewer.propertiesin l10n for zh-CN 2013-12-12 20:53:05 +08:00
Brendan Dahl
d6277419a7 Merge pull request #4020 from jwatt/master
Prevent the page number field from having a spinner (spin buttons) in mozilla now that mozilla supports <input type=number>
2013-12-10 10:57:18 -08:00
Jonathan Watt
3eaa421c74 Prevent the page number field from having a spinner (spin buttons) in mozilla now that it supports <input type=number> 2013-12-10 15:15:22 +00:00
Jonas Jenwald
0e60d5bc30 Merge pull request #4018 from fkaelberer/l10nUpdatesDE
Update L10n for DE
2013-12-10 01:32:44 -08:00
fkaelberer
142ace0180 Comments:
Line 56-58: "Gegen den Uhrzeigersinn" is shorter and more common than "Entgegen dem Uhrzeigersinn" (http://de.wikipedia.org/wiki/Drehrichtung)

Line 60-63: "Hand-Werkzeug" is also used in Acrobat

Line 124,133,..: "PDF" is not a noun. Acrobat, Wikipedia use "PDF-Datei" (="PDF file") instead of "PDF".
The English translation sounds just as bad: "An error occurred while loading the PDF.", "The PDF is not fully loaded for printing."
2013-12-10 09:43:20 +01:00
Jonas Jenwald
33100620dd Merge pull request #4013 from xavier114fch/zh-TW
Hand tool translations for zh-TW
2013-12-09 01:40:28 -08:00
Xavier fung
950cfd93e4 Hand tool translations for zh-TW 2013-12-09 10:04:18 +08:00
Tim van der Meij
88ec2bd1ac Merge pull request #4008 from Snuffleupagus/hand-tool-l10n-sv
Add hand tool strings to the Swedish l10n
2013-12-07 05:30:55 -08:00
Jonas Jenwald
6cbd6833ba Add hand tool strings to the Swedish l10n 2013-12-07 14:19:30 +01:00
Tim van der Meij
debde3032c Merge pull request #4007 from timvandermeij/hand-tool-nl
Dutch translations for the hand tool
2013-12-07 04:53:08 -08:00
Tim van der Meij
9862dec250 Dutch translations for the hand tool 2013-12-07 13:50:53 +01:00
Brendan Dahl
1b54530b81 Merge pull request #3684 from Rob--W/hand-tool
Implement hand tool
2013-12-06 18:20:40 -08:00
Brendan Dahl
d3b5aa3236 Merge pull request #3996 from Hengjie/master
Fix Blob creation in Safari 7.0
2013-12-05 10:59:48 -08:00
Hengjie
b96811df25 Fix Blob creation in Safari 7.0.
It should be !== ‘undefined’ to avoid matching everything that Blob can be a type of
2013-12-06 02:10:41 +13:00
Jonas Jenwald
736c570231 Add support for horizontal scrolling in 'scrollIntoView' in ui_utils.js 2013-12-03 19:55:35 +01:00
Yury Delendik
1d276b0396 Merge pull request #3941 from Snuffleupagus/search-from-current-page
Begin searching from current page
2013-12-03 08:53:16 -08:00
Rob Wu
3914768085 Implement hand tool
The logic for the hand tool is implemented in a separate project,
maintained at https://github.com/Rob--W/grab-to-pan.js

Integration notes
- Added toggle as an entry under the Secondary toolbar
- Added shortcut "h" to toggle hand tool (to-do: document this in wiki
  after merge). This shortcut is also used in Adobe's Acrobat Reader.

To-do: localizations for:
hand_tool_enable.title=
hand_tool_enable_label=
hand_tool_disable.title=
hand_tool_disable_label=

To-do (wish): persistence of hand tool preference, preferably a global setting.

secondaryToolbarButton-handTool.png created by Stephen Horlander <shorlander@mozilla.com>
2013-12-03 15:51:41 +01:00
Yury Delendik
f0c830dba2 Merge pull request #3978 from brendandahl/wait-for-render
Wait for one page to render before fetching all pages.
2013-12-03 06:48:17 -08:00