calixteman
cd4a30341f
Merge pull request #19685 from calixteman/issue19424
...
[Editor] Take into account the parent rotation when switch to edit mode (issue #19424 )
2025-03-19 15:15:25 +01:00
Calixte Denizet
276c8f3518
[Editor] Take into account the parent rotation when switch to edit mode (issue #19424 )
2025-03-19 14:26:55 +01:00
Jonas Jenwald
1a39e2dac1
Merge pull request #19684 from Snuffleupagus/issue-19683
...
Improve `addSignatureDescription`/`editSignatureDescription` handling (issue 19683)
2025-03-19 13:43:54 +01:00
Jonas Jenwald
79058c92e3
Improve addSignatureDescription
/editSignatureDescription
handling (issue 19683)
...
- Point the `addSignatureDescription` respectively `editSignatureDescription` labels to their actual `input`-elements (this way clicking the label will actually focus the input).
- Add the event listener to the `addSignatureDescription`-input, rather than its `span`-element (this is consistent with the `editSignatureDescription` case).
- Correctly check if the `addSignatureDescription`-input is empty, since we're accidentally comparing with its `span`-element.
- Remove unbalanced, and likely accidentally added, `</span>` tags.
2025-03-19 11:38:56 +01:00
Jonas Jenwald
028e4f7ea8
[api-minor] Add a basic AbortSignal.any
polyfill in PDF.js legacy
builds
...
This is an admittedly very basic polyfill, to allow us to remove a bunch of inline feature testing, that I've thrown together based on reading https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal/any_static and related MDN articles.
Compared to PR 19218 it's obviously much more "primitive", however the implementation is simple and it doesn't suffer from any licensing issues (since I wrote the code myself).
2025-03-18 10:54:49 +01:00
Jonas Jenwald
00e3a4d87a
Merge pull request #19674 from Snuffleupagus/core-document-more-async
...
Introduce more `async` code in the `src/core/document.js` file
2025-03-17 21:40:16 +01:00
Jonas Jenwald
6243afa85e
Merge pull request #19675 from Snuffleupagus/IccColorSpace-fetchSync
...
Introduce a `fetchSync` helper function for the `IccColorSpace` classes
2025-03-17 20:22:00 +01:00
Jonas Jenwald
2f1497c9c4
Merge pull request #19677 from Snuffleupagus/issue-19676
...
For JPEG images with CMYK-data, ensure that the alpha-component is set correctly when WebAssembly is disabled (issue 19676)
2025-03-17 20:17:00 +01:00
Jonas Jenwald
afb14bdc0b
For JPEG images with CMYK-data, ensure that the alpha-component is set correctly when WebAssembly is disabled (issue 19676)
2025-03-17 16:15:32 +01:00
Jonas Jenwald
1fb6edc713
Introduce a fetchSync
helper function for the IccColorSpace
classes
...
This reduces code duplication a tiny bit, which shouldn't hurt.
2025-03-17 14:58:53 +01:00
Jonas Jenwald
e37236e9af
Merge pull request #19673 from Snuffleupagus/rm-ftl-comment
...
Remove documentation for unused l10n variable (PR 18492 follow-up)
2025-03-17 14:28:12 +01:00
Jonas Jenwald
d00482380a
Introduce more async
code in the src/core/document.js
file
2025-03-17 13:20:51 +01:00
Jonas Jenwald
e5e0856f99
Remove documentation for unused l10n variable (PR 18492 follow-up)
...
Looking at PR 18492 it doesn't seem that the `$percent` variable, for the `pdfjs-editor-new-alt-text-ai-model-downloading-progress` l10n-string, was ever used.
2025-03-17 12:20:30 +01:00
Tim van der Meij
92d7b6d09f
Merge pull request #19671 from timvandermeij/integration-tests-signature-intermittent
...
Fix the "Signature Editor Basic operations must check copy and paste" integration test
2025-03-16 21:35:25 +01:00
Tim van der Meij
2a4f970e00
Fix the "Signature Editor Basic operations must check copy and paste" integration test
...
This integration test fails intermittently because of concurrent
clipboard access due to running the test in parallel in both browsers.
It can be reproduced by introducing `await waitForTimeout(1000)` between
the copy and paste operations.
This commit fixes the issue by running the test sequentially instead,
mirroring the change from commit 0e94f2bd
.
2025-03-16 20:35:36 +01:00
Tim van der Meij
e738566900
Merge pull request #19669 from timvandermeij/icc-colorspace-404
...
Don't get ICC color space files if required API options are missing
2025-03-16 18:45:21 +01:00
Tim van der Meij
f44cba86d5
Don't get ICC color space files if required API options are missing
...
This commit improves validation of the API options for the ICC color
space logic. If `useWasm` is `true` but the corresponding `wasmUrl`
or `iccUrl` API options are not provided we can avoid requesting
files with `null` URLs which always results in a 404 response.
2025-03-16 16:29:42 +01:00
Jonas Jenwald
4c5ad92584
Merge pull request #19667 from Snuffleupagus/version-5.1
...
Bump library version to `5.1`
2025-03-16 13:51:35 +01:00
Jonas Jenwald
e3e2396230
Bump library version to 5.1
2025-03-16 13:47:18 +01:00
Tim van der Meij
d86045eacb
Merge pull request #19632 from Snuffleupagus/issue-15085
...
[api-minor] Attempt to support fetching the raw data of the PDF document from the `PDFDocumentLoadingTask`-instance (issue 15085)
2025-03-16 12:32:20 +01:00
Tim van der Meij
f8c2a949b7
Merge pull request #19665 from timvandermeij/updates
...
Update dependencies and translations to the most recent versions
2025-03-16 11:31:08 +01:00
Jonas Jenwald
9e8d4e4d46
[api-minor] Attempt to support fetching the raw data of the PDF document from the PDFDocumentLoadingTask
-instance (issue 15085)
...
The new API-functionality will allow a PDF document to be downloaded in the viewer e.g. while the PasswordPrompt is open, or in cases when document initialization failed.
Normally the raw data of the PDF document would be accessed via the `PDFDocumentProxy.prototype.getData` method, however in these cases the `PDFDocumentProxy`-instance isn't available.
2025-03-16 10:09:44 +01:00
Tim van der Meij
33af8b5c2c
Update translations to the most recent versions
2025-03-15 20:42:08 +01:00
Tim van der Meij
85818f404f
Upgrade babel-loader
to version 10.0.0
...
This is a major version bump, but the changelog at
https://github.com/babel/babel-loader/releases/tag/v10.0.0
doesn't indicate any breaking changes that should impact us.
2025-03-15 20:42:08 +01:00
Tim van der Meij
cfe6cc6a7e
Upgrade @metalsmith/layouts
to version 3.0.0
...
This is a major version bump, and the changelog at
https://github.com/metalsmith/layouts/releases/tag/v3.0.0
indicates a breaking change that impacts us, namely that we need to
explicitly define the pattern and transformer that we wish to use.
2025-03-15 20:42:08 +01:00
Tim van der Meij
ef7e0ddae4
Update dependencies to the most recent versions
2025-03-15 20:42:08 +01:00
Jonas Jenwald
d1d88cc09e
Merge pull request #19662 from Snuffleupagus/xfa-rm-regex
...
Replace a few simple regular expressions in the XFA-code with string parsing
2025-03-15 19:44:30 +01:00
Tim van der Meij
2d1833b566
Merge pull request #19663 from timvandermeij/bump
...
Bump the stable version in `pdfjs.config`
2025-03-15 19:19:22 +01:00
Tim van der Meij
a1bcd789b9
Bump the stable version in pdfjs.config
2025-03-15 19:15:34 +01:00
Tim van der Meij
23972e1946
Merge pull request #19661 from Snuffleupagus/thumbnails-inline-finishRenderTask
...
Inline the `PDFThumbnailView.prototype.#finishRenderTask` helper method
2025-03-15 18:46:26 +01:00
Jonas Jenwald
8a24c1907a
Replace a few simple regular expressions in the XFA-code with string parsing
...
- Add a couple of `limit` parameters in cases where those were "missing", for `String.prototype.split()` calls, to avoid unnecessary parsing.
- Remove some "pointless" initial trimming of leading/trailing spaces, since that's already done at a later parsing step in many cases.
2025-03-15 17:25:26 +01:00
Jonas Jenwald
6548c9f1f6
Inline the PDFThumbnailView.prototype.#finishRenderTask
helper method
...
Given that the `draw` method is already asynchronous we can easily inline this old helper method, which shortens the code and improves consistency in the code-base (note the `BasePDFPageView`-implementation).
2025-03-15 14:19:16 +01:00
Jonas Jenwald
7ee061bcf1
Add a helper function, in web/pdf_thumbnail_view.js
, for "zeroing" a canvas
...
This removes a tiny bit of code duplication.
2025-03-15 13:24:52 +01:00
Jonas Jenwald
b7eef925ac
Shorten the PDFThumbnailView.prototype.#getReducedImageDims
method (PR 19635 follow-up)
...
This method is slightly more verbose than necessary, hence we can shorten the code a little bit.
2025-03-15 13:19:34 +01:00
Tim van der Meij
4b2683ecb6
Merge pull request #19656 from Snuffleupagus/shorten-MeshStreamReader
...
Slightly shorten a couple of `MeshStreamReader` methods
2025-03-14 19:50:36 +01:00
Jonas Jenwald
9967ab4aa8
Merge pull request #19657 from Snuffleupagus/GenericL10n-rm-regex
...
Replace the regular expression in `GenericL10n.#getPaths` with simple string parsing
2025-03-14 16:21:54 +01:00
Jonas Jenwald
9180e27f15
Replace the regular expression in GenericL10n.#getPaths
with simple string parsing
2025-03-14 15:54:14 +01:00
Jonas Jenwald
ec30f0788b
Slightly shorten a couple of MeshStreamReader
methods
...
By using object destructuring in the `readCoordinate` and `readComponents` methods we can ever so slightly shorten this code.
2025-03-14 12:57:41 +01:00
calixteman
2294a510b0
Merge pull request #19653 from calixteman/rm_strings_html
...
Remove all the translatable strings from the html
2025-03-13 21:24:34 +01:00
Calixte Denizet
88c3ed9a80
Remove all the translatable strings from the html
2025-03-13 18:38:29 +01:00
calixteman
8791b24742
Merge pull request #19652 from calixteman/rm_useless_css_var
...
[Editor] Remove useless css variable
2025-03-13 16:48:50 +01:00
Calixte Denizet
7c706b6525
[Editor] Remove useless css variable
2025-03-13 16:40:30 +01:00
calixteman
dc61e36bf4
Merge pull request #19651 from calixteman/fix_ftl
...
[Editor] Fix variable name in the ftl file
2025-03-13 16:36:38 +01:00
Calixte Denizet
56f58bde9a
[Editor] Fix variable name in the ftl file
...
and add a linting rule to avoid such an error in the future.
2025-03-13 16:26:16 +01:00
calixteman
d5c185b90a
Merge pull request #19649 from calixteman/bug1953298
...
[Editor] Fix the title of saved signature button (bug 1953298)
2025-03-13 13:50:43 +01:00
Calixte Denizet
da105f71f6
[Editor] Fix the title of saved signature button (bug 1953298)
2025-03-13 13:07:45 +01:00
Jonas Jenwald
78b310afb1
Merge pull request #19650 from Snuffleupagus/shorten-crypto
...
Shorten the `src/core/crypto.js` file a little bit
2025-03-13 12:46:53 +01:00
Jonas Jenwald
ef01ceda1b
Change a couple of "password" ref-tests to "eq" tests
...
Currrently these are just "load" tests, and by also testing rendering we get slightly better test-coverage for the `src/core/crypto.js` file.
2025-03-13 11:58:13 +01:00
Jonas Jenwald
0e15f709c4
Remove unnecessary else if
when checking the encryptionKey in the CipherTransformFactory
constructor
...
This can be simplified a tiny bit since we already throw `PasswordException` when no password is provided.
2025-03-13 11:58:13 +01:00
Jonas Jenwald
cc63ffa6bb
Reduce duplication when checking the userPassword, in CipherTransformFactory.prototype.#prepareKeyData
...
Currently we duplicate the exact same code in both the `if`- and `else`-branches, which seems unnecessary, and we can also replace the manual loop.
2025-03-13 11:58:02 +01:00