Commit Graph

5811 Commits

Author SHA1 Message Date
Tim van der Meij
33a9696518 Merge pull request #3796 from brendandahl/global-docs
Add missing jsdocs for PDFJS globals.
2013-10-16 03:04:03 -07:00
Tim van der Meij
2726a0be96 Merge pull request #3787 from Snuffleupagus/inline-setScale
Inline setScale in parseScale
2013-10-16 02:18:02 -07:00
fkaelberer
f6841d1720 extract code to own method for faster JPX decoding 2013-10-16 09:47:03 +02:00
Jonas Jenwald
1f4d85db37 Inline setScale in parseScale 2013-10-16 00:26:42 +02:00
Jonas Jenwald
fb52144cfb Enable links beginning with 'www.' even if no protocol is specified 2013-10-16 00:12:23 +02:00
Brendan Dahl
7ebec6c5a4 Add missing jsdocs for PDFJS globals. 2013-10-15 13:41:49 -07:00
Tim van der Meij
7ad19c3355 Merge pull request #3807 from Rob--W/crx-chromium-25
chrome.runtime -> chrome.extension when needed (support Chromium 20-25)
2013-10-14 14:00:33 -07:00
Rob Wu
820b95416b chrome.runtime -> chrome.extension when needed
Some Ubuntu users are still stuck at Chromium 25.
2013-10-14 17:52:49 +02:00
Jonas Jenwald
d153341927 Merge pull request #3801 from Rob--W/hotfix/crx-ubuntu
chrome.extension -> chrome.runtime for Ubuntu
2013-10-13 13:27:28 -07:00
Kalervo Kujala
a5bf02573d Implement initial CalGray support
Gamma and Whitepoint are supported in this patch for CalGray.
Blackpoint is not supported.
2013-10-13 19:55:42 +03:00
Rob Wu
6070a37788 chrome.extension -> chrome.runtime for Ubuntu
Addresses issue #3800, where a bug specific to Ubuntu builds of Chromium
break PDF.js
https://bugs.launchpad.net/ubuntu/+source/chromium-browser/+bug/1232575
2013-10-13 12:23:31 +02:00
Tim van der Meij
b9bceb4c4b Merge pull request #3764 from saebekassebil/fingerprint
Simplify get fingerprint() method
2013-10-11 11:55:37 -07:00
Brendan Dahl
702ae3b5e8 Merge pull request #3777 from Snuffleupagus/webkitHideCursor-PresentationMode
Fix hiding of the cursor in Presentation Mode in WebKit browsers
2013-10-11 09:19:12 -07:00
Brendan Dahl
29b89f1f1e Intersect group bounding box with the current canvas dimensions. 2013-10-10 12:41:11 -07:00
Brendan Dahl
c79acf5861 Fix the B2G viewer and enable bot preview. 2013-10-09 15:04:58 -07:00
Brendan Dahl
99e45048cf Merge pull request #3776 from timvandermeij/thumbnail-jump
Refactoring thumbnail scroll code to fix jumps
2013-10-09 12:41:15 -07:00
Tim van der Meij
b1b661a274 Refactoring thumbnail scroll code to fix jumps 2013-10-09 20:40:21 +02:00
Brendan Dahl
f1a6e9015f Fix css rotation for canvas and text layer. 2013-10-09 11:29:05 -07:00
Tim van der Meij
cdcc26eedf Merge pull request #3790 from timvandermeij/typo-fix
Trivial typo fix
2013-10-09 11:26:10 -07:00
Tim van der Meij
ec7064ea74 Trivial typo fix 2013-10-09 20:24:12 +02:00
Brendan Dahl
6f61a9c83e Merge pull request #3727 from brendandahl/css-zoom2
Use css to initially scale on zoom.
2013-10-08 20:34:22 -07:00
Brendan Dahl
52e429550c Simplify the output scale for css zoom. 2013-10-08 20:31:49 -07:00
Jonas Jenwald
631333c486 Fix hiding of the cursor in Presentation Mode in WebKit browsers 2013-10-08 20:42:35 +02:00
Tim van der Meij
64757dd481 Merge pull request #3774 from Snuffleupagus/contextMenu-PresentationMode
Enabling clicking to close the context menu in Presentation Mode, without going to the next page
2013-10-08 11:31:02 -07:00
Brendan Dahl
9db1e437b0 Merge pull request #3670 from Rob--W/mozPrintCallback-polyfill
Polyfill for mozPrintCallback
2013-10-08 11:18:58 -07:00
Jonas Jenwald
dfb8e62079 Enabling clicking to close the context menu in Presentation Mode, without going to the next page 2013-10-08 20:11:04 +02:00
Rob Wu
194a734e5d Resolved severe memory leak (mozPrintCallback)
Do NOT save the temporary <canvas> element as `this.canvas`.
`PDFViewer.pages[i].canvas` appears to be used to generate the thumbnail
icons. Well, that's no justification for preventing GC of those
temporary <canvas> elements used during mozPrintCallback.

