Yury Delendik
8e681ce3e2
Change amd to cjs path in ES6 modules
8 years ago
Jonas Jenwald
3b35c15d42
Convert the files in the `/web` folder to ES6 modules
...
Note that as discussed on IRC, this makes the viewer slightly slower to load *only* in `gulp server` mode, however the difference seem slight enough that I think it will be fine.
8 years ago
Dave House
52360694b0
Remove ids from viewer page and thumbnail divs
...
The id, and parsing it for the page number, is replaced by the
data-page-number attribute (added here for thumbnails).
8 years ago
Jonas Jenwald
efb9619e53
Add PageLabels to `PDFPageView` and `PDFThumbnailView`
9 years ago
Yury Delendik
0576c9c6c6
Replaces all preprocessor directives with PDFJSDev calls.
9 years ago
Jonas Jenwald
a824c6c4f6
Ensure that any pending rendering operations in `PDFViewer`/`PDFThumbnailViewer` are cancelled when the viewer is closed
9 years ago
Yury Delendik
006e8fb59d
Introduces UMD headers to the web/ folder.
9 years ago
Jonas Jenwald
b5582e14a9
[PDFThumbnailView] Re-factor the `canvas` to `image` conversion such that we always render to a `canvas`, and then replace it with an `image` once rendering is done
...
*This is a follow-up to PRs 6299 and 6441.*
The patch also adds an option to `PDFThumbnailView`, that disables the canvas-to-image conversion entirely, which might be useful in the context of issue 7026.
9 years ago
Jonas Jenwald
95aa8b0415
Remove the `hasImage` property from `PDFThumbnailView`
...
The `hasImage` property is a left-over from older thumbnail code, and has been made obsolete by `renderingState`.
Having two different properties tracking (basically) the same state is asking for trouble, since it's very easy to forget to update one of them, with annoying bugs as the result.
9 years ago
Yury Delendik
1d8800370a
Allow subpixel anti-aliasing for most of the content.
10 years ago
Manas
a2ba1b8189
Uses editorconfig to maintain consistent coding styles
...
Removes the following as they unnecessary
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
10 years ago
Yury Delendik
5135aa9bec
Adds deprecation warning for the API calls.
10 years ago
Jonas Jenwald
1b50932eaa
Don't show thumbnails until the `canvas` to `image` conversion is done (issue 6442)
10 years ago
Jonas Jenwald
d7a90d83de
Delete, and clear, the `image` in `PDFThumbnailView_reset`
...
*Follow-up to PR 6299.*
10 years ago
Jonas Jenwald
555c7925a0
Prevent `setImage` from failing to display small thumbnails, by adding a missing `canvas` to `image` conversion
...
*Follow-up to PR 6299.*
10 years ago
Jonas Jenwald
ebce928149
Extract the conversion from `canvas` to `image` into a helper function in `PDFThumbnailView`
...
*Follow-up to PR 6299.*
This patch reduces unnecessary code duplication for the `canvas` to `image` conversion. It also does a bit of re-ordering (and adds new lines) in `_getPageDrawContext`, since that function currently is a bit hard to read.
10 years ago
awang
161def7f4e
Convert canvas thumbnails to PNG #6299
10 years ago
Mike Corbin
357ee6cbb2
viewer: Support Retina/HiDPI thumbnails
...
Reuse the existing getOutputScale() machinery to render and/or rescale
thumbnail images to the native display resolution. Fixes blurry thumbnails on
HiDPI displays making it a lot easier to make out the content.
10 years ago
Jonas Jenwald
eed67ea8bb
Remove the |el| property in PDFPageView and PDFThumbnailView
10 years ago
Jonas Jenwald
777d69b52e
Remove dead code from PDFThumbnailView
10 years ago
Jonas Jenwald
b7041f81f4
Enable cancelling of thumbnail drawing
...
This is useful if thumbnails are being rendered when the document is rotated, since it let us abort the current rendering.
10 years ago
Jonas Jenwald
878aa76c15
Refactor PDFThumbnailView to look more similar to PDFPageView
...
This includes an optimization to zero the height and width of existing thumbnail canvases, when they are removed and recreated during rotation of the document. (Credit goes to nnethercote, who initially found this in PR 4920.)
10 years ago
Jonas Jenwald
7f8f404536
Rename ThumbnailView to PDFThumbnailView and refactor it to be more class-like
10 years ago
Jonas Jenwald
64ba38008f
Rename the thumbnail_view.js file
10 years ago
Jonas Jenwald
c55dcf19a0
Move PDFThumbnailViewer to its own file
10 years ago
Tim van der Meij
879f3d2c5a
Fill temporary canvases with a white background too
10 years ago
Jonas Jenwald
c149d4d75e
Fix thumbnail rendering regression, when using |draw|, for PDF files with blend modes (issue 5637)
10 years ago
Jonas Jenwald
c466a9e034
Fix thumbnail scaling regression for files with different page sizes (issue 5637)
10 years ago
fkaelberer
32c32c18e3
Better thumbnail image scaling
10 years ago
fkaelberer
2bb981a835
Ensure constant 7px thumbnail border width
10 years ago
Yury Delendik
2565e627a3
Refactors draw method in PDFPageView; makes optional some PDFPageViewOptions options
10 years ago
Yury Delendik
fe4ac86781
Removes PDFPageSource
10 years ago
Yury Delendik
a89bba35b2
Adds types definitions (jsdoc) for the PDFViewer code.
11 years ago
Yury Delendik
3773972dce
Marks some private methods in PDFViewer and PDFThumbnailViewer
...
Conflicts:
web/pdf_viewer.js
11 years ago
Yury Delendik
a1eca2084d
Moves constants to avoid dependency on PDFView
11 years ago
Yury Delendik
a06a974f78
Moves rendering queue logic from PDFView
11 years ago
Yury Delendik
7642c39734
Moves pdfDocument.getPage/getTextContent requests out of PDFView
11 years ago
Yury Delendik
3bce14761a
Moves thumbs logic into PDFThumbnailViewer.
11 years ago
Yury Delendik
a338a7966d
Fixes drawImage for thumbs
11 years ago
Yury Delendik
f6c631bc31
Reverts #4556 due to flicker on Chome
11 years ago
p01
b10aa18b3e
Use Opaque Canvas where possible
11 years ago
Yury Delendik
5bf3e44e30
Introduces LegacyPromise; polyfills DOM Promise
11 years ago
Jonas Jenwald
3d523000b9
Fix thumbnail rotation regression
11 years ago
Jonas
d99879bfbf
Move ThumbnailView from viewer.js to its own file
12 years ago