Yury Delendik
6b60c8f4db
Adds UMD headers to core, display and shared files.
9 years ago
Yury Delendik
15c9969abe
Adds transfer function support for SMask.
10 years ago
Yury Delendik
d4843ebf6d
Fixes canvas state after smask group ends.
10 years ago
Daan Sprenkels
a9081653fc
shading-pattern: While drawing patterns, transform to the baseTransform first
10 years ago
Yury Delendik
c9cb6a3025
Replaces UnsupportedManager with callback.
10 years ago
Yury Delendik
8200f099a3
Fix chars scaling for standard fonts.
10 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
fa46b73c47
Better spacing in text layer.
10 years ago
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.
10 years ago
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 .
10 years ago
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.
10 years ago
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
10 years ago
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.
10 years ago
Jonas Jenwald
75624c8d82
Clear the |getSinglePixelWidth| cache when rendering Type3 fonts (issue 6117)
...
Fixes 6117.
10 years ago
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.
10 years ago
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.
10 years ago
Collin Anderson
54e984c763
cleaned whitespace
10 years ago
Jonas Jenwald
fc1e2483b4
Enforce minimum line widths
10 years ago
Fabian Lange
5405b1c8e4
minor improvements and code cleanup for canvas.js
10 years ago
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.
11 years ago
fkaelberer
7d698a46a9
increase chunk size in SMask composition to 1M pixels
11 years ago
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.
11 years ago
thejdeep
39a29cfe03
Fixed text not visible
11 years ago
Jonas Jenwald
4ac4d49158
Avoid rendering invisible Type3 fonts (issue 5421)
11 years ago
Yury Delendik
be998261cc
Fixes Type3 negative font direction
11 years ago
Jonas Jenwald
c1f1f2f0e1
Add strict equalities in src/display/canvas.js
11 years ago
Jonas Jenwald
2485f11829
Fix loading of PDF files with invalid or missing Type3 characters (issue 5039)
11 years ago
Tim van der Meij
34728ee49b
Removing unused code
11 years ago
pramodhkp
8407d28c9e
Combine re element into constructPath
11 years ago
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.
11 years ago
Yury Delendik
1ac8ca66f7
Fixes optional backdrop regression
11 years ago
p01
e0bf7e2151
Optimized genericComposeSMask
...
Declaring the composition and backgdrop functions outside of genericComposeSMask
is more efficient.
11 years ago
p01
412febe4a4
canvas.js minor optimizations
11 years ago
p01
35e418c603
Optimized CanvasGraphics_executeOperatorList 66% faster
11 years ago
Yury Delendik
542c9c4c7a
Moves ColorSpace logic into evaluator
11 years ago
Yury Delendik
d53dc2e7d6
Refactors showText: split type3, remove showSpacedText
11 years ago
p01
455c6b2d35
Removed several 'in' operators in canvas.js
...
This gives up to 6x speed improvement on these methods
11 years ago
p01
cf5ff3d327
Fewer lookups in CanvasGraphics_constructPath
11 years ago
Yury Delendik
e5a0d89da9
Refactors loadFont for translateFont be async; fixes type3 dup data
11 years ago
Jonas Jenwald
b907e15a90
Build paths for glyph accents when drawing text as curves
11 years ago
Yury Delendik
c5eb058b09
Uses rAF to interrupt the operator list execution
11 years ago
p01
83cd530f45
Cleaner putBinaryImageData
11 years ago
Yury Delendik
63d5aae3f6
Groups path commands into single command
11 years ago
Rob Wu
2e97c0d085
Remove some unused variables from src/
...
Only obviously useless, local variables have been removed.
11 years ago
Yury Delendik
a00f854848
Refactors buildImage to use Promise; don't draw bad images
11 years ago
Tim van der Meij
4e055169ed
Fixes lint warning W004 in src/display/{api, canvas, pattern_helper}.js
11 years ago
Brendan Dahl
5bd8a83c9b
Build the text layer geometry on the worker.
11 years ago
Yury Delendik
f57c6935d7
Implements WebGL support
11 years ago
Yury Delendik
944219ad8a
Balance smask process chunking
11 years ago