With a document consisting of 79 pages, this resulted in a 600-700MB
leaked memory.
2013-10-08 19:50:45 +02:00
Rob Wu
1731c0fb42 Add mozPrintCallback shim
This shim does the following:
1. Intercept window.print()
2. For a window.print() call (if allowed, ie. no previous print job):
   1. Dispatch the beforeprint event.
   2. Render a printg progress dialog.
   3. For each canvas, call mozPrintCallback if existent (one at a time, async).
   4. During each mozPrintCallback callback, update the progress dialog.
   5. When all <canvas>es have been rendered, invoke the real window.print().
   6. Dispatch the afterprint event.

The shim is not included in Firefox through the preprocessor.

Keyboard shortcuts (Ctrl/Cmd + P) are intercepted and default behavior
(i.e. printing) is prevented, and the steps for window.print() are run.
window.attachEvent is used, in order to cancel printing in IE10 and
earlier (courtesy of Stack Overflow - http://stackoverflow.com/a/15302847).
Unfortunately, this doesn't work in IE11 - if Ctrl + P is used, the
print dialog will be shown twice: Once because of Ctrl + P, and again
when all pages have finished rendering.

This logic of this polyfill is not specific to PDF.js, so it can also
be used in other projects.

There's one additional modification in PDF.js's viewer.js: The printed
<canvas> element is wrapped in a <div>. This is needed, because Chrome
would otherwise print one canvas on two pages.
2013-10-08 19:46:59 +02:00
Brendan Dahl
6d1533293e Merge pull request #3416 from peerlibrary/noHTMLElement
instanceof HTMLElement does not work in jsdom node.js module.
2013-10-08 10:15:00 -07:00
Jonas Jenwald
3ee730d009 Merge pull request #3779 from xavier114fch/zh-TW
Update zh-TW locale
2013-10-07 08:03:15 -07:00
Jonas Jenwald
bfa248c811 Merge pull request #3778 from Haebaru/master
Update ja locale
2013-10-07 07:58:31 -07:00
Xavier Fung
b484d72326 Update zh-TW locale 2013-10-07 22:45:16 +08:00
Haebaru
4d98103176 Update ja locale 2013-10-07 23:25:11 +09:00
Tim van der Meij
d4aa36257c Merge pull request #3763 from Snuffleupagus/refactor-PresentationMode
Refactor Presentation Mode code
2013-10-06 11:22:08 -07:00
Jonas Jenwald
d795c8ec14 Refactor Presentation Mode code 2013-10-06 20:10:26 +02:00
Tim van der Meij
e2f44361f5 Merge pull request #3759 from Snuffleupagus/issue-3755
Fix external links in Presentation Mode (issue 3755)
2013-10-04 13:49:30 -07:00
Tim van der Meij
a68375c48e Merge pull request #3739 from Snuffleupagus/bug-921162
Add the viewBookmark button to the Secondary Toolbar
2013-10-04 13:16:38 -07:00
Brendan Dahl
2d489bab22 Merge pull request #3582 from Rob--W/pushState
Set URL in history.replaceState/pushState
2013-10-03 11:35:36 -07:00
Jakob Miland
c341dd57e5 Simplify get fingerprint() method 2013-10-03 10:09:06 +02:00
Yury Delendik
e97e0032df Merge pull request #3750 from brendandahl/cidfonttype0c
Proper glyph selection for CIDFontType0C fonts.
2013-10-02 15:49:52 -07:00
Jon Ribbens
3ddb1720d9 Fix bug in api.js whereby fake workers didn't load the worker code
PDFJS does not work on Windows Safari, due to the lack of support for workers passing typed arrays. At some point, the code to set up the fake worker so that things work on Safari seems to have become broken and nobody noticed - it was just calling setupFakeWorker() without actually calling loadFakeWorkerFiles(). With this patch, the PDFJS works again on Windows Safari.
2013-10-02 17:22:33 +01:00
Brendan Dahl
4066f2ad6d Merge pull request #3746 from Snuffleupagus/remove-webkit-from-b2g-css
[B2G] Remove the remaining occurrences of -webkit prefixes from the CSS
2013-10-02 09:20:58 -07:00
Brendan Dahl
df249da923 Use css to initially scale on zoom. 2013-10-02 09:05:46 -07:00
Jonas Jenwald
87eb2dccbe Fix external links in Presentation Mode (issue #3755) 2013-10-02 16:17:38 +02:00
Tim van der Meij
0cd4874df6 Merge pull request #3757 from Snuffleupagus/move-Settings
Move Settings from viewer.js to its own file
2013-10-02 07:11:11 -07:00
Yury Delendik
a672937111 Merge pull request #3738 from timvandermeij/transposed-jbig2
Transposed feature for text decoding in jbig2
2013-10-02 06:59:35 -07:00
Jonas Jenwald
43b0b66ada Fix coding style and improve comment in settings.js 2013-10-02 15:57:23 +02:00
Jonas Jenwald
d6ab0c61e8 Move Settings from viewer.js to its own file 2013-10-02 15:55:31 +02:00
Tim van der Meij
fc5ed402fb Merge pull request #3752 from Snuffleupagus/move-PresentationMode
Move Presentation Mode related code from viewer.js to its own file
2013-10-02 06:30:51 -07:00
Tim van der Meij
dbd214fd28 Merge pull request #3728 from JakubOnderka/patch-1
Added missed space in Czech translation
2013-10-02 06:13:27 -07:00