Tim van der Meij
c5f4b9750e
Implement support for StrikeOut annotations
2015-12-29 15:09:28 +01:00
Jonas Jenwald
b32cdf5836
Merge pull request #6813 from timvandermeij/underline-annotation
...
Implement support for Underline annotations
2015-12-28 23:48:31 +01:00
Jonas Jenwald
85589483d6
Merge pull request #6807 from timvandermeij/popup-annotation-hidden
...
Ensure that hidden popups do not use any space
2015-12-28 22:58:41 +01:00
Tim van der Meij
ae329afc03
Ensure that hidden popups do not use any space
2015-12-28 18:54:10 +01:00
Tim van der Meij
edf8ccc1d8
Merge pull request #6814 from Snuffleupagus/beginAnnotations-baseTransform
...
Ensure that the `baseTransform` is applied when rendering annotations
2015-12-28 18:32:50 +01:00
Jonas Jenwald
2f2ea6160b
Ensure that the baseTransform
is applied when rendering annotations
...
Fixes 3350.
Fixes 5946.
Fixes 6334.
Fixes 6722.
Probably fixes 3826 (since the PDF files are no longer available, I cannot confirm it).
2015-12-28 16:02:38 +01:00
Tim van der Meij
cd28dd34fe
Implement support for Underline annotations
2015-12-28 00:33:41 +01:00
Tim van der Meij
26379ddae2
Rename and reorder link annotation CSS
2015-12-27 15:51:58 +01:00
Jonas Jenwald
3c7088dc44
Do not modify data.rect
in AnnotationElement_createContainer
, since that will corrupt the annotation position on subsequent calls
...
Fixes 6804; this regressed in PR 6714.
2015-12-27 12:46:20 +01:00
Tim van der Meij
7d43971f54
Implement support for Popup annotations
...
Most code for Popup annotations is already present for Text annotations.
This patch extracts the popup creation logic from the Text annotation
code so it can be reused for Popup annotations.
Not only does this add support for Popup annotations, the Text
annotation code is also considerably easier. If a `Popup` entry is
available for a Text annotation, it will not be more than an image. The
popup will be handled by the Popup annotation. However, it is also
possible for Text annotations to not have a separate Popup annotation,
in which case the Text annotation handles the popup creation itself.
2015-12-25 13:17:21 +01:00
Tim van der Meij
05b9d3730a
Merge pull request #6785 from yurydelendik/frameworks
...
Adds/modifies examples for node.js and webpack.
2015-12-21 22:44:58 +01:00
Yury Delendik
79c2f69c32
Adds/modifies examples for node.js and webpack.
2015-12-21 13:46:50 -06:00
Tim van der Meij
5b66ad626d
Refactor annotation display layer code to use classes
2015-12-19 19:31:37 +01:00
Tony Jin
f9e2091c5a
Fixing externalLinkTarget. isExternalLinkTargetSet was set to
...
wrong sharedUtil method.
2015-12-18 11:27:21 -08:00
Yury Delendik
42beb0c27b
Merge pull request #6767 from tonyjin/strip-link-referrer
...
Strip referrer from link annotation.
2015-12-18 12:27:15 -06:00
Tony Jin
11f3deac56
Allow link rel to be customized. Defaults to 'noreferrer'
2015-12-17 10:36:53 -08:00
Tim van der Meij
df81b832bb
Remove unused variables
2015-12-16 23:52:16 +01:00
Brendan Dahl
f1c64b6a2a
Merge pull request #6683 from yurydelendik/module-core
...
Adds UMD headers to core, display and shared files.
2015-12-15 17:10:21 -08:00
Xiliang Chen
8bf17f5df8
Fix incorrect position of text widget
2015-12-16 11:21:01 +13:00
Yury Delendik
b084dc09ee
Allows requirejs and node load fake worker files.
2015-12-15 13:24:39 -06:00
Yury Delendik
6b60c8f4db
Adds UMD headers to core, display and shared files.
2015-12-15 13:24:39 -06:00
Tim van der Meij
1b5940edd2
Merge pull request #6714 from timvandermeij/annotation-web-to-src
...
[api-minor] Move annotation DOM manipulation logic to src/display/annotation_layer.js
2015-12-15 19:06:48 +01:00
Tim van der Meij
edce8daeac
Implement annotation layer rendering and updating in src/display/annotation_layer.js
2015-12-15 17:00:01 +01:00
Tim van der Meij
b1937e7670
Remove superfluous comments in the annotation layer code
2015-12-15 16:27:35 +01:00
Tim van der Meij
f93a220736
Merge pull request #6684 from dsprenkels/issue-6296-radial-shading-size
...
shading-pattern: While drawing patterns, use transform to baseTransform first
2015-12-14 20:39:08 +01:00
Yury Delendik
f7ec866c39
Merge pull request #6747 from Snuffleupagus/issue-6742
...
Remove the superfluous `PDFJS.disableFontFace = false;` statement at the top of font_loader.js (issue 6742)
2015-12-12 12:53:56 -05:00
Jonas Jenwald
12068490ed
Remove the superfluous PDFJS.disableFontFace = false;
statement at the top of font_loader.js (issue 6742)
...
Fixes 6742.
2015-12-12 12:39:56 +01:00
Jonas Jenwald
f0e4795302
Reset the styleElement
when clearing out loaded fonts (bug 1232017)
...
*This is a follow-up to PR 6571.*
Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1232071 .
2015-12-12 11:33:43 +01:00
Brendan Dahl
91b27aae46
Merge pull request #6651 from yurydelendik/fix-chars-scaling
...
Fix chars scaling for standard fonts. (redo of #4908 )
2015-12-10 14:18:48 -05:00
Tim van der Meij
bce3214105
Move link creation logic to src/display/annotation_layer.js
...
Additionally simplify the div creation logic (it needs to happen only
once, so it should not be in the for-loop) and remove/rename variables
for shorter code.
2015-12-08 23:56:17 +01:00
Yury Delendik
15c9969abe
Adds transfer function support for SMask.
2015-12-04 12:52:45 -06:00
Yury Delendik
d4843ebf6d
Fixes canvas state after smask group ends.
2015-12-03 14:34:12 -06:00
Tim van der Meij
2dc3ee38c0
Move most rendering logic to src/display/annotation_layer.js
2015-12-03 00:20:18 +01:00
Tim van der Meij
38567ac3a3
Rename initContainer(item)
to getContainer(data)
...
Naming it this way makes more sense when compared to the core
annoatation code. That code also uses `data` for the annotation
properties.
2015-12-02 23:35:21 +01:00
Tim van der Meij
91274d6d2d
Rename annotation_helper.js to annotation_layer.js
2015-12-02 23:30:28 +01:00
Daan Sprenkels
a9081653fc
shading-pattern: While drawing patterns, transform to the baseTransform first
2015-12-02 21:49:38 +01:00
Yury Delendik
c9cb6a3025
Replaces UnsupportedManager with callback.
2015-11-30 14:42:47 -06:00
Jonas Jenwald
e8e79029b1
Replace font.bindDOM()
with font.createFontFaceRule()
in the FontLoader
for MOZCENTRAL specific code (PR 6571 follow-up)
...
This is a follow-up to PR 6571, and fixes font loading in the `MOZCENTRAL` version.
Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1228603#c2 .
2015-11-28 21:33:07 +01:00
Yury Delendik
8dff301ce1
Worker shall wait for MessageHandler to be created at api side.
2015-11-25 18:21:23 -06:00
Jonas Jenwald
6dfe53b976
[api-minor] Add a parameter to PDFPageProxy_getTextContent
that enables replacing of all whitespace with standard spaces in the textLayer (issue 6612)
...
This patch goes a bit further than issue 6612 requires, and replaces all kinds of whitespace with standard spaces.
When testing this locally, it actually seemed to slightly improve two existing test-cases (`tracemonkey-text` and `taro-text`).
Fixes 6612.
2015-11-25 17:28:40 +01:00
Tim van der Meij
c2dfe9e9a9
Merge pull request #6571 from yurydelendik/worker
...
[api-minor] Allows a worker to handle multiple documents.
2015-11-24 22:42:44 +01:00
Tim van der Meij
c280fb516d
Merge pull request #6679 from Snuffleupagus/better-openExternalLinksInNewWindow-deprecation-comments
...
Improve the comment and deprecation warning for `PDFJS.openExternalLinksInNewWindow`
2015-11-24 22:38:43 +01:00
Yury Delendik
06c1904675
Refactors FontLoader to group fonts per document.
2015-11-24 13:27:22 -06:00
Yury Delendik
09772e1e15
Creates PDFWorker, separates fetchDocument from transport.
2015-11-24 13:27:22 -06:00
Yury Delendik
acdd49f480
Adds peer communication between MessageHandlers.
2015-11-24 12:16:58 -06:00
Jonas Jenwald
27c8e1e22f
Improve the comment and deprecation warning for PDFJS.openExternalLinksInNewWindow
...
This patch:
- Updates the JSDoc comment in `api.js`, to more clearly point out that `PDFJS.openExternalLinksInNewWindow` is deprecated, and explains what to use instead.
- Changes the `warn`, in `isExternalLinkTargetSet()`, to use the new `deprecated` function instead. Also updates the message with more detailed information about what to use instead.
- Changes the pre-processor tag to ensure the deprecation warning is seen in all build types where it could possibly matter (in case people are using `PDFJS.openExternalLinksInNewWindow` in e.g. custom-built extensions).
These changes were prompted by seeing http://stackoverflow.com/questions/33813373/pdf-js-how-to-open-hyperlinks-in-a-new-tab-window , since it seems to me that the current comments/warnings might not be worded well enough.
2015-11-23 13:12:23 +01:00
Jonas Jenwald
b05652ca97
[api-minor] Let getAnnotations
fetch all annotations by default, unless an intent is specified
...
Currently `getAnnotations` will *only* fetch annotations that are either `viewable` or `printable`. This is "hidden" inside the `core.js` file, meaning that API consumers might be confused as to why they are not recieving *all* the annotations present for a page.
I thus think that the API should, by default, return *all* available annotations unless specifically told otherwise. In e.g. the default viewer, we obviously only want to display annotations that are `viewable`, hence this patch adds an `intent` parameter to `getAnnotations` that makes it possible to decide if only `viewable` or `printable` annotations should be fetched.
2015-11-22 15:51:37 +01:00
Jonas Jenwald
373da010ac
Move the globals
comments in bidi.js and metadata.js to after the Copyright comments
2015-11-21 18:43:08 +01:00
Yury Delendik
56ccaea99b
Move text layer building logic into src/display/text_layer.js
2015-11-19 10:50:27 -06:00
Yury Delendik
2f34fd46cb
Move CustomStyle.
2015-11-19 10:47:17 -06:00
Yury Delendik
194994a289
Merge pull request #6551 from yurydelendik/subaa
...
[api-minor] Enables subpixel anti-aliasing for most of the content.
2015-11-17 19:45:32 -06:00
Yury Delendik
8200f099a3
Fix chars scaling for standard fonts.
2015-11-17 13:21:27 -06:00
Yury Delendik
1d8800370a
Allow subpixel anti-aliasing for most of the content.
2015-11-16 10:50:02 -06:00
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: */
2015-11-14 07:32:18 +05:30
Yury Delendik
7381ff9523
Merge pull request #6599 from prometheansacrifice/generate-better-api-docs
...
Generate better API documentation
2015-11-12 14:26:18 -06:00
Manas
dbcb46c8de
Uses @alias to fix missing comments on JSDocs pages
2015-11-13 01:24:15 +05:30
Yury Delendik
601d29b14e
Fixes all examples to require workerSrc to be set.
2015-11-06 07:50:21 -06:00
Yury Delendik
fa46b73c47
Better spacing in text layer.
2015-11-02 08:54:15 -06:00
Brendan Dahl
b56b41514c
Merge pull request #6578 from yurydelendik/issue6577
...
Ignore any pending data when worker is terminated.
2015-10-29 11:49:40 -07:00
Yury Delendik
8d15ecb14b
Ignore any pending data when worker is terminated.
2015-10-29 13:06:22 -05:00
Tony Jin
ef667823dd
[api-minor] Add an optional param to DocumentInitParameters for specifying the range request chunk size to use. Defaults to 2^16 = 65536.
2015-10-26 17:22:11 -07:00
Jonas Jenwald
5bd95df427
Prevent TypeError: page is undefined
when the document has been destroyed (PR 6546 follow-up)
...
*Follow-up to PR 6546.*
If rendering has already started when the document is destroyed, then `this.pageCache[data.pageIndex]` may already have been cleared when the `StartRenderingPage`/`RenderPageChunk` messages are recieved in `api.js`, which results in `TypeError`s being thrown.
2015-10-23 22:16:34 +02:00
Yury Delendik
5135aa9bec
Adds deprecation warning for the API calls.
2015-10-23 09:06:32 -05:00
Yury Delendik
58c3ea0820
Adds thread abort capabilities.
2015-10-23 09:06:32 -05:00
Yury Delendik
59c13b32aa
Adds destroy method to the document loading task.
...
Also renames PDFPageProxy.destroy method to cleanup.
2015-10-23 08:57:14 -05:00
Jonas Jenwald
487ba9065a
Fail gracefully, and with a notification, if paintXObject is encountered in canvas.js
...
We should never actually try to execute `paintXObject` in canvas.js, but in some cases where we fail to parse the PDF file correctly it can happen. Currently this will potentially cause an entire page to fail to render, which seems suboptimal.
With this patch, we will instead continue rendering with a warning that things might not work correctly.
2015-10-21 21:30:59 +02:00
Jonas Jenwald
9ab896e307
[api-minor] Add an option to PDFJS for specifying the |target| attribute of external links
...
Replaces `PDFJS.openExternalLinksInNewWindow` with a more generic configuration option.
*Note:* `PDFJS.openExternalLinksInNewWindow = true;` is equal to `PDFJS.externalLinkTarget = PDFJS.LinkTarget.BLANK;`.
2015-10-13 21:52:00 +02:00
Tim van der Meij
dd9d0b8770
Merge pull request #5480 from CodingFabian/issue-5458
...
Remove TryCatch in canvas for EvenOdd winding rule.
2015-10-04 15:31:34 +02:00
Jonas Jenwald
9eab463b6d
Ensure that the baseTransform
is always defined for TilingPatterns
...
Fixes http://www2.emersonprocess.com/siteadmincenter/PM%20Micro%20Motion%20Documents/High-Pressure-Measurement-WP-001287.pdf#page=3 .
2015-09-27 22:49:34 +02:00
Fabian Lange
2564827503
Fix text spacing with vertical fonts ( #6387 )
...
According to the PDF spec 5.3.2, a positive value means in horizontal,
that the next glyph is further to the left (so narrower), and in
vertical that it is further down (so wider).
This change fixes the way PDF.js has interpreted the value.
2015-09-15 09:28:45 +02:00
Fabian Lange
063ca95f5f
Remove TryCatch in canvas fill
...
As verified by @Rob--W, the evenodd fill rule works correctly in all supported browsers. This now allows optimization by JS engines.
This fixes #5458
2015-09-05 11:10:51 +02:00
Jonas Jenwald
cfd5a64df5
Ensure that the clipping path is reset when the state is restored (issue 6413)
...
According to the specification, see `NOTE 2` in http://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/PDF32000_2008.pdf#G7.3882161 , it appears that we should ensure that the clipping path is reset when the restore (`Q`) operator is encountered.
Fixes 6413.
2015-09-03 17:35:32 +02:00
Vincent Castelain
0cd4cc4e80
api/getDocument : handle ArrayBuffer check for PDF binary data (byteLength)
2015-08-20 08:56:05 +02:00
Yury Delendik
c56dc9a093
Merge pull request #6141 from skalnik/fix-font-csp-issues
...
Provide a fallback for font rendering when not allowed to use `eval`
2015-08-18 18:50:11 -05:00
Mike Skalnik
341c5e9d1f
[PATCH] Add fallback for font loading when eval disabled
...
In some cases, such as in use with a CSP header, constructing a function with a
string of javascript is not allowed. However, compiling the various commands
that need to be done on the canvas element is faster than interpreting them.
This patch changes the font renderer to instead emit commands that are compiled
by the font loader. If, during compilation, we receive an EvalError, we instead
interpret them.
2015-08-13 14:33:18 -07:00
Jonas Jenwald
ee5ce4b4a2
Fix typo in drawFigures
, in webgl.js, which causes shadingPatterns with figure.type === triangles
to render incorrectly
...
The file `issue2948.pdf` from the test-suite can be used to (manually) test the patch.
2015-08-13 17:58:18 +02:00
Tim van der Meij
995c5ba205
Simplify annotation data passing
2015-07-19 14:02:49 +02:00
Tim van der Meij
465611a2ff
More cleanup regarding annotation border styles
2015-07-17 21:51:24 +02:00
Tim van der Meij
a2e9845093
Refactor annotation color handling and add unit tests
2015-07-15 18:49:19 +02:00
Rob Wu
f9dd7318f7
fontLoadPromises -> fontsToLoad
...
fontsToLoad is always an empty array, Promise.all should wait for
fontLoadPromises instead of fontsToLoad.
2015-07-06 17:31:42 +02:00
Brendan Dahl
98339f63a8
Merge pull request #5585 from timvandermeij/annotation-layer-borderstyle
...
Annotation border styles
2015-07-01 10:48:12 -07:00
Tim van der Meij
9550c00184
Transform old implementation to new implementation of border styles
2015-06-17 22:28:06 +02:00
Jonas Jenwald
75624c8d82
Clear the |getSinglePixelWidth| cache when rendering Type3 fonts (issue 6117)
...
Fixes 6117.
2015-06-17 14:30:32 +02:00
Jonas Jenwald
a64536901a
Increase the font weight used for non-embedded ArialBlack fonts
...
Currently non-embedded ArialBlack fonts are not rendered bold enough, compared to e.g. Adobe Reader.
The issue is that we set the font weight to `bolder`, but since that is actually relative to the font weight of the parent, the result is that there's no practical difference from just using `bold`.
This patch attempts to address that, by explicitly setting the font weight to the maximum value instead (see https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight ).
*Note:* I expect one test "failure" in `issue5801`, which in this case is an improvement, since that PDF file uses ArialBlack.
2015-06-06 21:29:41 +02:00
Yury Delendik
dd07ef9c6a
Disables rAF for the printing.
2015-05-12 08:44:42 -05:00
Tim van der Meij
6159da0598
Merge pull request #5828 from Rob--W/mozCurrentTransform-fix
...
Fix flaw in mozCurrentTransform polyfill
2015-04-29 19:27:02 +02:00
Jonas Jenwald
d762cad420
Fix the node getinfo.js example
...
This broke in PR 5366.
2015-03-17 14:26:58 +01:00
Jonas Jenwald
f7b3852dd5
Merge pull request #5843 from timvandermeij/svg-commands
...
Enable OPS.setHScale in the SVG backend
2015-03-16 12:50:07 +01:00
Tim van der Meij
989eac2f1e
Enable OPS.setHScale in the SVG backend
2015-03-16 00:37:31 +01:00
Jonas Jenwald
65a5543efe
Disable PresentationMode for certain problematic configurations
...
Instead of trying to hack around various browser defects, let's just disable PresentationMode in the affected browsers. This patch:
- Disables PresentationMode in IE11+ when the viewer is embedded; fixes 4711.
2015-03-13 22:09:36 +01:00
Rob Wu
6eb9e6a6a4
Fix flaw in mozCurrentTransform polyfill
...
Set transformation matrix in (polyfilled) mozPrintCallback when a scale
is applied. Removed _scaleX and _scaleY in favor of _transformMatrix to
emphasize that the caller MUST ensure that the state of the matrix is
correct before `addContextCurrentTransform` is called.
2015-03-11 20:55:26 +01:00
Jonas Jenwald
00ee6bd6b6
Merge pull request #5693 from collinanderson/whitespace
...
cleaned whitespace
2015-02-28 10:09:21 +01:00
Mike Lyons
d271811740
Add option to open external links in new window
2015-02-26 13:34:08 -05:00
Collin Anderson
54e984c763
cleaned whitespace
2015-02-17 11:07:37 -05:00
Jonas Jenwald
daba13aebb
Amend the docs for |disableAutoFetch| to mention that streaming must also be disabled
2015-01-14 18:33:12 +01:00
Yury Delendik
81649b00a9
Base64 example and be more flexible what type of data is passed.
2015-01-12 14:52:52 -06:00
Brendan Dahl
6ceb652abb
Merge pull request #5554 from yurydelendik/apiref
...
Refactors getDocument and adds PDFDataRangeTransport.
2015-01-08 14:24:38 -08:00
Yury Delendik
3a61edfcae
Refactors getDocument and adds PDFDataRangeTransport.
2015-01-05 21:45:01 -06:00
Jonas Jenwald
406b57fae4
Merge pull request #5569 from timvandermeij/annotation-rewrite-1
...
Remove unused annotation highlight div
2014-12-23 11:17:20 +01:00
Yury Delendik
96647877ec
Merge pull request #4615 from Snuffleupagus/canvas-enforce-min-line-width
...
Enforce minimum line widths
2014-12-21 22:12:45 -06:00
Tim van der Meij
c67ad28673
Remove unused annotation highlight div
...
This is now done using CSS. For annotation-heavy documents this change makes the DOM much lighter.
2014-12-21 17:38:22 +01:00
Tim van der Meij
6e994b15e2
Merge pull request #5214 from CodingFabian/optimize-annotation-layer
...
Improves rendering performance of annotation layers.
2014-12-21 16:50:36 +01:00
Fabian Lange
979635138a
Improves rendering performance of annotation layers.
...
This change does the following:
* Address TODO to remove getEmptyContainer helper.
* Not set container bg-color. The old code is incorrect, causing it to
not have any effect. It sets color to an array (item.color) rather
css string. Also in most cases it would set it to black background
which is incorrect.
* only add border instructions when there is actually a border
* reduce memory consumption by not creating new 3 element arrays for
annotation colors. In fact according to spec, this would be incorrect,
as the default should be "transparent" for an empty array. Adobe
Reader interprets a missing color array as black however.
Note that only Link annotations were actually setting a border style and
color. While Text annotations might have calculated a border they did
not color it. This behaviour is now controlled by the boolean flag.
2014-12-20 22:49:58 +01:00
Jonas Jenwald
fc1e2483b4
Enforce minimum line widths
2014-12-20 18:05:55 +01:00
Yury Delendik
a018e933ea
Merge pull request #5446 from CodingFabian/minorImprovementsInCanvasjs
...
minor improvements and code cleanup for canvas.js
2014-12-18 15:05:52 -06:00
Fabian Lange
5405b1c8e4
minor improvements and code cleanup for canvas.js
2014-12-18 21:59:40 +01:00
Yury Delendik
35474628e3
Merge pull request #5449 from CodingFabian/preferParamsOverArguments
...
Use 3 param method for converting r,g,b into css string.
2014-12-08 15:23:12 -06:00
Fabian Lange
ceffeab1de
Use 3 param method for converting r,g,b into css string.
...
This avoids creation of temporary arrays to pass them into the util
method. Also using "arguments" is more expensive then passing in 3
parameters.
2014-12-05 19:25:02 +01:00
Yury Delendik
a3df129e32
Merge pull request #5524 from fkaelberer/increaseSMaskChunkSizeTo1M
...
Increases chunk size in SMask composition to 1M pixels
2014-12-05 08:42:06 -08:00
fkaelberer
7d698a46a9
increase chunk size in SMask composition to 1M pixels
2014-12-03 10:25:53 +01:00
Fabian Lange
b049119d14
removed rounding of values in composeSMaskLuminosity
...
maskData comes out of maskCtx.getImageData, so is 0..255 clamped, and
the used multiplications will not create fractions needing rounding,
neither would addition.
2014-12-02 22:25:54 +01:00
jsundn
2ec7e34541
Fixes typo in webgl.js
2014-11-18 14:31:19 +01:00
Yury Delendik
1bf72f3fe8
Merge pull request #5409 from thejdeep/master
...
Black text not visible #5291
2014-10-25 09:21:08 -05:00
thejdeep
39a29cfe03
Fixed text not visible
2014-10-25 07:18:31 +05:30
Jonas Jenwald
4ac4d49158
Avoid rendering invisible Type3 fonts (issue 5421)
2014-10-18 22:29:21 +02:00
Tim van der Meij
b215af30d3
Require destinations when they are needed and do not fetch all of them in advance
2014-10-06 22:26:18 +02:00
Yury Delendik
fb6d87c77b
Merge pull request #5376 from yurydelendik/fontface3
...
Adds optional argument to FontFace contructor call.
2014-10-01 18:50:30 -05:00
Yury Delendik
8bec7ea8bd
Adds optional argument to FontFace contructor call.
2014-10-01 18:15:23 -05:00
Jonas Jenwald
cb3e5903cb
Fix disableAutoFetch regression in the generic viewer
...
After PR 5263, setting `disableAutoFetch = true` in the generic viewer no longer works correctly, since the entire file loads even with `disableStream = true`.
2014-10-01 20:53:17 +02:00
Rob Wu
d0845df971
Use Font Loading API if available
...
http://dev.w3.org/csswg/css-font-loading/
2014-09-30 22:18:53 +02:00
Rob Wu
6a230af332
Rename FontFace to FontFaceObject
...
This name clashes with the FontFace constructor from the Font Loading CSS module:
http://dev.w3.org/csswg/css-font-loading/#font-face-constructor
2014-09-30 19:33:16 +02:00
Yury Delendik
c3f191a27c
Implement streaming using moz-chunk-arraybuffer
2014-09-19 19:05:25 -05:00
Jonas Jenwald
ed5fc43510
Add |UnexpectedResponseException| to fix the exception handling when file loading fails because the server responds with a non 404 status message
2014-09-14 11:52:33 +02:00
Jonas Jenwald
ca027ebfdb
Fix the exception propagation when rejecting workerReadyCapability
...
Currently when an exception is thrown, we try to reject `workerReadyCapability` with multiple arguments in src/core/api.js. This obviously doesn't work, hence this patch changes that to instead reject with the exception object as is.
In src/core/worker.js the exception is currently (unncessarily) wrapped in an object, so this patch also simplifies that to directly send the exception object instead.
2014-09-08 22:20:41 +02:00
Jonas Jenwald
64d95bedaa
In src/display/api.js, add documentation for the |progressCallback| parameter in |PDFJS.getDocument|
2014-08-28 14:11:14 +02:00
Yury Delendik
be998261cc
Fixes Type3 negative font direction
2014-08-18 17:57:52 -05:00
Yury Delendik
90d79d1577
Merge pull request #5198 from timvandermeij/svg-paintformxobject
...
Implements paintFormXObject in svg.js
2014-08-15 16:29:30 -05:00
Tim van der Meij
32853c07f4
Implements paintFormXObject in svg.js
2014-08-15 23:23:04 +02:00
Tim van der Meij
1d02ace81f
Optimizes defaults for svg.js
2014-08-14 23:14:55 +02:00
Yury Delendik
de23d3791e
Fixes image and font embedding
2014-08-14 15:11:27 -05:00
Yury Delendik
0f862e7eb3
Adds svg.js to the generic and singlefile builds
2014-08-14 13:02:30 -05:00
Yury Delendik
bc574aa629
Refactors SVG api
2014-08-14 12:56:11 -05:00
pramodhkp
6d53fc4db7
Minor changes for api.js, font_loader.js and svg.js
2014-08-14 01:01:09 +05:30
Tim van der Meij
44fbf0ce14
Miscellaneous code improvements for svg.js
2014-08-13 20:31:21 +02:00
Yury Delendik
dae92b9cc7
Uses float number formatter to print numbers in SVG
2014-08-11 11:18:32 -05:00
Tim van der Meij
b6e4ac9070
Nit fixes for svg.js
2014-08-10 14:40:49 +02:00
Yury Delendik
99b08ed223
Merge pull request #5162 from yurydelendik/pramodhkp-fixupgstate2
...
[SVG] Reduces amount of used memory during PNG creation.
2014-08-09 15:56:11 -05:00
Yury Delendik
56f0539045
Reduces amount of used memory during PNG creation.
2014-08-09 15:53:05 -05:00
pramodhkp
458b69b649
Adds image and mask features, fixes clippath
2014-08-10 01:06:43 +05:30
Jonas Jenwald
4a82dac45b
Add strict equalities in src/display/svg.js
2014-08-01 12:41:03 +02:00
Jonas Jenwald
790ec92a34
Add strict equalities in src/display/pattern_helper.js
2014-08-01 12:40:38 +02:00
Jonas Jenwald
ec6ec13506
Add strict equalities in src/display/metadata.js
2014-08-01 12:40:16 +02:00
Jonas Jenwald
c1f1f2f0e1
Add strict equalities in src/display/canvas.js
2014-08-01 12:39:56 +02:00
Jonas Jenwald
a4b06d7a02
Add strict equalities in src/display/api.js
2014-08-01 12:39:31 +02:00
Yury Delendik
7026543663
Merge pull request #5059 from timvandermeij/unused-code
...
Removing unused code and enforcing additional JSHint options
2014-07-29 15:04:43 -05:00
Yury Delendik
1e21bac9d3
Merge pull request #5077 from Snuffleupagus/issue-5039
...
Fix loading of PDF files with invalid or missing Type3 characters (issue 5039)
2014-07-25 14:34:51 -05:00
Yury Delendik
5d4eebc6a7
Merge pull request #5034 from pramodhkp/fixupgstate2
...
[SVG] Adds clip operator, fixes setGState, fill, stroke operators
2014-07-25 13:52:29 -05:00
pramodhkp
6e4dd83a4d
Added endPath, endText. fixes extra <g> elements
2014-07-25 23:30:29 +05:30
pramodhkp
2380b38b27
Fixed setGState, viewport transform
2014-07-25 23:21:23 +05:30
pramodhkp
a55c9856e9
Misc variable initialization
2014-07-25 23:21:23 +05:30
pramodhkp
0688fd3d70
Added fill, stroke, line-join & font attr
2014-07-25 23:20:55 +05:30
pramodhkp
03f1de3403
Added clip operator
2014-07-25 23:13:52 +05:30
Jonas Jenwald
2485f11829
Fix loading of PDF files with invalid or missing Type3 characters (issue 5039)
2014-07-24 15:03:22 +02:00
Tim van der Meij
34728ee49b
Removing unused code
2014-07-18 22:34:50 +02:00
Tim van der Meij
4be90c35f8
Merge pull request #5021 from CodingFabian/issue-5020
...
Fixes mesh fill pattern with optional matrix
2014-07-18 20:51:44 +02:00
Tim van der Meij
a7800c276b
Merge pull request #5015 from Snuffleupagus/zero-WebGL-canvases
...
Zero the height and width of the WebGL canvases on cleanup
2014-07-16 17:07:18 +02:00
Fabian Lange
dd2adf6200
Fixes mesh fill pattern with optional matrix ( #5020 )
...
In the referenced issue, there is a PDF which uses a fill pattern which does not
have a matrix defined. This causes singularValueDecompose2dScale to fail with
undefined property error when accessing elements of that matrix.
This fix will only use the matrix when it is defined. The output for the PDF in
question now looks identical to chrome and preview with respect to the gradient
fill pattern.
2014-07-13 15:45:12 +02:00
pramodhkp
afd853e962
Added units for lengths
2014-07-08 23:03:17 +05:30
pramodhkp
86e584d767
Memory optimzation for constructPath
2014-07-04 20:43:40 +05:30
pramodhkp
7efd50e64d
Added paintJpegXObject
2014-06-25 03:55:14 +05:30
pramodhkp
d799a18b74
Added paintSolidColorImageMask
2014-06-25 02:48:11 +05:30
pramodhkp
c8a4ab3a19
Optimization of save/restore usage
2014-06-25 02:47:29 +05:30
pramodhkp
8407d28c9e
Combine re element into constructPath
2014-06-25 00:27:42 +05:30
Jonas Jenwald
8ad1ea3c5f
Zero the height and width of the WebGL canvases on cleanup
2014-06-24 13:52:22 +02:00
Yury Delendik
834f466c05
Fixes SVG transforms on restore
2014-06-19 23:18:04 -05:00
pramodhkp
dd253aadeb
SVG Viewer example demo
2014-06-20 08:25:05 +05:30
Yury Delendik
c1c950ce74
Fixes AnnotationUtils in the extension build
2014-06-18 16:42:08 -05:00
Yury Delendik
bdeca30fbf
Splits shared/annotation.js into core/ and display/
2014-06-17 17:43:33 -05:00
Yury Delendik
0f0f0688a1
Merge pull request #4946 from Snuffleupagus/issue-3862
...
Refactor fake worker loading (issue 3862)
2014-06-17 13:27:01 -05:00
Yury Delendik
ea16723448
Merge pull request #4951 from pramodhkp/getoperatorlist
...
Added getOperatorList to api.js
2014-06-17 09:39:09 -05:00
pramodhkp
1d00e9d13c
Added getOperatorList to api.js
2014-06-18 01:30:42 +05:30
Yury Delendik
11302f09a4
Merge pull request #4959 from nnethercote/zero-cache-canvases
...
Zero the height and width of cached canvases before deleting them.
2014-06-17 08:26:04 -05:00
Nicholas Nethercote
7ef7f95374
Zero the height and width of the Cached canvases before deleting.
...
This reduces peak RSS by about 300 MiB on my Mac when scrolling slowly through
the first 30 pages of a scanned black and white document.
2014-06-16 22:58:11 -07:00
Yury Delendik
0cd28ebfa3
Telemetry for used stream and font types
2014-06-16 16:41:04 -05:00
Jonas Jenwald
3c78c7b8bc
Refactor fake worker loading (issue 3862)
2014-06-15 15:52:05 +02:00
Samuel Chantaraud
952545e20f
Limit the size of canvases to 5MP (iOS restriction)
2014-06-12 17:58:58 -04:00
Yury Delendik
1ac8ca66f7
Fixes optional backdrop regression
2014-06-10 15:47:25 -05:00
p01
e0bf7e2151
Optimized genericComposeSMask
...
Declaring the composition and backgdrop functions outside of genericComposeSMask
is more efficient.
2014-06-10 12:37:39 +02:00
p01
412febe4a4
canvas.js minor optimizations
2014-06-10 12:37:39 +02:00
p01
35e418c603
Optimized CanvasGraphics_executeOperatorList 66% faster
2014-06-10 12:37:38 +02:00
Mohammed Abu-alsaad
e6546642db
Added more preference variables from the available hash parameters
2014-05-30 10:44:41 +12:00
Jonas Jenwald
7e6cdc74af
Merge pull request #4832 from yurydelendik/showtext
...
Refactors showText: split type3, remove showSpacedText
2014-05-29 12:58:09 +02:00
Yury Delendik
542c9c4c7a
Moves ColorSpace logic into evaluator
2014-05-23 14:11:47 -05:00
Yury Delendik
d53dc2e7d6
Refactors showText: split type3, remove showSpacedText
2014-05-23 13:36:54 -05:00
Jonas Jenwald
fe27a76004
Merge pull request #4815 from yurydelendik/loadFont
...
Refactors loadFont for translateFont be async
2014-05-20 21:30:42 +02:00
p01
455c6b2d35
Removed several 'in' operators in canvas.js
...
This gives up to 6x speed improvement on these methods
2014-05-20 12:39:59 +02:00
p01
cf5ff3d327
Fewer lookups in CanvasGraphics_constructPath
2014-05-20 12:39:58 +02:00
Yury Delendik
e5a0d89da9
Refactors loadFont for translateFont be async; fixes type3 dup data
2014-05-19 16:27:54 -05:00
Yury Delendik
048c6d99f1
Merge pull request #4736 from Snuffleupagus/glyph-accent-buildPath
...
Build paths for glyph accents when drawing text as curves
2014-05-14 07:40:50 -05:00
Jonas Jenwald
c4d4682924
Fix regression that prevents downloading the PDF file (PR 4752)
2014-05-14 01:20:21 +02:00
Jonas Jenwald
b907e15a90
Build paths for glyph accents when drawing text as curves
2014-05-14 00:04:44 +02:00
Jonas Jenwald
44cd0f4a76
Merge pull request #4752 from yurydelendik/refmsghdlr
...
Refactors MessageHandler.send to remove callbacks
2014-05-13 22:47:04 +02:00
Yury Delendik
2acb40fffb
Merge pull request #4771 from Snuffleupagus/api-promise-reject-fix
...
Fix typo when rejecting Promise in getPage
2014-05-10 07:48:30 -05:00
Tim van der Meij
e359f0694f
Merge pull request #4740 from yurydelendik/pageviewportdoc
...
Adds pageviewport documentation
2014-05-09 22:30:16 +02:00
Yury Delendik
fd4fc89213
Merge pull request #4763 from yurydelendik/canvas-rAF
...
Uses rAF to interrupt the operator list execution
2014-05-09 07:25:52 -05:00
Yury Delendik
c5eb058b09
Uses rAF to interrupt the operator list execution
2014-05-09 07:00:47 -05:00
Yury Delendik
a26d28a393
Merge pull request #4683 from yurydelendik/grouppath
...
Groups path commands into single operation
2014-05-08 22:16:58 -05:00
Yury Delendik
cc9643cf32
Refactors GetAnnotationsRequest and GetPageRequest
2014-05-08 15:02:53 -05:00
Yury Delendik
2008f74185
Refactors MessageHandler.send to remove callbacks
2014-05-07 18:15:25 -05:00
Jonas Jenwald
652dde48da
Fix typo when rejecting Promise in getPage
2014-05-07 23:25:24 +02:00