Commit Graph

10603 Commits

Author SHA1 Message Date
Tim van der Meij
4894518cde
Merge pull request #9214 from SehyunPark/patch-13
Add SehyunPark to AUTHORS
2017-11-30 21:58:46 +01:00
Tim van der Meij
7d5ab905d9
Merge pull request #9218 from SehyunPark/patch-14
Add comma(,) in index.md
2017-11-30 21:54:16 +01:00
Brendan Dahl
bfa227a502
Merge pull request #9215 from Snuffleupagus/lower-MIN_SCALE
Lower the `MIN_SCALE` threshold to `0.10` (i.e. 10%) in the viewer, for better compatibility with documents containing very large pages
2017-11-30 10:19:09 -08:00
Jonas Jenwald
fffd5cb875 Update l10n files 2017-11-30 13:35:00 +01:00
Jonas Jenwald
f3c50fe2f9
Merge pull request #9192 from Snuffleupagus/issue-8229
Build a fallback `ToUnicode` map for simple fonts (issue 8229)
2017-11-30 10:27:32 +01:00
SehyunRyanPark
ac3e26b1a6
Update index.md
adding the appropriate comma(,) in order to make the sentence more understandable to the readers.
2017-11-30 09:50:00 +09:00
Jonas Jenwald
ba73bbc7b4 Lower the MIN_SCALE threshold to 0.10 (i.e. 10%) in the viewer, for better compatibility with documents containing very large pages
For sufficiently large page sizes, always limiting the minimum zoom level to 25% seem a bit too high. One example is pages, e.g. the first one, in:

Hence I think that it makes sense to lower `MIN_SCALE` slightly, since other PDF viewers (e.g. Adobe Reader) isn't limiting the minimum zoom level as aggressively. Obviously this will allow a greater number of pages to be visible at the same time in the viewer, but given that they will be small that shouldn't be an issue.

Note also that e.g. the `page-fit`/`page-width` zoom levels already allow `< MIN_SCALE` values, so I don't see why we shouldn't allow users the same functionality directly.
2017-11-29 14:36:57 +01:00
SehyunRyanPark
7b1c59ca55
Add SehyunPark to AUTHORS
Add SehyunPark to AUTHORS
2017-11-29 22:24:08 +09:00
Brendan Dahl
fbf456f51e
Merge pull request #9201 from ydfzgyj/btoa
Add `btoa` back to domstubs.js
2017-11-28 17:29:16 -08:00
Tim van der Meij
e320243870
Merge pull request #9206 from janpe2/svg-inv-images
Fix inverted 1-bit images in SVG backend
2017-11-28 22:46:43 +01:00
Jonas Jenwald
e78fe842c7
Merge pull request #9090 from janpe2/pattern-text
Fix pattern-filled text (embedded fonts only)
2017-11-28 20:38:58 +01:00
Jani Pehkonen
58b214eab3 Fix inverted 1-bit images in SVG backend 2017-11-28 21:24:27 +02:00
Jani Pehkonen
06d083b04b Fix pattern-filled text 2017-11-28 19:40:22 +02:00
巴里切罗
27a619246f Add btoa back to domstubs.js 2017-11-28 16:34:53 +08:00
Tim van der Meij
3e34eb31d9
Merge pull request #9191 from timvandermeij/pushbuttons
Button widget annotations: implement support for pushbuttons
2017-11-27 22:31:07 +01:00
Jonas Jenwald
61e19bee43 Build a fallback ToUnicode map for simple fonts (issue 8229)
In some fonts, the included `ToUnicode` data is incomplete causing text-selection to not work properly. For simple fonts that contain encoding data, we can manually build a `ToUnicode` map to attempt to improve things.

Please note that since we're currently using the `ToUnicode` data during glyph mapping, in an attempt to avoid rendering regressions, I purposely didn't want to amend to original `ToUnicode` data for this text-selection edge-case.
Instead, I opted for the current solution, which will (hopefully) give slightly better text-extraction results in PDF file with incomplete `ToUnicode` data.

