1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-24 17:18:07 +02:00
Commit graph

20565 commits

Author SHA1 Message Date
Tim van der Meij
b43efdd545
Merge pull request #19436 from Snuffleupagus/api-FetchBinaryData
Combine the main-thread message handlers for CMap-, StandardFontData-, and Wasm-files
2025-02-07 21:13:58 +01:00
Tim van der Meij
01148d35bc
Merge pull request #19423 from Snuffleupagus/annotation-more-getPdfColorArray
Use the `getPdfColorArray` helper more in the `src/core/annotation.js` file
2025-02-07 21:05:52 +01:00
Tim van der Meij
5b7bc27c46
Merge pull request #19419 from Snuffleupagus/blank_issues_enabled-false
Disable the "Blank issue" alternative when using the GitHub "New issue"-button
2025-02-07 20:52:26 +01:00
Jonas Jenwald
88e5da1e37 Combine the main-thread message handlers for CMap-, StandardFontData-, and Wasm-files
Currently we have three separate and virtually identical message handlers for this data, which can easily be combined into a single message handler instead.
2025-02-07 14:33:15 +01:00
calixteman
651d712109
Merge pull request #19433 from calixteman/signature_icon
[Editor] Add an icon for the signature tool and move it before the highlight one
2025-02-06 21:59:27 +01:00
Jonas Jenwald
7d9cfbf597
Merge pull request #19432 from Snuffleupagus/isSyncFontLoadingSupported-FeatureTest
Use the `FeatureTest` helper in the `src/display/font_loader.js` file
2025-02-06 21:36:28 +01:00
Calixte Denizet
5ee7307bf5 [Editor] Add an icon for the signature tool and move it before the highlight one 2025-02-06 20:58:59 +01:00
Jonas Jenwald
33f3506842 Use the FeatureTest helper in the src/display/font_loader.js file 2025-02-06 20:45:18 +01:00
Jonas Jenwald
41a918b0fe
Merge pull request #19430 from Snuffleupagus/Fluent-PLATFORM
[GENERIC viewer] Add Fluent `PLATFORM` function (PR 19414 follow-up)
2025-02-06 20:07:07 +01:00
calixteman
16155fd801
Merge pull request #19431 from Snuffleupagus/var--save-warning-color
Fix `--save-warning-color` CSS variable typo (PR 19414 follow-up)
2025-02-06 19:09:20 +01:00
Jonas Jenwald
314928ffd7 Fix --save-warning-color CSS variable typo (PR 19414 follow-up) 2025-02-06 19:06:04 +01:00
Jonas Jenwald
d5d3d8b3f7 [GENERIC viewer] Add Fluent PLATFORM function (PR 19414 follow-up)
This patch extends the `FeatureTest.platform` getter to provide the necessary information, and uses that one to implement a Fluent `PLATFORM` function based on: https://searchfox.org/mozilla-central/rev/d1fbe983fb7720f0a4aca0e748817af11c1a374e/intl/l10n/rust/fluent-ffi/src/bundle.rs#81-98
2025-02-06 18:59:35 +01:00
calixteman
f1152f5caf
Merge pull request #19429 from calixteman/autolinking_firefox
Enable autolinking in Firefox (bug 1019475)
2025-02-06 17:47:55 +01:00
Calixte Denizet
76c06c5996 Enable autolinking in Firefox (bug 1019475) 2025-02-06 17:02:54 +01:00
calixteman
2d773cb773
Merge pull request #19110 from ryzokuken/autolink-demo
Enable automatic URL linking (bug 1019475)
2025-02-06 16:53:48 +01:00
calixteman
08663f715b
Merge pull request #19414 from calixteman/signature_dialog2
[Editor] Add a new dialog for the signature editor (bug 1945574)
2025-02-06 16:20:01 +01:00
Calixte Denizet
185ec1faf6 Add some unicode mapping for ligatures when writing the cmap table in the font (bug 1946181) 2025-02-06 10:51:15 +01:00
Calixte Denizet
fa25ab9c13 [Editor] Add a new dialog for the signature editor (bug 1945574) 2025-02-05 23:00:38 +01:00
Ujjwal Sharma
61ba1ea48c Enable automatic URL linking
Automatically detect links in the text content of a file and automatically
generate link annotations at the appropriate locations to achieve
automatic link detection and hyperlinking.
2025-02-05 16:56:54 +01:00
Jonas Jenwald
925071ab46 Use the getPdfColorArray helper more in the src/core/annotation.js file
While the file-size reduction is obviously tiny, it should never hurt to remove code duplication.
2025-02-05 11:37:32 +01:00
Jonas Jenwald
0b118efc26 Disable the "Blank issue" alternative when using the GitHub "New issue"-button
With recent changed made to the GitHub issues-UI the "Blank issue" alternative is now showing up quite prominently, which can easily negate the point of our bug/feature templates and lead to incomplete issues being filed.
2025-02-04 15:19:04 +01:00
Jonas Jenwald
90a5c37cb0
Merge pull request #19416 from Snuffleupagus/getFactoryUrlProp
[api-minor] Add more validation for the `cMapUrl`, `standardFontDataUrl`, and `wasmUrl` parameters
2025-02-04 12:48:21 +01:00
Jonas Jenwald
212388a980
Merge pull request #19415 from Snuffleupagus/dist-wasm
Bundle wasm-files in `pdfjs-dist` (PR 19329 follow-up)
2025-02-04 11:41:00 +01:00
Jonas Jenwald
696c6c626b Include the OpenJPEG license files
This is consistent with the handling of CMaps and StandardFontData.
2025-02-04 10:39:38 +01:00
Jonas Jenwald
fa3358baf9 [api-minor] Add more validation for the cMapUrl, standardFontDataUrl, and wasmUrl parameters
Given that we now have a few different factory-url parameters, we introduce a helper function for parsing them.

