Commit Graph

10841 Commits

Author SHA1 Message Date
Tim van der Meij
c8b4e6ec9d
Merge pull request #9757 from timvandermeij/backout
Backout of pull request #9345
2018-05-28 23:05:50 +02:00
Tim van der Meij
057994d781
Backout of pull request #9345 2018-05-28 22:54:09 +02:00
Jonas Jenwald
f68f60099e Remove usage of makeSubStream from Type1Parser.extractFontProgram in src/core/type1_parser.js (issue 9735)
This avoids the initialization of, potentially thousands of, unnecessary `Stream` objects, by getting the required number of bytes directly instead.
Given the special behaviour, when `length === 0`, of the `getBytes`/`skip` methods, it's also necessary to handle that particular case to prevent errors when encountering empty CharStrings.
2018-05-28 14:32:20 +02:00
Tim van der Meij
70cad2f053
Merge pull request #9754 from timvandermeij/tests
Fix broken links to Bugzilla PDF attachments and convert all PDF links from HTTP to HTTPS
2018-05-27 16:26:47 +02:00
Tim van der Meij
2f3b05fd5a
Convert all PDF links from HTTP to HTTPS 2018-05-27 16:02:04 +02:00
Tim van der Meij
4958b59369
Fix broken links to Bugzilla PDF attachments 2018-05-27 15:40:33 +02:00
Rob Wu
28360a0142
Merge pull request #9701 from mukulmishra18/fetch-abort
Add abort functionality in fetch stream
2018-05-22 15:11:49 +02:00
Mukul Mishra
949c3e9417 Add abort functionality in fetch stream 2018-05-22 12:46:59 +05:30
Tim van der Meij
b7a3a5e7e4
Merge pull request #9742 from AbhimanyuVashisht/remove-new-buffer
Replace deprecated new Buffer(string) constructor with Buffer.from(string)
2018-05-20 17:21:04 +02:00
Abhimanyu Vashisht
58612f869a Replace deprecated new Buffer(string) constructor with Buffer.from(string) 2018-05-20 20:42:50 +05:30
Tim van der Meij
4948129dc4
Merge pull request #9743 from timvandermeij/translations
Import translations
2018-05-20 16:57:21 +02:00
Tim van der Meij
321681d867
Import translations 2018-05-20 16:53:20 +02:00
Rob Wu
7ba50448fd
Merge pull request #9208 from rhendric/scrolling-modes
Add scrolling and spread modes to web viewer
2018-05-15 11:41:47 +02:00
Ryan Hendrickson
d7c051e807 Add preferences for default scroll/spread modes
This commit adds `scrollModeOnLoad` and `spreadModeOnLoad` preferences
that control the default viewer state when opening a new document for
the first time.