According to the PDF specification, see [section 9.10.2](http://www.adobe.com/content/dam/acom/en/devnet/acrobat/pdfs/PDF32000_2008.pdf#G8.1873172):

> A conforming reader can use these methods, in the priority given, to map a character code to a Unicode value.
> ...

Reading that paragraph literally, it doesn't seem too unreasonable to use *different* methods for different charcodes.

Fixes 8229.
2017-11-26 14:45:15 +01:00
Tim van der Meij
0fe80df2a7
Button widget annotations: implement support for pushbuttons 2017-11-26 14:09:48 +01:00
Jonas Jenwald
ffbfc3c2a7 Refactor the building of ToUnicode maps for simple fonts a helper method 2017-11-26 13:30:29 +01:00
Tim van der Meij
b32d659dff
Merge pull request #9190 from Snuffleupagus/rm-app-pageRotation
Remove the `pageRotation` getter in `PDFViewerApplication`
2017-11-26 13:05:09 +01:00
Jonas Jenwald
c1f385eda9 Remove the pageRotation getter in PDFViewerApplication
This was added, during the refactoring in PR 8556, to avoid outright breaking third-party users of the default viewer.
With PDF.js version `2.0`, where we're making API changes that aren't backwards compatible, we ought to be able to remove this piece of viewer code as well.
2017-11-26 10:39:24 +01:00
Tim van der Meij
ada47fe373
Merge pull request #9189 from Snuffleupagus/WorkerTransport.getPage-signature
Remove the unused `capability` parameter from the `WorkerTransport.getPage` method
2017-11-25 14:05:04 +01:00
Jonas Jenwald
ab1f76cc37 Remove the unused capability parameter from the WorkerTransport.getPage method
That parameter, originally named `promise`, has been unused for over five years; ever since commit f0687c4d50 in PR 1531.
2017-11-25 11:49:33 +01:00
Jonas Jenwald
343f331b8b
Merge pull request #9095 from Snuffleupagus/WebGLFactory
Split the existing `WebGLUtils` in two classes, a private `WebGLUtils` and a public `WebGLContext`, and utilize the latter in the API to allow various code to access the methods of `WebGLUtils`
2017-11-24 23:25:06 +01:00
Jonas Jenwald
59b5e14301 Split the existing WebGLUtils in two classes, a private WebGLUtils and a public WebGLContext, and utilize the latter in the API to allow various code to access the methods of WebGLUtils
This patch is one (small) step on the way to reduce the general dependency on a global `PDFJS` object, for PDF.js version `2.0`.
2017-11-24 21:54:47 +01:00
Jonas Jenwald
503bc95a2b
Merge pull request #9187 from Standard8/use-services
Update eslint-plugin-mozilla, and enable mozilla/use-services rule.
2017-11-24 18:24:38 +01:00
Mark Banner
3065197cc4 Update eslint-plugin-mozilla, and enable mozilla/use-services rule. 2017-11-24 16:58:36 +00:00
Tim van der Meij
c236790fb4
Merge pull request #9182 from Snuffleupagus/viewer-ignore-other-file-errors
Don't display error messages, in the default viewer, for PDF files other than the current one
2017-11-23 21:58:33 +01:00
Jonas Jenwald
c7ebea40b9 Don't display error messages, in the default viewer, for PDF files other than the current one
We've never attempted to limit the errors displayed in the default viewer to the current PDF file, but that's not really been a problem before. However after PR 7926, it's now possible to get password related error messages for *previously* opened PDF files in the default viewer.

**STR:**
 1. Open a password protected PDF file, e.g. `issue6010_1.pdf` from the test-suite.
 2. Cancel the password prompt.
 3. Open any new PDF file in the viewer.

**AR:**
The error UI is displayed, with a `No password given` message.

**ER:**
No error displayed, since it's only relevent for a now closed PDF file.

This is obviously a minor issue, caused by us now rejecting the still pending `pdfLoadingTask` during the `PDFViewerApplication.close` call, but I don't think that it (generally) makes sense to show errors if they're not relevant to the *currently* displayed PDF file.
2017-11-23 14:00:02 +01:00
Tim van der Meij
58760edba9
Merge pull request #9170 from Snuffleupagus/rm-polyfills
Remove more polyfills for old browsers
2017-11-22 22:23:43 +01:00
Jonas Jenwald
3ed2290c5b
Merge pull request #9179 from mgol/mailmap
Add mgol's name to AUTHORS, add .mailmap
2017-11-22 13:19:08 +01:00
Michał Gołębiowski-Owczarek
a9135f5c35 Add mgol's name to AUTHORS, add .mailmap
In this way mgol's past contribution is mapped correctly.
2017-11-22 10:46:11 +01:00
Jonas Jenwald
cc47ef56ec Remove the onclick polyfill for old versions of Opera
This was only relevant for no obsolete versions Opera, that use the Presto engine. According to https://en.wikipedia.org/wiki/History_of_the_Opera_web_browser#Opera_2013, the last version affected was released in 2013.
2017-11-21 11:02:14 +01:00
Jonas Jenwald
d18b2a8e73 Remove the classList polyfill
This is only relevant for browsers that we don't intend to support with PDF.js version `2.0`.
2017-11-21 11:01:52 +01:00
Jonas Jenwald
4b15e8566b Remove the Function.prototype.bind polyfill
This is only relevant for browsers that we don't intend to support with PDF.js version `2.0`.
2017-11-21 11:00:55 +01:00
Jonas Jenwald
d8cb74d3e3 Remove the btoa/atob polyfills
This is only relevant for browsers that we don't intend to support with PDF.js version `2.0`.
2017-11-21 11:00:55 +01:00
Jonas Jenwald
150ac0788f Remove IE9 specific XMLHttpRequest polyfills that utilize VBArray 2017-11-21 11:00:55 +01:00
Jonas Jenwald
935c5c587f Remove the Object.defineProperty polyfill
This is only relevant for browsers that we don't intend to support with PDF.js version `2.0`.
2017-11-21 11:00:55 +01:00
Tim van der Meij
6f52fafdc0
Merge pull request #9162 from SehyunPark/patch-8
Update index.md
2017-11-20 21:14:17 +01:00
Jonas Jenwald
b8e7a0b2f4 Update l10n files 2017-11-20 16:07:24 +01:00
SehyunRyanPark
0882288cdf
Update index.md
adding commas each in two sentences in order to make readers fully understand when reading index.md and to organize the context properly based on grammatical rules.
2017-11-20 21:47:19 +09:00
Tim van der Meij
dad83bfb5b
Merge pull request #9158 from timvandermeij/annotations-utf16be
Sanitize the display value for choice widget annotations
2017-11-18 21:35:08 +01:00
Tim van der Meij
25b07812b9
Sanitize the display value for choice widget annotations 2017-11-18 20:37:27 +01:00
Tim van der Meij
9e8cf448b0
Merge pull request #9140 from Snuffleupagus/rm-console-polyfill
Remove the `console` polyfills
2017-11-18 15:49:19 +01:00
Tim van der Meij
617cb86a43
Merge pull request #9157 from SehyunPark/patch-6
Update index.md
2017-11-18 15:42:16 +01:00
Tim van der Meij
edaf4b3173
Merge pull request #9037 from Snuffleupagus/refactor-streams-params
Re-factor how parameters are passed to the network streams
2017-11-18 15:41:15 +01:00
SehyunRyanPark
1093cc6d77
Update index.md
fixing grammatical error (demonstrate -> demonstrates)
2017-11-18 23:15:03 +09:00
Tim van der Meij
f5fb87f021
Merge pull request #9156 from SehyunPark/patch-5
Update README.md
2017-11-18 14:27:23 +01:00
SehyunRyanPark
095c8a988e
Update README.md
Clarifying what IRC stands for in order to make people understand clearly who want to use relay chat in irc.mozilla.org
2017-11-18 21:29:20 +09:00
Tim van der Meij
ae07adf143
Merge pull request #9073 from Snuffleupagus/image-streams-fixes
Fix the interface of `JpegStream`/`JpxStream`/`Jbig2Stream` to agree with the other `DecodeStream`s
2017-11-17 23:26:36 +01:00
Jonas Jenwald
c61d197398
Merge pull request #9122 from wojtekmaj/change/remove-compatibility-from-examples
Remove mentions of compatibility.js from examples
2017-11-17 00:31:14 +01:00