*Please note:* These parameters have always been documented as requiring a trailing slash[1], which we can now easily enforce during the `getDocument`-call.

---
[1] I recall that we've occasionally seen issues because users miss that detail, and the new Error should hopefully be more easily actionable than one thrown during rendering/parsing.
2025-02-04 10:27:31 +01:00
Jonas Jenwald
de79996574 Bundle wasm-files in pdfjs-dist (PR 19329 follow-up) 2025-02-04 10:22:26 +01:00
Tim van der Meij
d1f62509e5
Merge pull request #19410 from timvandermeij/integration-tests-freetext
Centralize the editor selector definitions in the freetext editor integration tests
2025-02-02 19:41:13 +01:00
Tim van der Meij
9a6511127a
Put waitForSelector options on a single line in the editor integration tests
This pattern was already followed quite consistently outside of the
freetext editor integration tests, so this commit aligns the remaining
places for consistency. This also helps to make the tests more compact
and to reduce the number of changes in follow-up changes.
2025-02-02 17:20:14 +01:00
Tim van der Meij
e95a26dc1d
Centralize the editor selector definitions in the freetext editor integration tests
In most integration tests we already use the pattern of defining the
editor selector once and reusing it in the rest of the test, but it's
not fully consistent everywhere yet. This commit fixes that for the
freetext editor integration tests, which has multiple advantages:

- it improves consistency between the various editor integration tests;
- it removes duplicate function calls and aligns variable definitions;
- it reduces the number of `getEditorSelector` calls that contained
  hardcoded IDs, which helps to isolate the tests and to simplify
  follow-up patches.
2025-02-02 17:18:14 +01:00
Tim van der Meij
bdbd9a317f
Merge pull request #19408 from Snuffleupagus/rm-popup-color-mix-fallback
Remove the `color-mix` fallback used with PopupAnnotations
2025-02-02 14:22:08 +01:00
Tim van der Meij
944602a7d5
Merge pull request #19405 from timvandermeij/integration-tests-highlight
Centralize the editor selector definitions in the highlight editor integration tests
2025-02-02 14:19:23 +01:00
Tim van der Meij
f9d3f699a7
Merge pull request #19404 from timvandermeij/updates
Update dependencies and translations to the most recent versions
2025-02-02 14:19:06 +01:00
Jonas Jenwald
9752d88241
Merge pull request #19407 from hamirmahal/master
Replace uninformative README badge (issue 19406)
2025-02-02 11:31:49 +01:00
Jonas Jenwald
9f62a88c38 Remove the color-mix fallback used with PopupAnnotations
This CSS feature is now available in *most* browsers that we support, with old Chromium-based browsers being the only exception; please see https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/color-mix#browser_compatibility

From this data we see that the feature in question has been supported since Chrome 111, which was released on 2023-03-01 (i.e. almost two years ago).