This commit also contains a minor refactoring of some of the option UI
rendering code in extensions/chromium/options/options.js, as I couldn't
bear creating two more functions nearly identical to the four that
already existed.
2018-05-14 23:10:33 -04:00
Ryan Hendrickson
c24bc29757 Remember last used scroll and spread modes 2018-05-14 23:10:33 -04:00
Ryan Hendrickson
eaf14e5d47 Modify key events for horizontal scrolling
Specifically, when there is no vertical scrollbar, let up, down, page
up, and page down all trigger moving to the next or previous page.
2018-05-14 23:10:32 -04:00
Ryan Hendrickson
3d83c646c6 Add spread modes to web viewer
This builds on the scrolling mode work to add three buttons for joining
page spreads together: one for the default view, with no page spreads,
and two for spreads starting on odd-numbered or even-numbered pages.
2018-05-14 23:10:32 -04:00
Ryan Hendrickson
91cbc185da Add scrolling modes to web viewer
In addition to the default scrolling mode (vertical), this commit adds
horizontal and wrapped scrolling, implemented primarily with CSS.
2018-05-14 23:10:32 -04:00
Ryan Hendrickson
65c8549759 Fix bug in scrollIntoView
Prior to this commit, if the vertical scroll bar is absent and the horizontal
scroll bar is present, a link to a particular point on the page which should
induce a horizontal scroll did not do so, because the absence of a vertical
scroll bar meant that the viewer was not recognized as the nearest scrolling
ancestor. This commit adds a check for horizontal scroll bars when searching
for the scrolling ancestor.
2018-05-14 23:10:32 -04:00
Tim van der Meij
91a8027acd
Merge pull request #9719 from theel0ja/patch-1
Add description metatag to docs
2018-05-13 11:44:06 +02:00
Elias Ojala
94fa71977b
Add description to docs. 2018-05-13 11:52:31 +03:00
RafaPolit
d63b17dbe3 Fixed critical unhandled promise that prevented error catching using API 2018-04-24 13:10:00 -05:00
Tim van der Meij
c5c06bf5c4
Merge pull request #9673 from janpe2/svg-clip
SVG clip intersections and operators
2018-04-22 15:59:25 +02:00
Jani Pehkonen
fe2cf2f73f SVG clip intersections and operators 2018-04-17 19:20:29 +03:00
Brendan Dahl
2dc4af525d
Merge pull request #9659 from yurydelendik/rm-createFromIR
Remove createFromIR from PDFFunctionFactory
2018-04-12 14:22:43 -07:00
Brendan Dahl
7d7bc80eee
Merge pull request #9501 from janpe2/text-clip-cff-cid
Use FDSelect and FDArray when converting CFF CID font to paths
2018-04-11 10:49:07 -07:00
Yury Delendik
20085aaa5e Remove createFromIR from PDFFunctionFactory; forgive invalid Dict values. 2018-04-10 18:49:31 -05:00
Jani Pehkonen
8ea505545a Use FDSelect and FDArray when converting CFF CID font to paths 2018-04-10 16:44:42 +03:00
Tim van der Meij
2275485cec
Merge pull request #9640 from timvandermeij/updates
Update packages and translations
2018-04-08 15:53:51 +02:00
Tim van der Meij
e0b63cc7af
Update packages and translations 2018-04-08 15:49:17 +02:00
Tim van der Meij
1a634f9c6a
Merge pull request #9629 from wojtekmaj/add-autoprefixer
Implement autoprefixer
2018-04-08 15:11:41 +02:00
Tim van der Meij
69e9fe2494
Provide a prefixed appearance CSS rule for reference testing in Chrome
In `rasterizeAnnotationLayer` we load the source CSS files directly, so
these are not processed by Autoprefixer. Since the prefixed rules have
now been removed from the source CSS files, we must manually provide one
prefixed rule that Chrome needs in the overrides CSS file for checkbox
and radio button rendering to work in the reference tests.
2018-04-08 13:54:16 +02:00
Wojciech Maj
acd1fa4c4f Configure Autoprefixer 2018-04-04 23:02:26 +02:00
Wojciech Maj
ed67c1d6aa Introduce autoprefixer to gulp process 2018-04-04 00:26:01 +02:00
Wojciech Maj
dbb0e88bc1 Clean up browser-specific CSS 2018-04-04 00:25:12 +02:00
Brendan Dahl
a7a034d803
Merge pull request #9566 from brendandahl/remove-ff-ext
Remove the Firefox extension building code.
2018-04-03 13:45:38 -07:00
Brendan Dahl
e8cf7fd512
Merge pull request #9624 from wojtekmaj/no-warning-on-dependency-operator
Prevent warning on unimplemented operator thrown for OPS.dependency
2018-04-03 10:55:29 -07:00
Brendan Dahl
d21eecefc1
Merge pull request #9620 from wojtekmaj/fix-typos
Fix typos
2018-04-03 10:54:29 -07:00
Wojciech Maj
acc0a0fe95 Prevent warning on unimplemented operator thrown for OPS.dependency 2018-04-02 14:29:34 +02:00
Wojciech Maj
ea2850e9a7 Fix typos 2018-04-01 23:20:41 +02:00
Tim van der Meij
2f63ca0705
Merge pull request #9619 from timvandermeij/systemjs
Pin `systemjs` to avoid breakage
2018-04-01 13:19:03 +02:00
Tim van der Meij
6896d30037
Pin systemjs to avoid breakage
SystemJS version 0.21.0 works, but version 0.21.1 breaks with various
`Unable to load transpiler to transpile` errors. Pin the version to
0.21.0 for now to avoid this issue.
2018-04-01 13:07:26 +02:00
Tim van der Meij
57e8676180
Merge pull request #9618 from timvandermeij/node-example
Improve the instructions and code for the `pdf2png` example
2018-04-01 12:57:14 +02:00
Tim van der Meij
64b1315bb5
Improve the instructions and code for the pdf2png example
We need to pass `disableFontFace` and `nativeImageDecoderSupport`
because Node.js has no native support for `@font-face` and `Image`.
Doing so makes it possible to render e.g., the Tracemonkey paper, which
failed before. I made this PDF file the default because it's also the
default in other examples/demos and because it showcases the
possibilities better than the very simple hello world PDF file.

Building the library with `gulp dist-install` is easier and is already
recommended in the other examples.
2018-04-01 12:52:57 +02:00
Tim van der Meij
8887a09e8f
Merge pull request #9588 from swftvsn/patch-1
Improve node.js support
2018-04-01 12:26:39 +02:00
Tim van der Meij
8512596508
Merge pull request #9611 from Snuffleupagus/getMainThreadWorkerMessageHandler-non-PRODUCTION
Clean-up `getMainThreadWorkerMessageHandler` for non-PRODUCTION mode
2018-03-31 15:03:21 +02:00
Brendan Dahl
121e43685f Remove the Firefox extension building code.
Firefox no longer supports this legacy extension and it is a pain to
sync changes from here and mozilla central.
2018-03-30 16:27:50 -07:00
Jonas Jenwald
8b09f7c34e Clean-up getMainThreadWorkerMessageHandler for non-PRODUCTION mode
*This is a final piece of clean-up of code that I recently wrote, after which I'm done :-)*

When the `getMainThreadWorkerMessageHandler` function was added, in PR 9385, it did so by basically introducing a `web/app.js` dependency in `src/display/api.js` through the `window.pdfjsNonProductionPdfWorker` property[1]. Even though this is limited to non-`PRODUCTION` mode, i.e. `gulp server`, it still seems unfortunate to have that sort of viewer dependency in the API code itself.

With the new, much nicer and shorter, names introduced in PR 9565 we can remove this non-`PRODUCTION` hack and just use `window.pdfjsWorker` in both the viewer and the API regardless of the build mode.

---

[1] It didn't seem correct to piggy-back on the `window.pdfjsDistBuildPdfWorker` property in non-`PRODUCTION` mode.
2018-03-29 11:03:47 +02:00
Tim van der Meij
a8e9f6cc29
Merge pull request #9593 from Snuffleupagus/pageSize-orientation
Improve the pageSize entry in the document properties dialog, by also displaying page names and orientation
2018-03-25 21:52:11 +02:00
Jonas Jenwald
b004308f88 Attempt to improve the detection of (metric) page names, by fuzzy matching the dimensions
The following is an example of a PDF file (the specification to be exact) where the page size (compare the size displayed in Adobe Reader), and the page name, isn't correctly displayed without the patch: https://www.adobe.com/content/dam/acom/en/devnet/acrobat/pdfs/PDF32000_2008.pdf
2018-03-25 18:53:45 +02:00