Jonas Jenwald
16dbf5dcfd
Merge pull request #18031 from Snuffleupagus/issue-18030
...
[api-minor] Expose the /Desc-attribute of file attachments in the viewer (issue 18030)
2024-05-01 17:53:22 +02:00
Jonas Jenwald
3ff93ede07
Bump library version to 4.3
2024-05-01 17:00:14 +02:00
calixteman
96ce111e0c
Merge pull request #18029 from calixteman/simplify_smask
...
[api-minor] Remove the use of (get/put)ImageData when drawing SMasks (bug 1874013)
2024-05-01 16:12:43 +02:00
Calixte Denizet
82989e6790
[api-minor] Remove the use of (get/put)ImageData when drawing SMasks (bug 1874013)
...
and implement then in using some SVG filters and composition.
Composing in using destination-in in order to multiply RGB components by
the alpha from the mask isn't perfect: it'd be a way better to natively have
alpha masks support, it induces some small rounding errors and consequently
computed RGB are approximatively correct.
In term of performance, it's a real improvement, for example, the pdf in
issue #17779 is now rendered in few seconds.
There are still some room for improvement, but overall it should be a way
better.
2024-05-01 15:40:44 +02:00
Jonas Jenwald
bf4e36d1b5
[api-minor] Expose the /Desc-attribute of file attachments in the viewer (issue 18030)
...
In the viewer this will be displayed in the `title` of the hyperlink, which is probably the best we can do here given how the viewer is implemented.
2024-05-01 09:02:11 +02:00
Tim van der Meij
77e2182b8e
Merge pull request #18019 from Aditi-1400/safari-zoom-fix
...
Fix rendering problem when zooming on Safari
2024-04-30 14:50:46 +02:00
Tim van der Meij
716ac7eae8
Merge pull request #18024 from timvandermeij/updates
...
Update dependencies and translations to the most recent versions
2024-04-30 13:58:36 +02:00
Tim van der Meij
9dcb2b3844
Update translations to the most recent versions
2024-04-29 19:57:19 +02:00
Tim van der Meij
9872de1415
Upgrade postcss-discard-comments
to version 7.0.0
...
This is a major version bump, but the changelog at
https://github.com/cssnano/cssnano/releases/tag/cssnano%407.0.0
doesn't indicate any breaking changes that should impact us.
2024-04-29 19:55:38 +02:00
Tim van der Meij
89f41e527d
Update dependencies to the most recent versions
2024-04-29 19:52:37 +02:00
Tim van der Meij
1241758605
Merge pull request #18023 from timvandermeij/bump
...
Bump the stable version in `pdfjs.config`
2024-04-29 19:33:55 +02:00
Tim van der Meij
a6271e47b2
Bump the stable version in pdfjs.config
2024-04-29 19:30:03 +02:00
Tim van der Meij
49b388101a
Merge pull request #18001 from Snuffleupagus/api-pageRefCache
...
[api-minor] Move the page reference/number caching into the API
2024-04-29 19:10:06 +02:00
Jonas Jenwald
150964dd6d
Remove unnecessary check from PDFLinkService.goToDestination
(PR 17984 follow-up)
...
After the changes in PR 17984 this code can no longer be reached, since the destination is now validated on the worker-thread.
2024-04-29 18:54:09 +02:00
Jonas Jenwald
f6cd03955b
[api-minor] Move the page reference/number caching into the API
...
Rather than having to handle this *manually* throughout the viewer, this functionality can instead be moved into the API which simplifies the code slightly.
2024-04-29 18:54:06 +02:00
Jonas Jenwald
fa69d9a3bc
Inline the helper method in PDFLinkService.goToDestination
...
We no longer need the helper method to *potentially* call itself once data is available, and can instead take full advantage of async/await by inlining the code.
2024-04-29 18:52:12 +02:00
Tim van der Meij
3052e99f65
Merge pull request #18013 from Snuffleupagus/SimpleLinkService-extends-PDFLinkService
...
Re-factor `SimpleLinkService` to extend `PDFLinkService`
2024-04-29 18:41:53 +02:00
Jonas Jenwald
2b2ade7883
Merge pull request #18018 from Snuffleupagus/CompiledFont-tweak-caching
...
Reduce code-duplication when caching data in `CompiledFont.getPathJs`
2024-04-29 17:39:35 +02:00
Jonas Jenwald
627fe2d826
Merge pull request #18017 from Snuffleupagus/validate-widths
...
Add more validation of width-data
2024-04-29 14:17:23 +02:00
Aditi
04580168a2
Fix rendering problem when zooming on Safari
2024-04-29 17:32:06 +05:30
Jonas Jenwald
85ff8f34e2
Reduce code-duplication when caching data in CompiledFont.getPathJs
2024-04-29 13:18:31 +02:00
Jonas Jenwald
d411a072a4
Add more validation of width-data
...
The current `PartialEvaluator.extractWidths` implementation only contains *partial* validation of the width-data.
2024-04-29 10:51:16 +02:00
Jonas Jenwald
234067e745
Merge pull request #18014 from Snuffleupagus/validate-font-properties
...
Validate additional font-dictionary properties
2024-04-29 10:01:48 +02:00
Jonas Jenwald
08eb0566f7
Validate additional font-dictionary properties
2024-04-29 08:21:28 +02:00
calixteman
85e64b5c16
Merge pull request #18015 from calixteman/rm_eval_font_loader
...
Simplify the way to pass the glyph drawing instructions from the worker to the main thread
2024-04-28 23:27:47 +02:00
Jonas Jenwald
8c3d571939
Re-factor SimpleLinkService
to extend PDFLinkService
...
Rather than having to maintain a dummy `IPDFLinkService` implementation, we can simply let it extend the primary `PDFLinkService` class instead.
Note how *some* methods already checked for an active PDF document, and those checks only needed to be used consistently throughout `PDFLinkService` in order for this to work.
2024-04-28 10:18:41 +02:00
Calixte Denizet
551e63901c
Simplify the way to pass the glyph drawing instructions from the worker to the main thread
...
and remove the use of eval in the font loader.
2024-04-27 21:28:31 +02:00
Nicolò Ribaudo
e561a4af3c
Pin GitHub actions to Node.js 21
...
Node.js 22 was just released, and it seems like it's not compatible
with the `canvas` package. This commit pins the version on GitHub
actions to Node.js 21 as a temporary workaround.
This commit should be reverted once
https://github.com/Automattic/node-canvas/issues/2377
is fixed.
2024-04-26 19:23:16 +02:00
calixteman
90d4b9c2c0
Merge pull request #17868 from calixteman/interpolate_flag
...
Always enable smoothing when rendering downscaled image
2024-04-24 20:16:01 +02:00
Calixte Denizet
b511878ba7
Always enable smoothing when rendering downscaled image
...
and rely on the Interpolate flag only when the image is upscaled.
Fixes #16273 .
2024-04-24 18:33:21 +02:00
calixteman
d1f494d68c
Merge pull request #17986 from calixteman/fix_struct_tree
...
Allow to insert several annotations under the same parent in the structure tree
2024-04-24 18:32:00 +02:00
Tim van der Meij
885dd72433
Merge pull request #17984 from Snuffleupagus/issue-17981
...
Validate explicit destinations on the worker-thread to prevent `DataCloneError` (issue 17981)
2024-04-24 16:25:02 +02:00
Calixte Denizet
45fa867577
Allow to insert several annotations under the same parent in the structure tree
...
While testing stamp insertion with the added pdf, I noticed that the tags using a MCID
weren't considered when trying to attach an annotation to it.
2024-04-24 16:23:05 +02:00
Tim van der Meij
7d1eabe2bd
Merge pull request #17969 from timvandermeij/integration-tests-timeout-annotations
...
Remove all `waitForTimeout` usage from the annotation integration tests
2024-04-24 16:14:54 +02:00
calixteman
dafc4f66c2
Merge pull request #17999 from calixteman/issue17998
...
Set correctly the change property for the event triggered when a choice list is changed
2024-04-24 16:07:28 +02:00
Tim van der Meij
10641d5af0
Remove all waitForTimeout
usage from the annotation integration tests
...
This commit replaces all `waitForTimeout` occurrences with the
appropriate `waitForFunction` calls. Note that in some places they were
already present, so in those cases we could simply remove the
`waitForTimeout` call altogether.
2024-04-24 16:05:37 +02:00
Calixte Denizet
55808238e4
Set correctly the change property for the event triggered when a choice list is changed
...
It fixes #17998 .
2024-04-24 14:48:22 +02:00
Tim van der Meij
bda98b91cb
Merge pull request #17967 from Snuffleupagus/eventBus-signal
...
Add `signal`-support in the `EventBus`, and utilize it in the viewer (PR 17964 follow-up)
2024-04-23 15:55:59 +02:00
Jonas Jenwald
7206d0a237
Validate explicit destinations on the worker-thread to prevent DataCloneError
(issue 17981)
...
*Note:* This borrows a helper function from the viewer, however the code cannot be directly shared since the worker-thread has access to various primitives.
2024-04-22 22:51:35 +02:00
Tim van der Meij
522af265a7
Merge pull request #17977 from Snuffleupagus/parseImageProperties-TypedArray
...
Update `JpxImage.parseImageProperties` to support TypedArray data in IMAGE_DECODERS builds
2024-04-22 18:31:31 +02:00
Jonas Jenwald
9e80c6d228
Merge pull request #17978 from Snuffleupagus/pr-17428-followup
...
Extend the globally cached image main-thread copying to "complex" images as well (PR 17428 follow-up)
2024-04-22 16:46:23 +02:00
calixteman
f6b0413506
Merge pull request #17985 from calixteman/openjpeg_warn
...
Use the pdf.js warn when using jpx decoder
2024-04-22 16:06:13 +02:00
Calixte Denizet
55f943c4fa
Use the pdf.js warn when using jpx decoder
...
Fixes #17980 .
2024-04-22 16:02:45 +02:00
Tim van der Meij
335d8394cd
Merge pull request #17979 from Snuffleupagus/image-errors-shorter-msg
...
[api-minor] Remove the image-related error message prefixes
2024-04-22 15:35:10 +02:00
calixteman
c22e64cd05
Merge pull request #17983 from calixteman/openjpeg_simd
...
Improve jpx decoding by around 20% in enabling simd support when compiling OpenJPEG
2024-04-22 15:33:02 +02:00
Tim van der Meij
22c27f8520
Merge pull request #17972 from timvandermeij/updates
...
Update dependencies and translations to the most recent versions
2024-04-22 15:32:10 +02:00
calixteman
9d891883b7
Merge pull request #17970 from calixteman/delete_from_xref
...
Correctly update the xref table when an annotation is deleted
2024-04-22 15:22:01 +02:00
calixteman
0867a1f9bc
Merge pull request #17973 from calixteman/no_contextmenu_resize
...
[Editor] Don't show the context menu when resizing
2024-04-22 15:13:26 +02:00
Calixte Denizet
c730a50540
Improve jpx decoding by around 20% in enabling simd support when compiling OpenJPEG
2024-04-22 13:08:47 +02:00
Jonas Jenwald
32b885c5ef
Remove event listeners with signal
in web/annotation_layer_builder.js and web/text_highlighter.js
2024-04-21 09:41:21 +02:00