Please note that we've never guaranteed that all features and functionality will be available in the oldest supported browsers.
Furthermore, even with the `color-mix` fallback removed PopupAnnotations will still function just as before but may render with the default color (defined in the CSS-file) rather than the one specified in the PDF document.
2025-02-02 10:41:35 +01:00
Hamir Mahal
d8b6f1138f
Replace uninformative README badge (issue 19406) 2025-02-01 15:32:09 -08:00
Tim van der Meij
8babcded5d
Centralize the editor selector definitions in the highlight editor integration tests
In most integration tests we already use the pattern of defining the
editor selector once and reusing it in the rest of the test, but it's
not fully consistent everywhere yet. This commit fixes that for the
highlight editor integration tests, which has multiple advantages:

- it improves consistency between the various editor integration tests;
- it removes duplicate function calls and aligns variable definitions;
- it reduces the number of `getEditorSelector` calls that contained
  hardcoded IDs, which helps to isolate the tests and to simplify
  follow-up patches.
2025-02-01 19:23:42 +01:00
Tim van der Meij
0326814a1e
Update translations to the most recent versions 2025-02-01 18:37:01 +01:00
Tim van der Meij
c0957986b7
Update dependencies to the most recent versions 2025-02-01 18:35:56 +01:00
Tim van der Meij
de191d2a12
Merge pull request #19402 from Snuffleupagus/AnnotationElement-width-height-getters
Add width/height getters in the `AnnotationElement` class
2025-02-01 16:17:59 +01:00
Jonas Jenwald
2fd1344ece Add width/height getters in the AnnotationElement class
This is similar to PR 19397, but for the main-thread code, and helps to slightly shorten the code.
2025-02-01 13:20:15 +01:00
Jonas Jenwald
c8be02f2a7 [api-minor] Simplify the TextLayer.#getAscent fallback (PR 12896 follow-up)
At the time of PR 12896 the `fontBoundingBox{Ascent, Descent}` properties were not yet available by default in Fírefox, however that's no longer the case since Firefox 116; please see https://bugzilla.mozilla.org/show_bug.cgi?id=1801198.

Hence this patch which replaces the "full" fallback with a warning and uses the `ascent`/`descent` values from the fonts in the PDF document (as we did previously). Obviously the TextLayer won't look as good in that case, but it's a simpler and shorter solution.
2025-02-01 10:11:57 +01:00
Tim van der Meij
b48717a99e
Merge pull request #19397 from Snuffleupagus/Annotation-width-height-getters
Add width/height getters in the `Annotation` class
2025-01-31 16:14:02 +01:00
calixteman
938add1bb0
Merge pull request #19396 from calixteman/update_signature_draw
[Editor] Add some functions in order to extract contours from text and to generate a drawing from a drawn signature
2025-01-31 15:44:00 +01:00
Calixte Denizet
20992e87f5 [Editor] Add some functions in order to extract contours from text and to generate a drawing from a drawn signature 2025-01-31 14:59:58 +01:00
Jonas Jenwald
6f2966628c Add width/height getters in the Annotation class
Currently we're manually computing the width/height of the /Rect-entry in a number of spots throughout the worker-thread Annotation code, which these new getters help avoid.
2025-01-31 13:21:53 +01:00
calixteman
58c8f069f7
Merge pull request #19395 from calixteman/fix_overlay_manager
Avoid to remove the active overlay when a cancelled dialog (like the file picker) was called from a dialog
2025-01-30 16:51:26 +01:00
calixteman
ec7270c546
Merge pull request #19394 from calixteman/mv_supported_img_types
Move the array containing the supported image mime types in display_utils
2025-01-30 16:48:13 +01:00
Calixte Denizet
eca1e6c52e Avoid to remove the active overlay when a cancelled dialog (like the file picker) was called from a dialog 2025-01-30 16:13:48 +01:00
Calixte Denizet
2c737bc420 Move the array containing the supported image mime types in display_utils
and make it available for the viewer (it'll be used in the signature UI).
2025-01-30 15:35:17 +01:00
Jonas Jenwald
31deee26b9
Merge pull request #19393 from Snuffleupagus/fewer-hasFieldFlag
Use fewer `hasFieldFlag` calls in the `src/core/annotation.js` file
2025-01-30 15:10:14 +01:00