Compare commits

..

917 Commits

Author SHA1 Message Date
calixteman
2a68724b53
Merge pull request #17793 from calixteman/zoom_wheel_ctrl
When zooming the scrollbar can disappear and then no scrollend is triggered
2024-03-15 16:30:39 +01:00
Calixte Denizet
65d618635c When zooming the scrollbar can disappear and then no scrollend is triggered 2024-03-15 15:37:06 +01:00
Jonas Jenwald
30e69956db
Merge pull request #17694 from Snuffleupagus/validate-defaultOptions
Add better validation for the "PREFERENCE" kind `AppOptions`
2024-03-12 18:24:37 +01:00
Jonas Jenwald
e650b95253
Merge pull request #17714 from Snuffleupagus/Node-fs-promise
Use `fs/promises` in the Node.js-specific code in the `src/`-folder
2024-03-12 18:09:33 +01:00
calixteman
a7d47af474
Merge pull request #17732 from calixteman/editor_highlight_floating_button
[Editor] Add a floating button close to the selected text to highlight it (bug 1867742)
2024-03-12 15:43:19 +01:00
Jonas Jenwald
b54887cfab
Merge pull request #17717 from Snuffleupagus/pr-17681-follow-up
Combine a few lines in the `dist-pre` target (PR 17681 follow-up)
2024-03-12 15:15:19 +01:00
Calixte Denizet
b4267cd294 [Editor] Add a floating button close to the selected text to highlight it (bug 1867742)
For now keep this feature behind a pref in order to make some experiments before
deciding to enable it.
2024-03-12 15:06:46 +01:00
Jonas Jenwald
eb160726ee
Merge pull request #17726 from Snuffleupagus/OptionalContent-Usage
[api-minor] Implement basic support for OptionalContent `Usage` dicts (issue 5764, bug 1826783)
2024-03-12 14:09:57 +01:00
Jonas Jenwald
70b6ddc5d9 Move the /SetOCGState handling into the OptionalContentConfig class (PR 15377 follow-up)
This helps ensure that /SetOCGState actions always take the `Usage` dictionary into account as expected.
2024-03-12 13:18:15 +01:00
Jonas Jenwald
3c78ff5fb0 [api-minor] Implement basic support for OptionalContent Usage dicts (issue 5764, bug 1826783)
The following are some highlights of this patch:
 - In the Worker we only extract a *subset* of the potential contents of the `Usage` dictionary, to avoid having to implement/test a bunch of code that'd be completely unused in the viewer.

 - In order to still allow the user to *manually* override the default visible layers in the viewer, the viewable/printable state is purposely *not* enforced during initialization in the `OptionalContentConfig` constructor.

 - Printing will now always use the *default* visible layers, rather than using the same state as the viewer (as was the case previously).
   This ensures that the printing-output will correctly take the `Usage` dictionary into account, and in practice toggling of visible layers rarely seem to be necessary except in the viewer itself (if at all).[1]

---
[1] In the unlikely case that it'd ever be deemed necessary to support fine-grained control of optional content visibility during printing, some new (additional) UI would likely be needed to support that case.
2024-03-12 13:18:15 +01:00
calixteman
e647311a89
Merge pull request #17788 from calixteman/bug1881743
[Editor] Improve the accessibility of the highlight editor (bug 1881743)
2024-03-11 21:57:11 +01:00
Calixte Denizet
f676c2c0c8 [Editor] Improve the accessibility of the highlight editor (bug 1881743) 2024-03-11 14:21:43 +01:00
Jonas Jenwald
b14f696071
Merge pull request #17711 from Snuffleupagus/importl10n-Fetch-API
Use the Fetch API to download the l10n files
2024-03-08 11:51:34 +01:00
Jonas Jenwald
ea4b55a0e6 Update l10n files 2024-03-08 10:09:51 +01:00
Jonas Jenwald
2b407990e2 Use the Fetch API to download the l10n files
Given that the Fetch API is supported since Node.js 18 we should be able to use it when downloading l10n files, which allows us to simplify the code and to make it fully `async`.
2024-03-08 10:08:15 +01:00
calixteman
fb9e438442
Merge pull request #17781 from calixteman/stamp_altext_button_cp
[Editor] Make sure the alt-text button is there when pasting an image from an other tab
2024-03-07 21:44:53 +01:00
calixteman
406018934a
Merge pull request #17778 from calixteman/highlight_show_all
[Editor] Add a toggle button to show/hide all the highlights (bug 1867740)
2024-03-07 18:49:09 +01:00
Calixte Denizet
0f8dda1af0 [Editor] Make sure the alt-text button is there when pasting an image from an other tab 2024-03-07 18:24:34 +01:00
Calixte Denizet
39aeea3e94 [Editor] Add a toggle button to show/hide all the highlights (bug 1867740) 2024-03-07 13:16:59 +01:00
calixteman
6bb6ce6a5d
Merge pull request #17767 from calixteman/automation_win_listener
In the m-c automation, give the possibility to remove window listeners when a test ended
2024-03-06 14:39:58 +01:00
Calixte Denizet
6d0835dc52 In the m-c automation, give the possibility to remove window listeners when a test ended
The goal is to avoid to have some exceptions in the logs when a test finished.
2024-03-06 14:21:57 +01:00
calixteman
9ee4c6528d
Merge pull request #17776 from calixteman/bug1883609
[Annotations] Widget annotations must be in front of the other ones (bug 1883609)
2024-03-06 10:53:11 +01:00
Calixte Denizet
4e1b96c781 [Annotations] Widget annotations must be in front of the other ones (bug 1883609) 2024-03-05 19:04:58 +01:00
calixteman
f634cb533c
Merge pull request #17775 from calixteman/bug1883632
[Editor] Let a free highlight be clipped when its bounding box exceeds the page limits (bug 1883632)
2024-03-05 17:14:48 +01:00
Calixte Denizet
bd5875d066 [Editor] Let a free highlight be clipped when its bounding box exceeds the page limits (bug 1883632) 2024-03-05 16:47:07 +01:00
calixteman
f1272ee435
Merge pull request #17771 from calixteman/bug1832519
[GeckoView] Remove the open-in-app button (bug 1832519)
2024-03-05 14:11:12 +01:00
calixteman
b447a62fea
Merge pull request #17772 from calixteman/reporttelemetry
Don't stringify data for telemetry
2024-03-05 12:54:24 +01:00
Calixte Denizet
ba3e559583 Don't stringify data for telemetry 2024-03-04 20:17:47 +01:00
Calixte Denizet
3cb58f84a2 [GeckoView] Remove the open-in-app button (bug 1832519) 2024-03-04 19:32:12 +01:00
calixteman
c451b6d684
Merge pull request #17764 from calixteman/telemetry_null_stats
[Editor] Use a null instead of an empty stats object when sending the telemetry
2024-03-04 19:16:57 +01:00
calixteman
a55f976e2e
Merge pull request #17766 from calixteman/escape_color_picker
[Editor] Unselect highlight editor when pressing Escape when the focus is on the color picker without a dropdown menu
2024-03-04 19:16:34 +01:00
calixteman
7c9d3af85b
Merge pull request #17768 from calixteman/bug1883394
[Editor] Set the creation method for free highlights to 'main_toolbar' (bug 1883394)
2024-03-04 19:16:15 +01:00
Calixte Denizet
ecb4262b13 [Editor] Set the creation method for free highlights to 'main_toolbar' (bug 1883394) 2024-03-04 16:58:50 +01:00
Calixte Denizet
1859412507 [Editor] Unselect highlight editor when pressing Escape when the focus is on the color picker without a dropdown menu 2024-03-04 16:32:09 +01:00
Calixte Denizet
d096dc79b2 [Editor] Use a null instead of an empty stats object when sending the telemetry 2024-03-04 10:18:24 +01:00
Jonas Jenwald
dd3adc84db
Merge pull request #17761 from Snuffleupagus/thicknessPicker-disabled
[Editor] Indicate if the highlight-thickness slider is disabled
2024-03-01 17:01:05 +01:00
Jonas Jenwald
e781b553cb [Editor] Reduce a bit of CSS duplication for the highlight-thickness "indicators" 2024-03-01 16:18:39 +01:00
Jonas Jenwald
c7e7122e25 [Editor] Indicate if the highlight-thickness slider is disabled
The fact that the highlight-thickness can only be changed in "free" mode isn't really obvious visually in the toolbar, so attempt to provide at least some indication of the `disabled`-state by "dimming" the slider.
2024-03-01 16:18:31 +01:00
calixteman
29c493d36b
Merge pull request #17760 from calixteman/fix_quadpoints
[Editor] Fix the quadpoints value when serializing an highlight annotation
2024-03-01 13:08:44 +01:00
Calixte Denizet
30101cbb31 [Editor] Fix the quadpoints value when serializing an highlight annotation
The coordinates of each point in a box are in the page coordinates system.
2024-03-01 11:36:16 +01:00
Jonas Jenwald
61036383b5
Merge pull request #17710 from Snuffleupagus/pr-17277-followup
Simplify the `XMLHttpRequest`-branch in the `fetchData` helper function (PR 17277 follow-up)
2024-03-01 10:23:02 +01:00
calixteman
8f75e34b6f
Merge pull request #17757 from calixteman/bug1881219
[Editor] Enable the thickness input when no editors are selected (bug 1881219)
2024-02-29 23:26:49 +01:00
Calixte Denizet
7af90bb8bc [Editor] Enable the thickness input when no editors are selected (bug 1881219) 2024-02-29 23:05:33 +01:00
calixteman
c409121251
Merge pull request #17756 from calixteman/bug1882248
[Editor] Make the delete button clickable with the space key (bug 1882248)
2024-02-29 19:57:57 +01:00
Calixte Denizet
f52bf2836f [Editor] Make the delete button clickable with the space key (bug 1882248) 2024-02-29 19:05:38 +01:00
calixteman
7cc34cf4a7
Merge pull request #17755 from calixteman/bug1881684
[Editor] Add the possibility to move the caret with the keyboard once  an highlight has been made (bug 1881684)
2024-02-29 18:38:17 +01:00
Calixte Denizet
a9f47e87d5 [Editor] Add the possibility to move the caret with the keyboard once an highlight has been made (bug 1881684) 2024-02-29 18:18:13 +01:00
Jonas Jenwald
9600c48d4f
Merge pull request #17750 from Snuffleupagus/pr-17748-followup
Inline the `HighlightEditor.#telemetryType` getter at its only call-site (PR 17748 follow-up)
2024-02-29 10:34:37 +01:00
Jonas Jenwald
a92b38e71c Inline the HighlightEditor.#telemetryType getter at its only call-site (PR 17748 follow-up) 2024-02-28 20:47:01 +01:00
calixteman
9fe15d4a01
Merge pull request #17748 from calixteman/highlight_telemetry_followup
[Editor] Count the colors used when highlighting whatever the highlight kind is
2024-02-28 20:00:15 +01:00
Calixte Denizet
3a7e638fce [Editor] Count the colors used when highlighting whatever the highlight kind is 2024-02-28 18:24:24 +01:00
calixteman
07abd647f4
Merge pull request #17737 from calixteman/highlight_telemetry
[Editor] Add some telemetry for the highlight feature (bug 1866437)
2024-02-28 15:20:57 +01:00
Calixte Denizet
65342d2bee [Editor] Add some telemetry for the highlight feature (bug 1866437) 2024-02-28 10:17:11 +01:00
calixteman
b1a04fc184
Merge pull request #17738 from calixteman/issue17730
Always add links in the annotation layer
2024-02-28 09:34:10 +01:00
Calixte Denizet
e0b843d991 Always add links in the annotation layer
Fixes #17730.
2024-02-27 22:48:08 +01:00
calixteman
06aef89502
Merge pull request #17733 from calixteman/puppeteer_22_1_0
Update puppeteer to 22.3.0
2024-02-27 13:46:30 +01:00
Calixte Denizet
5e7941afbf Update puppeteer to 22.3.0 2024-02-27 12:19:54 +01:00
calixteman
e42b114e80
Merge pull request #17724 from calixteman/issue17707
Avoid to have to wait to zoom after scrolling
2024-02-26 11:05:10 +01:00
Calixte Denizet
9e042e7acc Avoid to have to wait to zoom after scrolling
Allow to zoom with the wheel once the scrolling is finished.
It's now possible to know that thanks to the scrollend event.

Fixes #17707.
2024-02-25 21:40:48 +01:00
calixteman
ca4ab064e5
Merge pull request #17720 from calixteman/editor_simplify_highlighting
[Editor] In caret browsing mode, allow to select in pressing shift and arrow down (bug 1881802)
2024-02-25 17:52:11 +01:00
Calixte Denizet
0520f2f0cb [Editor] In caret browsing mode, allow to select in pressing shift and arrow down (bug 1881802)
In implementing caret browsing mode in pdf.js, I didn't notice that selectstart isn't always triggered.
So this patch removes the use of selectstart and rely only on selectionchange.
In order to simplify the selection management, the selection code is moved in the AnnotationUIManager:
 - it simplifies the code;
 - it allows to have only one listener for selectionchange instead of having one by visible page
   for selectstart.
I had to add a delay in the integration tests for highlighting (there's a comment with an explanation),
it isn't really nice, but it's the only way I found and in real life there always is a delay between
press and release.
2024-02-25 15:35:30 +01:00
calixteman
1bd6af6dae
Merge pull request #17722 from calixteman/issue17721
Fix the string GlobalConstants.IDS_INVALID_DATE
2024-02-23 21:49:42 +01:00
Calixte Denizet
fe41e789de Fix the string GlobalConstants.IDS_INVALID_DATE 2024-02-23 21:39:06 +01:00
Jonas Jenwald
346efe919a
Merge pull request #17718 from Snuffleupagus/hexNumbers-tweak
Tweak how the `hexNumbers` Array, used by `Util.makeHexColor`, is built
2024-02-23 18:17:10 +01:00
calixteman
b8b8f1af66
Merge pull request #17719 from calixteman/bug1881692
[Editor] In caret browsing mode, get the caret position in the text layer (bug 1881692)
2024-02-23 17:11:51 +01:00
Calixte Denizet
bb19cf9b64 [Editor] In caret browsing mode, get the caret position in the text layer (bug 1881692)
The function caretPositionFromPoint return the position within the last visible element
and sometimes there are some elements on top of the ones in the text layer.
So the idea is to hide the visible elements which aren't in the text layer in order
to get the right caret position.
2024-02-23 16:50:19 +01:00
calixteman
101e8efad7
Merge pull request #17708 from calixteman/editor_highlight_context_menu
[Editor] Add the possibility to create an highlight from the context menu when some text is selected (bug 1867739)
2024-02-23 16:39:03 +01:00
Calixte Denizet
e1f6f5179f [Editor] Add the possibility to create an highlight from the context menu when some text is selected (bug 1867739) 2024-02-23 16:18:03 +01:00
Jonas Jenwald
49a2aff532 Tweak how the hexNumbers Array, used by Util.makeHexColor, is built
*Please note:* This is a micro optimization, hence I fully understand if the patch is rejected.

Currently we create two temporary Arrays and have to iterate twice in total when building the final `hexNumbers` Array.
With this patch there's only one temporary Array and a single iteration required to build the final `hexNumbers` Array.
2024-02-23 14:20:53 +01:00
Jonas Jenwald
dab8a2eaa4 Combine a few lines in the dist-pre target (PR 17681 follow-up)
In PR 17681 I completely missed that we can combine a number of lines in the `dist-pre` target, which helps reduce code size a little bit.
2024-02-23 13:32:04 +01:00
Jonas Jenwald
db2849cc17 Use fs/promises in the Node.js-specific code in the src/-folder
This is available in all Node.js versions that we currently support, and using it allows us to remove callback-functions; please see https://nodejs.org/docs/latest-v18.x/api/fs.html#promises-api
2024-02-22 16:50:13 +01:00
Jonas Jenwald
33c5ef349e Simplify the XMLHttpRequest-branch in the fetchData helper function (PR 17277 follow-up) 2024-02-21 23:00:24 +01:00
calixteman
72b8b29147
Merge pull request #17701 from calixteman/alt_text_ai
[Editor] Add the possibility to query some ML stuff to guess an alt text for an image
2024-02-21 10:14:40 +01:00
calixteman
0fb8a23051
Merge pull request #17702 from calixteman/bug1868759
[Editor] Disable annotation layer when highlighting (bug 1868759)
2024-02-21 09:49:48 +01:00
Calixte Denizet
46416bb131 [Editor] Add the possibility to query some ML stuff to guess an alt text for an image
It's only for an experimental purpose.
2024-02-20 21:29:33 +01:00
Calixte Denizet
95f9bedc7c [Editor] Disable annotation layer when highlighting (bug 1868759)
When highlighting, the annotation editor layer is disabled to get pointer events
from the text layer, but the annotation layer must be then disabled either in
order to avoid bad interactions.
2024-02-20 21:17:05 +01:00
Jonas Jenwald
38004b65b1 Re-factor how the compatibilityParams, in the viewer, are handled
Previously we'd simply export this directly from `web/app_options.js`, which meant that it'd be technically possible to *accidentally* modify the `compatibilityParams` Object when accessing it.
To avoid this we instead introduce a new `AppOptions`-method that is used to lookup data in `compatibilityParams`, which means that we no longer need to export this Object.

Based on these changes, it's now possible to simplify some existing code in `AppOptions` by taking full advantage of the nullish coalescing (`??`) operator.
2024-02-20 18:38:18 +01:00
Jonas Jenwald
90b2664622 Add better validation for the "PREFERENCE" kind AppOptions
Given that the "PREFERENCE" kind is used e.g. to generate the preference-list for the Firefox PDF Viewer, those options need to be carefully validated.
With this patch we'll now check this unconditionally in development mode, during testing, and when creating the preferences in the gulpfile.
2024-02-20 18:38:15 +01:00
calixteman
70015ffe6b
Merge pull request #17688 from calixteman/editor_no_scroll_unselect
[Editor] Avoid to scroll when an editor is unselected
2024-02-20 17:00:43 +01:00
calixteman
99fa713fba
Merge pull request #17690 from calixteman/issue17689
Avoid to access to a missing cidSystemInfo property
2024-02-19 12:04:07 +01:00
Calixte Denizet
a6eadf8150 Avoid to access to a missing cidSystemInfo property
Fixes #17689.
2024-02-19 09:55:23 +01:00
Calixte Denizet
c2fcc66302 [Editor] Avoid to scroll when an editor is unselected 2024-02-18 19:21:45 +01:00
Tim van der Meij
d96fd80ca0
Merge pull request #17687 from Snuffleupagus/pr-17686-followup
Disable source-map generation in the minified builds (PR 17686 follow-up)
2024-02-18 13:35:23 +01:00
Jonas Jenwald
673639c54b Disable source-map generation in the minified builds (PR 17686 follow-up)
As part of the changes in PR 17686 we "accidentally" enabled source-maps for the *minified* builds, which seems unnecessary since those have never been included in the `pdfjs-dist` output.
Locally this patch reduces the run-time of `gulp minified` by ~15 percent.
2024-02-17 22:14:37 +01:00
Tim van der Meij
4ac8ee8b6d
Merge pull request #17686 from Snuffleupagus/Webpack-TerserPlugin
Run minification directly during Webpack building
2024-02-17 19:42:35 +01:00
Jonas Jenwald
091e861531 Run minification directly during Webpack building
Rather than first building the library and then use Terser "manually" to minify the files, we can utilize a Webpack plugin to combine these steps which helps to simplify the gulpfile.
2024-02-17 18:51:34 +01:00
Tim van der Meij
8487c67cb8
Merge pull request #17684 from timvandermeij/modernize-webserver-pt2
Modernize the webserver code (part 2)
2024-02-17 18:22:51 +01:00
Tim van der Meij
33955980c8
Merge pull request #17685 from timvandermeij/updates
Update dependencies and translations to the most recent versions
2024-02-17 18:09:51 +01:00
Tim van der Meij
2e6fa797d9
Improve the webserver's constructor
This makes the webserver configurable during instantiation rather than
having to set the parameters afterwards.
2024-02-17 16:22:10 +01:00
Tim van der Meij
985ba77579
Modernize the remainder of the webserver's code and enable the no-var ESLint rule
This commit also moves the content type logic into a helper method to
ever so slightly reduce duplication.
2024-02-17 16:22:10 +01:00
Tim van der Meij
0015eb2431
Modernize the webserver's handler method
This commit converts `var` to `const`/`let`, gives the variables more
readable names and annotates the code to make the flow clearer.
2024-02-17 16:22:10 +01:00
Tim van der Meij
6ef813af01
Extract and modernize the webserver's request checking code
The `handler` method contained this code in two inline functions,
triggered via callbacks, which made the `handler` method big and harder
to read. Moreover, this code relied on variables from the outer scope,
which made it harder to reason about because the inputs and outputs
weren't easily visible.

This commit fixes the problems by extracting the request checking code
into a dedicated private method, and modernizing it to use e.g. `const`/
`let` instead of `var` and using template strings. The logic is now
self-contained in a single method that can be read from top to bottom
without callbacks and with comments annotating each check/section.
2024-02-17 16:22:10 +01:00
Tim van der Meij
43cdc1ca8a
Update translations to the most recent versions 2024-02-17 16:00:18 +01:00
Tim van der Meij
6baa439e15
Update dependencies to the most recent versions 2024-02-17 16:00:18 +01:00
Tim van der Meij
f1a225889b
Merge pull request #17681 from Snuffleupagus/parseMinified-changes
Tweak the `parseMinified` handling slightly in the gulpfile
2024-02-17 15:08:30 +01:00
Tim van der Meij
678c79cc78
Merge pull request #17678 from Snuffleupagus/pr-17637-followup
Remove unneeded `tweakWebpackOutput` usage in the gulpfile (PR 17637 follow-up)
2024-02-17 14:58:24 +01:00
Tim van der Meij
fd5d040073
Merge pull request #17667 from Snuffleupagus/createPrintService-params
Change `PDFPrintServiceFactory.createPrintService` to take a parameter object
2024-02-17 14:54:53 +01:00
Jonas Jenwald
179a3ecee6
Merge pull request #17680 from Snuffleupagus/issue-17679
Add a dummy `beginMarkedContentProps` operator when optional content parsing fails (issue 17679)
2024-02-17 14:29:08 +01:00
Jonas Jenwald
b767e12111
Merge pull request #17676 from Snuffleupagus/app-findBar-optional-chain
Access `PDFViewerApplication.findBar` safely in more spots (PR 15831 follow-up)
2024-02-17 13:54:00 +01:00
Jonas Jenwald
a7bcc81eb1 Add a dummy beginMarkedContentProps operator when optional content parsing fails (issue 17679) 2024-02-17 13:45:16 +01:00
Jonas Jenwald
75a5b2051d Tweak the parseMinified handling slightly in the gulpfile
- Run the minification in "parallel" since that should be a *tiny* bit more efficient.
 - Don't rename the minified files since that seems unnecessary, especially considering that they are only used in the `dist-pre` target where we currently change the name back manually.
2024-02-16 16:54:13 +01:00
Jonas Jenwald
751611f690 Remove unneeded tweakWebpackOutput usage in the gulpfile (PR 17637 follow-up)
After the changes in PR 17637 there's no longer any reason to invoke `tweakWebpackOutput` without an argument, since the `__non_webpack_import__` re-writing was moved into the Babel plugin.
This way we can avoid a (little) bit of unnecessary parsing during building.
2024-02-16 11:42:40 +01:00
Jonas Jenwald
b420bd8b20 Access PDFViewerApplication.findBar safely in more spots (PR 15831 follow-up)
Note that this patch is the result of code-inspection, and the code as written doesn't (currently) cause any bugs in e.g. the GeckoView PDF Viewer.
2024-02-15 11:25:29 +01:00
calixteman
a83a8d7e4f
Merge pull request #17674 from calixteman/issue17671
Fix the endoffset of the last glyph when it's followed by a null offset in the loca table
2024-02-15 10:19:55 +01:00
Jonas Jenwald
dbda3ec5f9
Merge pull request #17637 from Snuffleupagus/babel-plugin-__non_webpack_import__
Move the `__non_webpack_import__` re-writing into the Babel plugin
2024-02-14 22:23:24 +01:00
Calixte Denizet
fcad3718f0 Fix the endoffset of the last glyph when it's followed by a null offset in the loca table
It fixes #17671.
2024-02-14 17:20:04 +01:00
Jonas Jenwald
a204f434f3 Change PDFPrintServiceFactory.createPrintService to take a parameter object
By "modernizing" the method to use a parameter object instead, we avoid having to pass along the needed parameters individually.
2024-02-13 21:28:02 +01:00
calixteman
14874e50b7
Merge pull request #17636 from calixteman/bug1878916
When updating, write the xref table in the same format as the previous one (bug 1878916)
2024-02-13 14:45:14 +01:00
Calixte Denizet
2133da166e When updating, write the xref table in the same format as the previous one (bug 1878916)
The specs are unclear about what kind of xref table format must be used.
In checking the validity of some pdfs in the preflight tool from Acrobat
we can guess that having the same format is the correct way to do.
The pdf in the mentioned bug, after having been changed, wasn't correctly
displayed in neither Chrome nor Acrobat: it's now fixed.
2024-02-13 14:14:37 +01:00
Jonas Jenwald
e60329cea1
Merge pull request #17666 from Snuffleupagus/issue-17665
Skip any whitespace after the first object in linearized PDFs (issue 17665)
2024-02-13 12:39:36 +01:00
Jonas Jenwald
37e98e39f6 Skip any whitespace after the first object in linearized PDFs (issue 17665)
This way the code is now consistent with the non-linearized branch in the `PDFDocument.startXRef` getter.
2024-02-12 22:05:36 +01:00
calixteman
05b035602e
Merge pull request #17664 from calixteman/bug1879281
[Editor] Ends a free highlight where the mouse pointer is (bug 1879281)
2024-02-12 18:39:18 +01:00
Calixte Denizet
750b8e328a [Editor] Ends a free highlight where the mouse pointer is (bug 1879281) 2024-02-12 17:26:33 +01:00
Jonas Jenwald
eb5e6e68d6
Merge pull request #17663 from Snuffleupagus/pr-17428-test
Tweak the issue 11878 unit-test parsing time check (PR 17428 follow-up)
2024-02-12 14:14:29 +01:00
calixteman
f0343dcfdb
Merge pull request #17662 from calixteman/bug1879108
[Editor] Set rotated free highlight at the right position after having changed its thickness (bug 1879108)
2024-02-12 12:41:43 +01:00
Jonas Jenwald
19ef3e367b Tweak the issue 11878 unit-test parsing time check (PR 17428 follow-up)
This unit-test has been failing occasionally in Chrome and Node.js, hence we tweak the parsing time check to reduce the likelihood of that happening.
2024-02-12 12:31:55 +01:00
Jonas Jenwald
18959e80be
Merge pull request #17661 from timvandermeij/modernize-webserver
Modernize the webserver code (part 1)
2024-02-12 11:50:24 +01:00
Jonas Jenwald
4ab0ad3216 Move the __non_webpack_import__ re-writing into the Babel plugin
Note how we're using custom `__non_webpack_import__`-calls in the code-base, that we replace during the post-processing stage of the build, to be able to write `import`-calls that Webpack will leave alone during parsing.
This work-around is necessary since we let Babel discards all comments, given that we generally don't need/want them in the builds, hence why we cannot utilize `/* webpackIgnore: true */`-comments in the source-code.

After the changes in PR 17563 it thus seems to me that we should be able to just move this re-writing into the Babel plugin instead.
2024-02-12 10:49:43 +01:00
Jonas Jenwald
d742daf4b7
Merge pull request #17647 from Snuffleupagus/babel-rm-empty-nodes
Remove empty, top-level, nodes in the Babel plugin
2024-02-12 09:25:59 +01:00
Calixte Denizet
de1985abbb [Editor] Set rotated free highlight at the right position after having changed its thickness (bug 1879108) 2024-02-11 21:06:56 +01:00
Tim van der Meij
ce4fe0c234
Extract and modernize the webserver's directory listing code
The `handler` method contained this code in an inline function, which
made the `handler` method big and harder to read. Moreover, this code
relied on variables from the outer scope, which made it harder to reason
about because the inputs and outputs weren't easily visible.

This commit fixes the problems by extracting the directory listing code
into a dedicated private method, and modernizing it to use e.g. `const`/
`let` instead of `var` and using template strings.
2024-02-11 20:06:21 +01:00
calixteman
5cfaff508c
Merge pull request #17651 from calixteman/add_enableStamp_pref
Revert "Remove the `enableStampEditor` preference" (bug 1879588)
2024-02-11 18:53:09 +01:00
calixteman
f15b4b34fd
Merge pull request #17650 from calixteman/editor_highlight_keyboard
[Editor] Add a way to highlight text in using the keyboard (bug 1877426)
2024-02-11 18:52:37 +01:00
calixteman
9980447d25
Merge pull request #17652 from calixteman/editor_disable_thickness
[Editor] Disable the thickness slider for non-free highlight
2024-02-11 18:32:36 +01:00
Tim van der Meij
336fcffd28
Extract and modernize the webserver's range file serving code
The `handler` method contained this code in an inline function, which
made the `handler` method big and harder to read. Moreover, this code
relied on variables from the outer scope, which made it harder to reason
about because the inputs and outputs weren't easily visible.

This commit fixes the problems by extracting the range file serving code
into a dedicated private method, and modernizing it to use e.g. `const`/
`let` instead of `var` and using template strings.
2024-02-11 17:04:38 +01:00
Tim van der Meij
56d9930a7b
Extract and modernize the webserver's file serving code
The `handler` method contained this code in an inline function, which
made the `handler` method big and harder to read. Moreover, this code
relied on variables from the outer scope, which made it harder to reason
about because the inputs and outputs weren't easily visible.

This commit fixes the problems by extracting the file serving code into
a dedicated private method, and modernizing it to use e.g. `const`/`let`
instead of `var` and using template strings.
2024-02-11 17:04:30 +01:00
Tim van der Meij
12b9685714
Convert the webserver to a proper class with private methods 2024-02-11 16:56:53 +01:00
Tim van der Meij
440208daa6
Merge pull request #17658 from Snuffleupagus/ESLint-more-rules
Enable the `no-new-symbol` and `require-yield` ESLint rules
2024-02-11 13:50:33 +01:00
Jonas Jenwald
8f67ea6dc6 Enable the no-new-symbol and require-yield ESLint rules
Given that we use both `Symbol`s and generator functions in the code-base enabling these rules cannot hurt (and there's no existing failures). Please find additional information at:
 - https://eslint.org/docs/latest/rules/no-new-symbol
 - https://eslint.org/docs/latest/rules/require-yield
2024-02-11 13:27:22 +01:00
Tim van der Meij
4b7382edcb
Merge pull request #17657 from Snuffleupagus/eslint-jasmine-no-dupes
Prevent duplicate names in unit/integration tests
2024-02-11 12:18:31 +01:00
Tim van der Meij
422e46dae9
Merge pull request #17655 from timvandermeij/updates
Update translations and dependencies to the most recent versions
2024-02-11 12:09:54 +01:00
Jonas Jenwald
5732faee1e Prevent duplicate names in unit/integration tests
Having identical names for different test-cases may result in less helpful output, which we can avoid with the use of the ESLint Jasmine plugin.
This patch enables the rules at the `branch` level, to limit the amount/scope of the changes slightly. (We could thus make this rule more strict in the future, if that's deemed useful.)

Please refer to:
 - https://github.com/tlvince/eslint-plugin-jasmine/blob/master/docs/rules/no-spec-dupes.md
 - https://github.com/tlvince/eslint-plugin-jasmine/blob/master/docs/rules/no-suite-dupes.md
2024-02-11 11:45:09 +01:00
Jonas Jenwald
485e9cecd7
Merge pull request #17646 from Snuffleupagus/app-break-import-cycles
Break import cycles, in the viewer, for `PDFViewerApplication`
2024-02-10 23:22:49 +01:00
Jonas Jenwald
e98b9b019a Break import cycles, in the viewer, for PDFViewerApplication
Currently the `web/app.js` file pulls in various build-specific dependencies, via the use of import maps, and those files in turn import from `web/app.js` thus creating undesirable import cycles.
To avoid this we instead pass in a `PDFViewerApplication`-reference, immediately after it's been created, to the relevant code.

Note that we use an ESLint plugin rule, see `import/no-cycle`, that is normally able to catch import cycles. However, in this case import maps are involved which is why this wasn't caught.
2024-02-10 23:15:57 +01:00
Tim van der Meij
28418598e5
Update puppeteer to version 22.0.0
This is a major version bump that requires two changes on our side:

- The new headless mode is now the default, so we can remove our
  transformation code (see https://github.com/puppeteer/puppeteer/pull/11815).
- The `page.waitForTimeout` API is removed. Sadly we still used it in
  the integration tests (but fortunately much less than before we worked
  on fixing intermittent failures), so until we remove the final
  occurrences we provide an implementation ourselves (see
  https://github.com/puppeteer/puppeteer/pull/11780).

The full changelog can be found here:
https://github.com/puppeteer/puppeteer/releases/tag/puppeteer-core-v22.0.0
2024-02-10 19:05:36 +01:00
Tim van der Meij
4feab0c1fa
Update gulp-postcss to version 10.0.0
This is a major version bump, but the breaking changes don't affect us;
please see https://github.com/postcss/gulp-postcss/releases/tag/10.0.0.
2024-02-10 19:05:28 +01:00
Tim van der Meij
29a665981a
Update eslint-plugin-unicorn to version 51.0.1
This is a major version bump, but the breaking changes don't affect us;
please see https://github.com/sindresorhus/eslint-plugin-unicorn/releases.
2024-02-10 19:04:54 +01:00
Tim van der Meij
913c2caf37
Update globals to version 14.0.0
This is a major version bump, but the breaking changes don't affect us;
please see https://github.com/sindresorhus/globals/releases/tag/v14.0.0.
2024-02-10 19:04:50 +01:00
Tim van der Meij
7da6f94ca3
Update dependencies to the most recent versions 2024-02-10 19:04:48 +01:00
Tim van der Meij
b278a74b6b
Update translations to the most recent versions 2024-02-10 19:04:46 +01:00
Calixte Denizet
b5e446213e [Editor] Disable the thickness slider for non-free highlight 2024-02-09 22:54:53 +01:00
Calixte Denizet
8fc6c5c8a6 [Editor] Add a way to highlight text in using the keyboard (bug 1877426) 2024-02-09 22:52:24 +01:00
Calixte Denizet
bcc95460b6 Revert "Remove the enableStampEditor preference" (bug 1879588)
This reverts commit e820688510e2c1c24088e76a178a82ef8ebcaf4d.
2024-02-09 18:21:21 +01:00
Jonas Jenwald
14ef0b4211 Remove empty, top-level, nodes in the Babel plugin
Looking at the *built* files you'll notice some lines containing nothing more than a semicolon. This is the result of (mostly top-level) `if`-statements, which include `PDFJSDev`-checks, that evalute to `false` during Babel parsing.

This has always annoyed me a bit, and looking at Babel plugin it seems that we can fix this simply by *removing* the relevant nodes.
2024-02-09 13:58:24 +01:00
calixteman
7cfcd00a38
Merge pull request #17645 from calixteman/update_quickjs_3f81070e573e3592728dbbbd04c84c498b20d6dc
Update quickjs to 3f81070e573e3592728dbbbd04c84c498b20d6dc
2024-02-09 13:56:21 +01:00
Calixte Denizet
275b6748b6 Update quickjs to 3f81070e573e3592728dbbbd04c84c498b20d6dc
According to:
3f81070e57
this is a new release of quickjs.
2024-02-09 11:51:24 +01:00
calixteman
964bfe522b
Merge pull request #17643 from calixteman/bug1879113
[Editor] Compute the position of the last point before applying rotation (bug 1879113)
2024-02-08 21:30:22 +01:00
Calixte Denizet
8d61fc1fde [Editor] Compute the position of the last point before applying rotation (bug 1879113) 2024-02-08 21:08:24 +01:00
Jonas Jenwald
0d5183a49f
Merge pull request #17634 from Snuffleupagus/rm-preprocessor-require
Remove support for `require` statements from the build system
2024-02-08 16:22:17 +01:00
calixteman
939134ee55
Merge pull request #17639 from calixteman/bug1879102
[Editor] Correctly rotate the mask when rotation a free highlight (bug 1879102)
2024-02-08 16:13:58 +01:00
Calixte Denizet
c4ac7eef95 [Editor] Correctly rotate the mask when rotation a free highlight (bug 1879102) 2024-02-08 15:29:29 +01:00
calixteman
d7479a59b7
Merge pull request #17638 from calixteman/bug1879107
[Editor] Set the right color to size samples in the highlight thickness panelwhen in HCM (bug 1879107)
2024-02-08 15:25:14 +01:00
Calixte Denizet
3f68a08ef3 [Editor] Set the right color to size samples in the highlight thickness panelwhen in HCM (bug 1879107) 2024-02-08 14:31:10 +01:00
Jonas Jenwald
6da9448f6c Remove the web-com import map (PR 17588 follow-up)
With the changes in PR 17588 we're already importing the relevant code via the `web/app.js` file.
2024-02-07 16:33:27 +01:00
Jonas Jenwald
898172e9d2 Re-factor PDFPrintServiceFactory to use import maps
This is very old code, which can (ever so slightly) be simplified now that import maps are available.
2024-02-07 16:33:25 +01:00
Jonas Jenwald
6a78cf0d93 Remove support for require statements from the build system
This part of the (modern) preprocessor is now dead code, since we no longer use `require` statements anywhere in the main code-base.

Note that as part of the changes leading up to PDF.js version `4` we removed all[1] the remaining `require` statements, and we also have an ESLint rule to ensure that no new ones are accidentally added.

---
[1] With two small exceptions, in benchmarking-code and in the Webpack-example.
2024-02-07 13:34:46 +01:00
calixteman
60fd9d583d
Merge pull request #17611 from calixteman/caret_browsing_mode
Implement caret browsing mode (bug 807730)
2024-02-07 10:16:52 +01:00
Calixte Denizet
81466ee039 Implement caret browsing mode (bug 807730)
The users will be able to navigate within the pdf in using the arrows
and they'll be able to select some text, for example in order to
highlight it.
2024-02-07 09:35:22 +01:00
Tim van der Meij
7d9cc49010
Merge pull request #17620 from Snuffleupagus/PDFDataTransportStream-signature
Simplify the signature of the `PDFDataTransportStream` constructor
2024-02-04 15:24:26 +01:00
Jonas Jenwald
06cd278808 Simplify the signature of the PDFDataTransportStream constructor
Given that we need to pass in a `PDFDataRangeTransport`-instance a number of the needed parameters can be obtained from it, rather than having to specify them manually.
2024-02-03 13:10:42 +01:00
Jonas Jenwald
247af2ee09
Merge pull request #17619 from Snuffleupagus/string-split-limit
Use a limit, in more places, when splitting strings
2024-02-02 15:04:12 +01:00
Jonas Jenwald
363dce6744 Use a limit, in more places, when splitting strings
This should be a *tiny* bit more efficient, since it avoids parsing substrings that we don't care about.

*Please note:* I cannot find an ESLint rule to enforce this automatically.
2024-02-02 13:10:52 +01:00
Jonas Jenwald
af4d2fa53c
Merge pull request #17610 from Snuffleupagus/createBundleFallback-dev-path
Point the *development mode* fallback locale-path to the `l10n`-folder (issue 17609, PR 17603 follow-up)
2024-02-01 14:22:19 +01:00
Jonas Jenwald
da8297115f Point the *development mode* fallback locale-path to the l10n-folder (issue 17609, PR 17603 follow-up) 2024-02-01 13:03:36 +01:00
calixteman
cbbd1fcaa3
Merge pull request #17608 from wojtekmaj/fix-annotation-layer-parameters
Make downloadManager optional in AnnotationLayerParameters
2024-02-01 12:06:27 +01:00
Wojciech Maj
f80ba44fb0
Make downloadManager optional in AnnotationLayerParameters
Continuation of fix started in #17038
2024-02-01 11:08:12 +01:00
calixteman
49bcce27c1
Merge pull request #17605 from calixteman/file_perm
Change file permissions for newly added cursors
2024-02-01 10:00:28 +01:00
Calixte Denizet
081be89f54 Change file permissions for newly added cursors 2024-02-01 09:56:59 +01:00
Jonas Jenwald
eb5c1d441a
Merge pull request #17604 from Snuffleupagus/externalServices-lazy-init
Initialize the `ExternalServices`-instance lazily in the viewer (PR 17588 follow-up)
2024-01-31 22:12:52 +01:00
Jonas Jenwald
f11dc611b3 Initialize the ExternalServices-instance lazily in the viewer (PR 17588 follow-up) 2024-01-31 20:22:57 +01:00
Jonas Jenwald
9588bceff5
Merge pull request #17603 from Snuffleupagus/GenericL10n-fallback
Ensure that `GenericL10n` works if the locale files cannot be loaded
2024-01-31 15:16:48 +01:00
Jonas Jenwald
97c2ce9da0 Ensure that GenericL10n works if the locale files cannot be loaded
- Ensure that localization works in the GENERIC viewer, even if the necessary locale files cannot be loaded.
   This was the behaviour prior to the introduction of Fluent, and it seems worthwhile to keep that (especially since we already bundle the en-US strings anyway).

 - Let the `GenericL10n`-implementation use the *bundled* en-US strings directly when no language is provided.

 - Remove the `NullL10n`-implementation, and simply fallback to `GenericL10n`, to reduce the maintenance burden of viewer-components localization.

 - Indirectly, given the previous point, stop exporting `NullL10n` in the viewer-components since it's now removed.
   Note that it was never really intended to be used directly and only existed as a fallback.

*Please note:* This doesn't affect the Firefox PDF Viewer, thanks to the use of import maps.
2024-01-31 14:07:11 +01:00
calixteman
833d7ac830
Merge pull request #17602 from calixteman/editor_free_highlight_lastpoint
[Editor] Fix the position of the free highlight toolbar
2024-01-30 20:34:47 +01:00
calixteman
245fd02141
Merge pull request #17586 from calixteman/editor_freehighlight_outline_inside
[Editor] Remove the outline which is inside the free highlight shape
2024-01-30 17:56:52 +01:00
calixteman
f7ed040aa6
Merge pull request #17598 from calixteman/update_highlight_cursors
[Editor] Update highlight cursors
2024-01-30 17:16:04 +01:00
Calixte Denizet
3064361099 [Editor] Update highlight cursors 2024-01-30 16:11:18 +01:00
Calixte Denizet
7529c1e3dc [Editor] Fix the position of the free highlight toolbar 2024-01-30 15:40:33 +01:00
Calixte Denizet
b88c6f9c39 [Editor] Remove the outline which is inside the free highlight shape
When an highlight is self-intersecting, the outline was drawn inside.
In order to remove it, we use a svg mask to exclude the shape inside
when drawing the outlines.
That leads to change the outline 1px,white-2px,blue-1px,white to a
2px,white-2px,blue: the part of the stroke which is inside the shape
is removed because of the mask.
2024-01-30 14:40:56 +01:00
Jonas Jenwald
56dabe9390
Merge pull request #17596 from nicolo-ribaudo/fix-babel-plugin
Fix transform of unary expression in Babel plugin
2024-01-29 12:57:42 +01:00
Nicolò Ribaudo
a352f28785
Fix transform of unary expression in Babel plugin
All of our static evaluation & dead-code elimination transforms need to
happen in post-order, transforming inner nodes first. This is so that
in complex nested cases all transforms see the simplified version of
their inner nodes.

For example:
  async getNimbusExperimentData() {
    if (!PDFJSDev.test("GECKOVIEW")) { return null; }
    // other code
  }
-> [evaluation of PDFJSDev.*]
  async getNimbusExperimentData() {
    if (!false) { return null; }
    // other code
  }
-> [!false -> true]
  async getNimbusExperimentData() {
    if (true) { return null; }
    // other code
  }
-> [if (true) -> replace with the if branch]
  async getNimbusExperimentData() {
    return null;
    // other code
  }
-> [early return -> remove dead code]
  async getNimbusExperimentData() {
    return null;
    // other code
  }

This was done correctly in all cases except for our `UnaryExpression`
transform, which was happening in pre-order.
2024-01-29 11:53:17 +01:00
Jonas Jenwald
802f702695
Merge pull request #17593 from Snuffleupagus/debuggerSrc-AppOptions
Move the `debuggerSrc`-parameter into the `AppOptions`
2024-01-28 18:54:15 +01:00
Jonas Jenwald
eb36fd375c Move the debuggerSrc-parameter into the AppOptions
Having this parameter among a list of DOM-elements seems slightly strange now, however this is very old code hence the explanation for why this was done is for historical reasons (as is often the case).
Hence we can simply move this into `AppOptions` instead, which seems more appropriate overall.
2024-01-28 18:47:51 +01:00
Tim van der Meij
2e2127cbb5
Merge pull request #17592 from Snuffleupagus/viewer-generate-fileInput
[GENERIC viewer] Generate the `fileInput` DOM-element dynamically
2024-01-28 18:11:21 +01:00
Jonas Jenwald
f394031c1d [GENERIC viewer] Generate the fileInput DOM-element dynamically
Given that only the GENERIC viewer supports opening more than one PDF document, we can simplify things a tiny bit by instead generating the necessary DOM-element in JavaScript.
2024-01-28 16:51:28 +01:00
Tim van der Meij
32a5bb83d4
Merge pull request #17591 from Snuffleupagus/issue-17399
Re-enable the `should compress and save text` unit-test (issue 17399)
2024-01-28 14:47:52 +01:00
Jonas Jenwald
384291234d Re-enable the should compress and save text unit-test (issue 17399)
This unit-test is now failing in up to date versions of Node.js respectively Chromium-browsers, since `CompressionStream` no longer produces consistent data across all environments/browsers.
However logging the compressed TypedArray produced by `writeStream`, with Firefox respectively Chrome, and then feeding *both* of those TypedArray as input to `DecompressionStream` produced the same (correct) result in both browsers.

Hence the *exact* output of `CompressionStream` shouldn't matter, as long as we're able to successfully decompress it when the resulting PDF document is opened with the PDF.js library, and the unit-test is thus extended to check this.
2024-01-28 14:31:07 +01:00
Tim van der Meij
ab392584f3
Merge pull request #17590 from timvandermeij/updates
Update dependencies/translations to the most recent versions
2024-01-28 12:10:20 +01:00
Tim van der Meij
94309edc9a
Disable the "should compress and save text" unit test in Chrome too
Starting with Chrome 120.0.6099.109 (shipped with Puppeteer 21.8.0+) the
unit test fails in Chrome as well. The issue is tracked in #17399, but
for now we'll only run the unit test in Firefox so we can continue to
update Puppeteer while also still having a browser in which it runs,
until we figure out why the behavior of `CompressionStream` changed.
2024-01-27 20:34:30 +01:00
Tim van der Meij
f103f277ac
Update translations to the most recent versions 2024-01-27 19:13:06 +01:00
Tim van der Meij
f855a6dae8
Update dependencies to the most recent versions 2024-01-27 19:12:59 +01:00
Tim van der Meij
a6e0b0292e
Merge pull request #17588 from Snuffleupagus/DefaultExternalServices-lighten
Re-factor `DefaultExternalServices` into a regular class, without static methods
2024-01-27 14:13:49 +01:00
Jonas Jenwald
c6594b73a7 Stub out the getNimbusExperimentData method in "regular" MOZCENTRAL builds 2024-01-27 13:12:54 +01:00
Jonas Jenwald
5dd25b6e80 Re-factor DefaultExternalServices into a regular class, without static methods
The `DefaultExternalServices` code, which is used to provide build-specific functionality, is very old. This results in a pattern where we first initialize `PDFViewerApplication.externalServices` and then *override* it for the different builds.

By converting `DefaultExternalServices` into a "regular" class, and leveraging import maps, we can directly initialize the correct instance depending on the build.
2024-01-27 12:07:15 +01:00
Jonas Jenwald
d1080e785a Remove the createPreferences method from DefaultExternalServices
Given the simplicity of the `createPreferences` method, we can leverage import maps to directly initialize the correct `Preferences`-instance depending on the build.
2024-01-27 11:38:42 +01:00
Jonas Jenwald
1698991ae2 Remove the createDownloadManager method from DefaultExternalServices
Given the simplicity of the `createDownloadManager` method, we can leverage import maps to directly initialize the correct `DownloadManager`-instance depending on the build.
2024-01-27 11:38:36 +01:00
calixteman
d8f77e6b84
Merge pull request #17582 from calixteman/editor_highlight_thickness_tooltip
[Editor] Add a tooltip to the slider to set the thickness of free highlights
2024-01-26 19:20:08 +01:00
calixteman
e63fafd0fb
Merge pull request #17581 from calixteman/editor_highlight_cursor
[Editor] Change the cursors for highlighting (bug 1876588)
2024-01-26 18:52:29 +01:00
Jonas Jenwald
3192d37aa7
Merge pull request #17587 from Snuffleupagus/fix-FontInspector-textLayer-opacity
Fix the textLayer-opacity when using the FontInspector (PR 17533 follow-up)
2024-01-26 18:37:50 +01:00
Calixte Denizet
0432d1e8e6 [Editor] Add a tooltip to the slider to set the thickness of free highlights 2024-01-26 18:34:26 +01:00
Jonas Jenwald
fed3ef1743 Fix the textLayer-opacity when using the FontInspector (PR 17533 follow-up) 2024-01-26 18:31:38 +01:00
Calixte Denizet
f3bdbedf9b [Editor] Change the cursors for highlighting (bug 1876588) 2024-01-26 18:17:05 +01:00
calixteman
4ec43488ff
Merge pull request #17580 from calixteman/freetext_icon
[Editor] Change the icon to add a FreeText annotation (bug 1876564)
2024-01-25 18:20:20 +01:00
Calixte Denizet
01280d8e08 [Editor] Change the icon to add a FreeText annotation (bug 1876564) 2024-01-25 17:18:28 +01:00
calixteman
bf92360095
Merge pull request #17574 from calixteman/improve_bezier_bbox
Reduce memory use and improve perfs when computing the bounding box of a bezier curve (bug 1875547)
2024-01-25 10:07:48 +01:00
calixteman
2f4017e22b
Merge pull request #17578 from Snuffleupagus/css-vars-unreferenced
Fix unreferenced CSS variables (PR 17533 follow-up)
2024-01-25 10:04:37 +01:00
Jonas Jenwald
1cbcb89dac Fix unreferenced CSS variables (PR 17533 follow-up)
The latest mozilla-central update has test failures, because some CSS variables are not "properly" referenced; in particular:
 - Give `--hcm-highlight-selected-filter` a default value, of `none`, similar to the previously existing HCM filter.
 - Remove the `--mix-blend-mode` variable, since it's unused.
2024-01-25 09:43:20 +01:00
Calixte Denizet
7f2428a77e Reduce memory use and improve perfs when computing the bounding box of a bezier curve (bug 1875547)
It isn't really a fix for the mentioned bug but it slightly improve things.
In reducing the memory use, the time spent in the GC is reduced either.
The algorithm to compute the bounding box is the same as before but it has just
been rewritten to be more efficient.
2024-01-24 23:41:14 +01:00
calixteman
a5d4660a75
Merge pull request #17568 from calixteman/editor_free_highlight_thickness
[Editor] Add the possibility to change the thickness of a free highlight (bug 1876096)
2024-01-24 22:37:40 +01:00
Calixte Denizet
2b8ecf5688 [Editor] Add the possibility to change the thickness of a free highlight (bug 1876096) 2024-01-24 22:04:39 +01:00
calixteman
f81f9bb7d3
Merge pull request #17564 from calixteman/editor_update_ui_undo
[Editor] Update the parameters in the UI of the last selected editor when undoing/redoing
2024-01-24 21:52:54 +01:00
Calixte Denizet
d713df28c3 [Editor] Update the parameters in the UI of the last selected editor when undoing/redoing 2024-01-24 18:16:51 +01:00
Jonas Jenwald
ae62787080
Merge pull request #17563 from nicolo-ribaudo/build-step-remove-custom-webpack
Replace the webpack+acorn transform with a Babel plugin
2024-01-23 19:00:28 +01:00
Nicolò Ribaudo
f724ae98a1
Replace the webpack+acorn transform with a Babel plugin
This commit converts the pdfjsdev-loader transform into a Babel plugin,
to skip a AST->string->AST round-trip.

Before this commit, the webpack build process was:
1. Babel parses the code
2. Babel transforms the AST
3. Babel generates the code
4. Acorn parses the code
5. pdfjsdev-loader transforms the AST
6. @javascript-obfuscator/escodegen generates the code
7. Webpack parses the file
8. Webpack concatenates the files

After this commit, it is reduced to:
1. Babel parses the code
2. Babel transforms the AST
3. babel-plugin-pdfjs-preprocessor transforms the AST
4. Babel generates the code
5. Webpack parses the file
6. Webpack concatenates the files

This change improves the build time by ~25% (tested on MacBook Air M2):
- `gulp lib`: 3.4s to 2.6s
- `gulp dist`: 36s to 29s
- `gulp generic`: 5.5s to 4.0s
- `gulp mozcentral`: 4.7s to 3.2s

The new Babel plugin doesn't support the `saveComments` option of
pdfjsdev-loader, and it just always discards comments. Even though
pdfjsdev-loader supported multiple values for that option, it was
effectively ignored due to `acorn` dropping comments by default.
2024-01-23 16:00:59 +01:00
Nicolò Ribaudo
f5bb9bc21b
Rename preprocessor2.mjs to babel-plugin-pdfjs-preprocessor.mjs
This is in preparation for the next commit, which will convert
preprocessor2.mjs to a Babel plugin. The purpose of this commit
is to help git track the rename regardless of the large amount
of changes.
2024-01-23 13:13:43 +01:00
Jonas Jenwald
8b24722113
Merge pull request #17562 from Snuffleupagus/evaluator-more-async
Add more `async` code in the `PartialEvaluator`
2024-01-23 10:35:27 +01:00
Jonas Jenwald
fa583427ef Always export the "raw" /ToUnicode-data from PartialEvaluator.preEvaluateFont (PR 13354 follow-up)
This, ever so slightly, simplifies the implementation in the `PartialEvaluator.extractDataStructures`-method.
2024-01-22 13:06:32 +01:00
Jonas Jenwald
f21a30dfb4 Convert the PartialEvaluator.readToUnicode method to be async 2024-01-22 12:47:06 +01:00
Jonas Jenwald
f5c01188dc Convert the PartialEvaluator.extractDataStructures method to be async 2024-01-22 12:47:06 +01:00
Jonas Jenwald
cf0797dfbd Use await consistently in the PartialEvaluator.setGState method 2024-01-22 12:47:06 +01:00
Jonas Jenwald
1cc83c4fdc Use await consistently in the PartialEvaluator.buildFormXObject method 2024-01-22 12:47:06 +01:00
calixteman
bba831821d
Merge pull request #17558 from calixteman/bug1669097
Print correctly documents containing chars with an unicode greater than 0xFFFF (bug 1669097)
2024-01-22 12:23:06 +01:00
Calixte Denizet
06601fd90c Print correctly documents containing chars with an unicode greater than 0xFFFF (bug 1669097) 2024-01-22 10:48:00 +01:00
Tim van der Meij
49b2d9b5af
Merge pull request #17556 from Snuffleupagus/issue-17554
Ensure that `EvaluatorPreprocessor.opMap` has a null-prototype (issue 17554)
2024-01-21 20:58:09 +01:00
Tim van der Meij
1ed68933e5
Merge pull request #17555 from timvandermeij/gulpfile-exit-code
Don't ignore `test.mjs` child process exit codes in the Gulpfile
2024-01-21 20:34:22 +01:00
Tim van der Meij
d549c2ef4c
Merge pull request #17553 from Snuffleupagus/async-handleSetFont
Add more `async` code when loading fonts in the `PartialEvaluator`
2024-01-21 20:00:29 +01:00
Jonas Jenwald
d7e41d4cb6 Ensure that EvaluatorPreprocessor.opMap has a null-prototype (issue 17554)
This accidentally regressed in PR 16956, sorry about that!
2024-01-21 19:59:13 +01:00
Tim van der Meij
6dd77b3c14
Don't ignore test.mjs child process exit codes in the Gulpfile
In the Gulpfile only the exit codes of `test.mjs` child processes
erroneously aren't checked. This causes failures in `test.mjs` to be
logged but not propagated to the master process, which in turn causes
test runners such as GitHub Actions to succeed because they only
monitor the master process. This is easy to reproduce by throwing an
error at the top of `test.mjs` and running `gulp makeref` or `gulp
unittest`: the error is logged, but the task that spawned the child
process succeeds and the master process exits with exit code 0. This is
problematic because it can easily cause errors to go by unnoticed.

This commit fixes the issue by making sure that the `test.mjs`
invocations are handled in the same way as the other child processes
in the file, i.e., if the child process exits with a non-zero exit code
then the master process also exits with a non-zero exit code. After this
patch the error is still logged, but the task now also fails and the
master process exits with exit code 1 to properly signal failure.
2024-01-21 19:37:13 +01:00
Jonas Jenwald
3c2c0ecd88 Use the ESLint arrow-body-style rule in more spots in src/core/evaluator.js 2024-01-21 17:42:33 +01:00
Jonas Jenwald
d1bef8cb86 Use await consistently in the PartialEvaluator.translateFont method 2024-01-21 17:36:50 +01:00
Jonas Jenwald
fc62eec901 Convert the handleSetFont methods, in src/core/evaluator.js, to be async 2024-01-21 17:32:05 +01:00
Jonas Jenwald
fce822cde0
Merge pull request #17550 from Snuffleupagus/arrow-fn-shorter
Use shorter arrow functions where possible
2024-01-21 17:21:32 +01:00
calixteman
10eef372ff
Merge pull request #17548 from calixteman/eslint_jasmine
Avoid to have focused tests in using eslint-plugin-jasmine
2024-01-21 16:36:41 +01:00
Jonas Jenwald
f9a384d711 Enable the arrow-body-style ESLint rule
This manually ignores some cases where the resulting auto-formatting would not, as far as I'm concerned, constitute a readability improvement or where we'd just end up with more overall indentation.

Please see https://eslint.org/docs/latest/rules/arrow-body-style
2024-01-21 16:20:55 +01:00
Jonas Jenwald
998184a00e Remove the no-confusing-arrow ESLint rule since it's deprecated
Please see https://eslint.org/docs/latest/rules/no-confusing-arrow
2024-01-21 15:45:28 +01:00
Jonas Jenwald
9dfe9c552c Use shorter arrow functions where possible
For arrow functions that are both simple and short, we can avoid using explicit `return` to shorten them even further without hurting readability.

For the `gulp mozcentral` build-target this reduces the overall size of the output by just under 1 kilo-byte (which isn't a lot but still can't hurt).
2024-01-21 10:13:12 +01:00
calixteman
6e46304357
Merge pull request #17539 from calixteman/color_picker_kb
[Editor] Don't add the keyboard listener on the color-picker each time the dropdown menu is shown
2024-01-20 22:24:37 +01:00
Calixte Denizet
99ee308f3d Avoid to have focused tests in using eslint-plugin-jasmine 2024-01-20 22:10:42 +01:00
Calixte Denizet
0cca9a0240 [Editor] Don't add the keyboard listener on the color-picker each time the dropdown menu is shown
and display/hide the dropdown menu when pressing arrow keys.
2024-01-20 21:57:54 +01:00
calixteman
f24246150e
Merge pull request #17541 from calixteman/issue17540
Use the original value of a field when propagating event (fixes #17540)
2024-01-20 21:51:37 +01:00
calixteman
03aa8a12d2
Merge pull request #17543 from calixteman/bug1869767
[Editor] Unselect highlights when the user click on the text layer (bug 1869767)
2024-01-20 21:50:19 +01:00
Tim van der Meij
626674553d
Merge pull request #17547 from timvandermeij/remove-dns-resolver-workaround
Remove DNS resolver workaround from the test framework
2024-01-20 20:23:37 +01:00
Tim van der Meij
c70edbced7
Remove DNS resolver workaround from the test framework
The `if` statement is no longer necessary because the Node.js versions
that didn't provide `dns.setDefaultResultOrder` are no longer supported,
but looking into this a bit more it turns out that the entire workaround
is no longer necessary because the issue got fixed in Firefox 105 in bug
1769994. Indeed, Firefox now starts nicely with the workaround removed.

Reverts 60ed3cd297c4045b90f4114a74e5baa4ef1c5056.
2024-01-20 20:05:08 +01:00
Tim van der Meij
c9b1a8f761
Merge pull request #17546 from Snuffleupagus/git-blame-ignore
Ignore auto-formatting patches in `git blame`
2024-01-20 14:04:55 +01:00
Tim van der Meij
9b0b099713
Merge pull request #17544 from Snuffleupagus/update-packages
Update packages and translations
2024-01-20 14:03:52 +01:00
Jonas Jenwald
c9755bdbc8 Ignore auto-formatting patches in git blame
When using Prettier to auto-format (parts of) the code-base you usually end up with *huge* patches that touch lots of lines without making any actual changes.
This often adds unnecessary steps when using `git blame`, however it's easy enough to avoid this; please refer to https://docs.github.com/en/repositories/working-with-files/using-files/viewing-a-file#ignore-commits-in-the-blame-view
2024-01-20 12:01:23 +01:00
Jonas Jenwald
2dd6910aa4 Update l10n files 2024-01-20 09:54:21 +01:00
Jonas Jenwald
a5a9357e15 Update npm packages 2024-01-20 09:52:57 +01:00
Calixte Denizet
5732c0c54a Use the original value of a field when propagating event (fixes #17540)
And avoid to not format a field when the value is 0.
2024-01-19 22:13:51 +01:00
Calixte Denizet
f3b76f5ae2 [Editor] Unselect highlights when the user click on the text layer (bug 1869767) 2024-01-19 20:16:55 +01:00
Jonas Jenwald
f8e3c79cb5
Merge pull request #17537 from Snuffleupagus/rm-isArrayBuffer
Remove the `isArrayBuffer` helper function
2024-01-19 15:37:02 +01:00
calixteman
f6c4b29aa2
Merge pull request #17531 from calixteman/editor_free_highlight_print_save
[Editor] Add support for printing/saving free highlight annotations
2024-01-19 15:23:29 +01:00
calixteman
5d2e7cf3fc
Merge pull request #17533 from calixteman/caret_mode
Make the caret visible in the text layer in caret browsing mode
2024-01-19 15:22:08 +01:00
Jonas Jenwald
b37536c38c Remove the isArrayBuffer helper function
This old helper function can now be replaced with `ArrayBuffer.isView()` and/or `instanceof ArrayBuffer` checks, as needed depending on the situation.
2024-01-19 14:10:52 +01:00
calixteman
a0e2b62245
Merge pull request #17534 from calixteman/bug1875357
[Editor] Change the arrow direction when the dropdown is visible in the color picker (bug 1875357)
2024-01-19 13:08:12 +01:00
Calixte Denizet
a1bf12537c [Editor] Change the arrow direction when the dropdown is visible in the color picker (bug 1875357)
and hide the dropdown when the user click outside of the color picker.
2024-01-19 13:02:11 +01:00
Calixte Denizet
d64f334f98 [Editor] Add support for printing/saving free highlight annotations 2024-01-19 12:58:46 +01:00
Calixte Denizet
83c78dbfa8 Make the caret visible in the text layer in caret browsing mode
In order to do that we must change the text layer opacity to 1 but
it has several implications:
 - the selection color must have an alpha component,
 - the background color of the span used for highlighted words
   must have an alpha component either, but now the opacity is 1
   we can use some backdrop-filters in HCM making the highlighted
   words more visible.
 - fix a regression caused by #17196: the css variable --hcm-highlight-filter
   has to live under the #viewer element because in HCM it's overwritten
   by js at this level, hence links annotations for example didn't
   have the right colors when hovered.
2024-01-18 19:44:21 +01:00
calixteman
1cdbcfef82
Merge pull request #17506 from calixteman/editor_free_highlight
[Editor] Add the ability to make a free highlight (i.e. without having to select some text) (bug 1856218)
2024-01-18 17:47:27 +01:00
Calixte Denizet
8fbfef0c07 [Editor] Add the ability to make a free highlight (i.e. without having to select some text) (bug 1856218)
The free highlighting is enabled when the mouse pointer isn't on some text.
Then we draw a shape with smoothed borders corresponding to the movement of
the mouse.
Printing/saving and changing the thickness will come later.
2024-01-18 16:26:04 +01:00
calixteman
a22b5a4f02
Merge pull request #17528 from calixteman/highlight_not_draggable
[Editor] Avoid to move a non-draggable editor with the keyboard
2024-01-16 22:27:14 +01:00
Jonas Jenwald
cb38882d74
Merge pull request #17529 from Snuffleupagus/skip-web-locale
Exclude the `web/locale/` folder from linting (PR 17525 follow-up)
2024-01-16 22:22:49 +01:00
Calixte Denizet
70a9d8f3bc [Editor] Avoid to move a non-draggable editor with the keyboard 2024-01-16 21:41:52 +01:00
calixteman
9c377922ef
Merge pull request #17527 from calixteman/color_pick_exception
[Editor] Avoid an exception when pressing space key to change the color of an highlight
2024-01-16 21:13:56 +01:00
Jonas Jenwald
79594ff876 Exclude the web/locale/ folder from linting (PR 17525 follow-up)
Given that the contents of this folder is generated by `gulp locale` it's essentially build-output and thus shouldn't be included in linting.
2024-01-16 20:25:01 +01:00
calixteman
bf6cc83e7a
Merge pull request #17525 from calixteman/prettier_json
Format json files in using prettier
2024-01-16 20:16:56 +01:00
Calixte Denizet
a76cc40ab8 [Editor] Avoid an exception when pressing space key to change the color of an highlight 2024-01-16 20:00:23 +01:00
Calixte Denizet
29de9bdce6 Format json files in using prettier 2024-01-16 19:40:25 +01:00
calixteman
e7d782e887
Merge pull request #17405 from calixteman/libertine
Add the font Linux Libertine as a possible substitution for Times New Roman
2024-01-16 14:32:30 +01:00
Calixte Denizet
10389c5017 Add the font Linux Libertine as a possible substitution for Times New Roman
and try to load the font family (guessed from the font name) before trying
the local substitution.
The local(...) command expects to have a real font name and not a predefined
substitution it's why we try the font family.
2024-01-16 12:31:23 +01:00
calixteman
51413be5b6
Merge pull request #17519 from calixteman/editor_movable_touchscreen
[Editor] Make editors draggable with touchscreens
2024-01-16 10:47:38 +01:00
Calixte Denizet
b8aab5d14e [Editor] Make editors draggable with touchscreens 2024-01-15 23:20:55 +01:00
calixteman
3110865484
Merge pull request #17517 from calixteman/editor_highlight_simplify_ser
[Editor] Slightly simplify the serialization of an highlight annotation
2024-01-15 18:50:37 +01:00
Calixte Denizet
ee72b32dc2 [Editor] Slightly simplify the serialization of an highlight annotation
We were computing width and height of the annotation before serializing
which is useless because the rect already contains this information.
2024-01-15 18:22:01 +01:00
calixteman
7769018316
Merge pull request #17514 from calixteman/issue17418
[Editor] Draw a line instead of a Bezier curve when an Ink has only one point
2024-01-15 14:23:04 +01:00
Calixte Denizet
e9946fa22a [Editor] Draw a line instead of a Bezier curve when an Ink has only one point
Fixes #17418.
2024-01-15 13:32:36 +01:00
calixteman
2ca20dea43
Merge pull request #17512 from calixteman/issue17492
Take into account empty lines when extracting text content from the appearance
2024-01-15 12:44:14 +01:00
calixteman
e98a813e09
Merge pull request #17511 from calixteman/issue17079
[Editor] Extract all the lines when adding a FreeText annotation
2024-01-15 10:40:49 +01:00
calixteman
d3b5f60995
Merge pull request #17513 from calixteman/update_l10n
Update l10n files
2024-01-15 10:18:46 +01:00
Calixte Denizet
7580770aac Update l10n files 2024-01-14 21:18:58 +01:00
Calixte Denizet
9765d57a26 [Editor] Extract all the lines when adding a FreeText annotation
Fixes #17079.
2024-01-14 21:11:51 +01:00
Calixte Denizet
405f573d70 Take into account empty lines when extracting text content from the appearance
Fixes #17492.
2024-01-14 20:23:29 +01:00
Tim van der Meij
dc92ab850a
Merge pull request #17508 from Snuffleupagus/pr-14388-followup
Consistently remove the "visibilitychange" listener in `PDFViewer` (PR 14388 follow-up)
2024-01-14 16:21:29 +01:00
Tim van der Meij
704747b143
Merge pull request #17489 from nicolo-ribaudo/gulp-cli-dep
Update `gulp-cli` to 2.3.0 and explicitly add it as a dependency
2024-01-14 16:18:26 +01:00
Tim van der Meij
07cb42243c
Merge pull request #17507 from Snuffleupagus/version-4.1
Bump library version to `4.1`
2024-01-14 16:09:18 +01:00
Tim van der Meij
ff93dfc560
Merge pull request #17490 from nicolo-ribaudo/macos-m2-note
Add note about running `npm install` on MacOS
2024-01-14 16:04:54 +01:00
Jonas Jenwald
b168f71fde Consistently remove the "visibilitychange" listener in PDFViewer (PR 14388 follow-up)
By always removing the "visibilitychange" listener in the `PDFViewer.#onePageRenderedOrForceFetch`-method we can (ever so slightly) reduce duplication in the code.
2024-01-13 10:51:26 +01:00
Jonas Jenwald
6dc225bdbb Bump library version to 4.1 2024-01-13 09:28:56 +01:00
Jonas Jenwald
56ca2fd658
Merge pull request #17504 from Snuffleupagus/GlobalWorkerOptions-validate
[api-minor] Validate the `workerPort`/`workerSrc` options
2024-01-13 09:23:29 +01:00
Jonas Jenwald
f0af52032b [api-minor] Validate the workerPort/workerSrc options
Ensure that users cannot provide incorrect values when trying to set the global worker-options.
This patch was prompted by occasionally seeing users manually loading the `pdf.worker.mjs`-file and then assigning it to the `workerSrc`-option, something that obviously doesn't make sense and will cause fake-workers to be used (with poor performance as a result).
2024-01-12 17:13:32 +01:00
calixteman
0d011472a4
Merge pull request #17501 from calixteman/editor_highlight_serialization
[Editor] Correctly serialize highlight data (regression from #17499)
2024-01-12 16:42:59 +01:00
Calixte Denizet
fc7c320bd8 [Editor] Correctly serialize highlight data (regression from #17499) 2024-01-12 15:37:01 +01:00
calixteman
61e5dae7fd
Merge pull request #17499 from calixteman/editor_outliner
[Editor] Move the code to generate the SVG path from draw_layer.js to outliner.js
2024-01-12 13:59:26 +01:00
Calixte Denizet
94ad3afab6 [Editor] Move the code to generate the SVG path from draw_layer.js to outliner.js
It'll be useful to avoid too much duplicated code when adding the free highlighting tool.
2024-01-11 19:10:33 +01:00
calixteman
35daccf34b
Merge pull request #17498 from calixteman/editor_dont_throw_highlight_color
[Editor] Don't throw when changing the color of an invisible highlight
2024-01-11 18:34:01 +01:00
Calixte Denizet
b4a7007397 [Editor] Don't throw when changing the color of an invisible highlight 2024-01-11 17:48:06 +01:00
Jonas Jenwald
12875359c3
Merge pull request #17494 from mozilla/dependabot/npm_and_yarn/follow-redirects-1.15.4
Bump follow-redirects from 1.15.3 to 1.15.4
2024-01-11 09:59:21 +01:00
dependabot[bot]
7d15d23147
Bump follow-redirects from 1.15.3 to 1.15.4
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.3 to 1.15.4.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.3...v1.15.4)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-11 04:54:43 +00:00
Nicolò Ribaudo
4197f6a284
Add note about running npm install on MacOS 2024-01-10 15:21:15 +01:00
Nicolò Ribaudo
d2a5210475
Update gulp-cli to 2.3.0 and explicitly add it as a dependency 2024-01-10 14:59:32 +01:00
calixteman
903af4ee00
Merge pull request #17487 from calixteman/fix_final_spaces
Remove terminal white spaces when extracting text from annotation appearances
2024-01-10 10:03:52 +01:00
Calixte Denizet
0392feaee4 Remove terminal white spaces when extracting text from annotation appearances 2024-01-09 10:42:53 +01:00
Tim van der Meij
29faa38dd7
Merge pull request #17482 from Snuffleupagus/update-packages
Update packages and translations
2024-01-06 14:16:56 +01:00
Jonas Jenwald
2cb93cc344 Update l10n files 2024-01-06 10:10:22 +01:00
Jonas Jenwald
c5a69544af Update npm packages 2024-01-06 10:09:12 +01:00
calixteman
6c5e237a40
Merge pull request #17481 from calixteman/editor_default_init
[Editor] Init the default highlight color before creating the first editor instance
2024-01-05 22:00:08 +01:00
Calixte Denizet
17e1519410 [Editor] Init the default highlight color before creating the first editor instance
We want to be able to draw an highlight with the default color but without having an
instance of the HighlightEditor.
2024-01-05 17:52:54 +01:00
calixteman
130a0fef3d
Merge pull request #17458 from calixteman/bug1871353
Preserve the whitespaces when getting text from FreeText annotations (bug 1871353)
2024-01-05 14:21:27 +01:00
Calixte Denizet
7839e7b495 Preserve the whitespaces when getting text from FreeText annotations (bug 1871353)
When the text of an annotation is extracted in using getTextContent, consecutive white spaces
are just replaced by one space and. So this patch add an option to make sure that white
spaces are preserved when appearance is parsed.
For the case where there's no appearance, we can have a fast path to get the correct string
from the Content entry.
When an existing FreeText is edited, space (0x20) are replaced by non-breakable (0xa0) ones
to make to see all of them on screen.
2024-01-05 10:20:32 +01:00
calixteman
1019b9f821
Merge pull request #17476 from calixteman/bug1869001
Avoid to have the text layer mismatching the rendered text with mismatching locales (bug 1869001)
2024-01-04 22:03:35 +01:00
Calixte Denizet
f84f48b5d0 Avoid to have the text layer mismatching the rendered text with mismatching locales (bug 1869001)
The system locale (used in OffscreenCanvas) can be different from the one guessed by Fluent,
consequently, in order to avoid any mismatch, we just use an attached canvas element.
The original issue can easily be reproduced locally in adding a lang="ja" in viewer.html
(or with an other language for Japanese users).
2024-01-04 19:20:20 +01:00
calixteman
7873ad98bb
Merge pull request #17477 from calixteman/puppeteer21.7.0
Update Puppeteer to version 21.7.0
2024-01-04 19:00:30 +01:00
Calixte Denizet
e5ccb70efb Update Puppeteer to version 21.7.0 2024-01-04 16:11:09 +01:00
calixteman
dc01782633
Merge pull request #17475 from calixteman/bug1872721
[Editor] Take into account the crop box when saving/printing some highlighted text (bug 1872721)
2024-01-03 13:43:31 +01:00
Calixte Denizet
35863cd54b [Editor] Take into account the crop box when saving/printing some highlighted text (bug 1872721) 2024-01-02 18:53:33 +01:00
Tim van der Meij
231c79800b
Merge pull request #17474 from timvandermeij/bump
Bump the stable version in `pdfjs.config`
2023-12-31 15:34:28 +01:00
Tim van der Meij
fea192fbf9
Bump the stable version in pdfjs.config 2023-12-31 15:31:03 +01:00
Tim van der Meij
9e14d04fd9
Merge pull request #17464 from Snuffleupagus/rm-toolbar-reset-events
Remove the internal "toolbarreset"/"secondarytoolbarreset" events and slightly re-factor the code
2023-12-29 12:47:20 +01:00
Tim van der Meij
afa65dc766
Merge pull request #17461 from mozilla/dependabot/github_actions/actions/deploy-pages-4
Bump actions/deploy-pages from 3 to 4
2023-12-29 12:27:35 +01:00
Tim van der Meij
aef9f7a0cd
Merge pull request #17460 from mozilla/dependabot/github_actions/actions/upload-artifact-4
Bump actions/upload-artifact from 3 to 4
2023-12-29 12:26:29 +01:00
Jonas Jenwald
b1ca270162 Remove the internal "secondarytoolbarreset" event and slightly re-factor the code
With modern JavaScript class features we can move the relevant event handling into private methods, and thus invoke it directly when resetting the toolbar UI-state.

*Please note:* This patch slightly reduces the size of the `web/secondary_toolbar.js` file.
2023-12-26 11:03:07 +01:00
Jonas Jenwald
234b57bb45 Remove the internal "toolbarreset" event and slightly re-factor the code
With modern JavaScript class features we can move the relevant event handling into private methods, and thus invoke it directly when resetting the toolbar UI-state.

*Please note:* This patch slightly reduces the size of the `web/toolbar.js` file.
2023-12-26 10:57:02 +01:00
dependabot[bot]
4e786f68bc
Bump actions/deploy-pages from 3 to 4
Bumps [actions/deploy-pages](https://github.com/actions/deploy-pages) from 3 to 4.
- [Release notes](https://github.com/actions/deploy-pages/releases)
- [Commits](https://github.com/actions/deploy-pages/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/deploy-pages
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-25 12:11:47 +00:00
dependabot[bot]
f56d6802ad
Bump actions/upload-artifact from 3 to 4
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3 to 4.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-25 12:11:44 +00:00
Tim van der Meij
3b94e9fdce
Merge pull request #17456 from Snuffleupagus/update-packages
Update packages and translations
2023-12-23 13:34:32 +01:00
Jonas Jenwald
0324187734 Update l10n files 2023-12-23 12:32:00 +01:00
Jonas Jenwald
3793a56116 Update npm packages 2023-12-23 12:29:51 +01:00
Jonas Jenwald
faa24e8ce2
Merge pull request #17428 from Snuffleupagus/cacheGlobally-CopyImage
Attempt to further reduce re-parsing for globally cached images (PR 11912, 16108 follow-up)
2023-12-22 10:25:46 +01:00
Jonas Jenwald
9f02cc36d4 Attempt to further reduce re-parsing for globally cached images (PR 11912, 16108 follow-up)
In PR 11912 we started caching images that occur on multiple pages globally, which improved performance a lot in many PDF documents.
However, one slightly annoying limitation of the implementation is the need to re-parse the image once the global-caching threshold has been reached. Previously this was difficult to avoid, since large image-resources will cause cleanup to run on the main-thread after rendering has finished. In PR 16108 we started delaying this cleanup a little bit, to improve performance if a user e.g. zooms and/or rotates the document immediately after rendering completes.

Taking those two PRs together, we now have a situation where it's much more likely that the main-thread has "globally used" images cached at the page-level. Hence we can instead attempt to *copy* a locally cached image into the global object-cache on the main-thread and thus reduce unnecessary re-parsing of large/complex global images, which significantly reduces the rendering time in many cases.

For the PDF document in issue 11878, the rendering time of *the second page* changes as follows (on my computer):
 - With the `master`-branch it takes >600 ms to render.
 - With this patch that goes down to ~50 ms, which is one order of magnitude faster.

(Note that all other pages are, as expected, completely unaffected by these changes.)

This new main-thread copying is limited to "large" global images, since:
 - Re-parsing of small images, on the worker-thread, is usually fast enough to not be an issue.
 - With the delayed cleanup after rendering, it's still not guaranteed that an image is available in a page-level cache on the main-thread.
 - This forces the worker-thread to wait for the main-thread, which is a pattern that you always want to avoid unless absolutely necessary.
2023-12-21 21:26:21 +01:00
Jonas Jenwald
e547b198a3 Compute the length of the final image-bitmap/data on the worker-thread
Currently this is done in the API, but moving it into the worker-thread will simplify upcoming changes.
2023-12-21 21:26:21 +01:00
Jonas Jenwald
b09f238436 Add iteration support in the PDFObjects class
This (obviously) only includes "resolved" data, and will be used in an upcoming patch.
2023-12-21 21:26:21 +01:00
Jonas Jenwald
7ea0e40e58
Merge pull request #17441 from Snuffleupagus/outlineOptionsContainer-CSS-toggle
Toggle the visibility of the `outlineOptionsContainer`, in the sidebar, using only CSS
2023-12-20 20:27:15 +01:00
Jonas Jenwald
13da916885
Merge pull request #17445 from pulsejet/pulsejet/fix-destroy
Prevent errors in `AnnotationEditorUIManager.destroy` if the `altTextManager` is undefined
2023-12-20 20:25:36 +01:00
Varun Patil
4d34107228 Prevent error in AnnotationEditorUIManager.destroy if altTextManager is null 2023-12-20 23:18:34 +05:30
Jonas Jenwald
82464294b9 Toggle the visibility of the outlineOptionsContainer, in the sidebar, using only CSS
Now that `:has()` is available we no longer need to use JavaScript to toggle the visibility of this DOM element.
2023-12-19 10:01:16 +01:00
Jonas Jenwald
52ffd26da9
Merge pull request #17436 from mozilla/revert-17435-dependabot/github_actions/actions/upload-artifact-4
Revert "Bump actions/upload-artifact from 3 to 4"
2023-12-18 15:04:32 +01:00
Jonas Jenwald
933e107073
Revert "Bump actions/upload-artifact from 3 to 4" 2023-12-18 15:01:19 +01:00
Jonas Jenwald
6fc3b438f7
Merge pull request #17434 from mozilla/dependabot/github_actions/github/codeql-action-3
Bump github/codeql-action from 2 to 3
2023-12-18 14:54:11 +01:00
Jonas Jenwald
8d49a508f2
Merge pull request #17435 from mozilla/dependabot/github_actions/actions/upload-artifact-4
Bump actions/upload-artifact from 3 to 4
2023-12-18 14:53:52 +01:00
Jonas Jenwald
648c8f4abb
Merge pull request #17429 from jdanyow/patch-1
Center radio button checkmark
2023-12-18 14:06:36 +01:00
dependabot[bot]
25a0a68def
Bump actions/upload-artifact from 3 to 4
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3 to 4.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-18 12:39:30 +00:00
dependabot[bot]
2e82d947a6
Bump github/codeql-action from 2 to 3
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2 to 3.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-18 12:39:26 +00:00
Tim van der Meij
34eb6fecac
Merge pull request #17431 from timvandermeij/modernize-test
Modernize the code in the `test/downloadutils.mjs` file
2023-12-17 22:07:09 +01:00
Tim van der Meij
f9a0d4efe8
Modernize the rewriteWebArchiveUrl test helper function
This commit changes the code to use a template string and to use `const`
instead of `var`. Combined with the previous commits this allows for
enabling the ESLint `no-var` rule for this file now.
2023-12-17 21:53:50 +01:00
Tim van der Meij
0a10a7b57b
Modernize the downloadManifestFiles/ensurePDFsDownloaded test helper functions
The test helper code largely predates the introduction of modern
JavaScript features and should be refactored to improve readability.
In particular callbacks make the code harder to understand and maintain.

This commit:

- replaces the callback argument with returning a promise;
- replaces the recursive function calls with a simple loop;
- uses `const`/`let` instead of `var`;
- uses arrow functions for shorter code;
- uses template strings for shorter string formatting code.
2023-12-17 21:53:50 +01:00
Tim van der Meij
86bee4409a
Modernize the downloadFile test helper function
The test helper code largely predates the introduction of modern
JavaScript features and should be refactored to improve readability.
In particular callbacks make the code harder to understand and maintain.

This commit:

- replaces the callback argument with returning a promise;
- uses `const` instead of `var`;
- uses arrow functions for shorter code;
- uses template strings for shorter string formatting code;
- uses `Array.includes` for shorter response code checking code.
2023-12-17 21:53:50 +01:00
Jeremy Danyow
1299912744
Center radio button checkmark
fixes #12238
2023-12-16 07:28:03 -08:00
calixteman
91188cf2f8
Merge pull request #17414 from calixteman/fix_l11y_highlight
[Editor] Add some missing strings to localize for highlighting
2023-12-12 20:17:18 +01:00
Calixte Denizet
eff8b2c67b [Editor] Add some missing strings to localize for highlighting 2023-12-12 19:57:38 +01:00
Tim van der Meij
76e3e52021
Merge pull request #17415 from emielmolenaar/fix-viewer-button-closing-tag
Adds missing button closing tag
2023-12-11 22:30:53 +01:00
Tim van der Meij
27d4fff5f2
Merge pull request #17412 from mozilla/dependabot/github_actions/actions/deploy-pages-3
Bump actions/deploy-pages from 2 to 3
2023-12-11 22:24:13 +01:00
Tim van der Meij
51187dce06
Merge pull request #17411 from mozilla/dependabot/github_actions/actions/setup-python-5
Bump actions/setup-python from 4 to 5
2023-12-11 22:23:38 +01:00
Emiel Molenaar
844c4ebad3
Adds missing button closing tag 2023-12-11 17:42:43 +01:00
dependabot[bot]
b388d407a8
Bump actions/deploy-pages from 2 to 3
Bumps [actions/deploy-pages](https://github.com/actions/deploy-pages) from 2 to 3.
- [Release notes](https://github.com/actions/deploy-pages/releases)
- [Commits](https://github.com/actions/deploy-pages/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/deploy-pages
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-11 12:14:23 +00:00
dependabot[bot]
93143c03fa
Bump actions/setup-python from 4 to 5
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 4 to 5.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-11 12:14:19 +00:00
Tim van der Meij
39a1fc6992
Merge pull request #17400 from calixteman/autoprint_test
Set a print listener as soon as possible in the autoprint integration test
2023-12-09 20:12:45 +01:00
Calixte Denizet
82be74d036 Set a print listener as soon as possible in the autoprint integration test
This test intermittently fails, likely because the auto-print is triggered fast enough
that we don't manage to get it.
So this patch aims to try to set a listener very early in order to be sure that
we'll be aware that a print has been triggered.
2023-12-09 16:59:43 +01:00
Tim van der Meij
056e6393d0
Merge pull request #17398 from calixteman/test_dont_run_beforeunload
Don't run beforeunload callback when closing page in integration tests
2023-12-09 15:04:00 +01:00
Jonas Jenwald
553729869b
Merge pull request #17397 from Snuffleupagus/app-createScripting-move-options
Re-factor how the `sandboxBundleSrc` option is passed to `PDFScriptingManager`
2023-12-09 14:33:42 +01:00
Jonas Jenwald
92c15a61f1 Re-factor how the sandboxBundleSrc option is passed to PDFScriptingManager
Given that this option isn't used in the Firefox PDF Viewer, we can (ever so slightly) reduce the amount of code needed.
2023-12-09 14:29:31 +01:00
Jonas Jenwald
988d3a188f
Merge pull request #17395 from Snuffleupagus/pypdf-2332
Support Annotations with corrupt /BS-entries
2023-12-09 14:18:29 +01:00
Calixte Denizet
e25cf1ba6f Don't run beforeunload callback when closing page in integration tests
For now, running such callbacks is disabled in Firefox but there are some
plan to reenable them: https://bugzilla.mozilla.org/show_bug.cgi?id=1824220
Having them blocks us to switch to bidi with Chrome.
2023-12-09 14:15:18 +01:00
Jonas Jenwald
a1d859c082 Disable the "should compress and save text" unit-test in Node.js (PR 17202 follow-up)
It seems this unit-test now fails consistently in "all" up-to-date Node.js versions. We should probably try and understand why, but for now just disable it to get passing CI tests.
2023-12-09 14:13:11 +01:00
Tim van der Meij
d6b9e62463
Merge pull request #17391 from Snuffleupagus/AppOptions-collect-non-MOZCENTRAL
Collect a few non-MOZCENTRAL `AppOptions` default values together
2023-12-09 13:59:38 +01:00
Tim van der Meij
c908f2d55c
Merge pull request #17372 from Snuffleupagus/fuzzing-VerbosityLevel-ERRORS
Limit the amount of console "spam" during fuzz tests (PR 17337 follow-up)
2023-12-09 13:57:23 +01:00
Jonas Jenwald
63eb8991a3 Support Annotations with corrupt /BS-entries
There's obviously a few things wrong with the Annotations in the referenced PDF document, however parsing of an Annotation shouldn't just break if the /BS-entry isn't a dictionary.
2023-12-09 10:36:18 +01:00
calixteman
07aa706f1c
Merge pull request #17172 from whimboo/webdriver-bidi
Switch Puppeteer tests from CDP to WebDriver BiDi
2023-12-08 23:02:37 +01:00
Henrik Skupin
d04d28a56d
Remove unnecessary loop for closing open pages 2023-12-08 21:59:18 +01:00
Henrik Skupin
4db01746d8
Run integration tests with WebDriver BiDi instead of CDP for Firefox. 2023-12-08 20:32:50 +01:00
calixteman
15103600ea
Merge pull request #17393 from whimboo/puppeteer_21.6.0
Update Puppeteer to version 21.6.0 and force "CDP" protocol
2023-12-08 18:59:25 +01:00
Henrik Skupin
a067d38ce3
Update Puppeteer to version 21.6.0 and force "CDP" protocol 2023-12-08 12:27:44 +01:00
calixteman
d56453289c
Merge pull request #17387 from calixteman/integration_test_promises
Use page.evaluateHandle when we want to await on document promises in integration tests
2023-12-07 17:21:43 +01:00
Calixte Denizet
c63af10191 Use page.evaluateHandle when we want to await on document promises in integration tests
For reference: https://github.com/mozilla/pdf.js/pull/17378#issuecomment-1842864939
2023-12-07 17:00:12 +01:00
Jonas Jenwald
628054ee53 Collect a few non-MOZCENTRAL AppOptions default values together
Ideally we want as few build-specific branches as possible when defining the default values, to improve readability, hence this change cannot hurt.
2023-12-07 16:58:09 +01:00
calixteman
f54cfe065a
Merge pull request #17388 from calixteman/no_double_color_picker
[Editor] Avoid to have a color picker for highlighting twice in the main toolbar
2023-12-06 16:29:33 +01:00
Jonas Jenwald
a692f8681b
Merge pull request #17386 from Snuffleupagus/issue-17361
Remove focus from the toggleButton when closing the sidebar with a mouse (issue 17361)
2023-12-06 16:21:18 +01:00
Calixte Denizet
cb9c855993 [Editor] Avoid to have a color picker for highlighting twice in the main toolbar
When opening a pdf from the secondary toolbar, a second color picker is added.
So in order to avoid that, we just stop listening for annotationeditoruimanager
in the toolbar.
2023-12-06 16:10:33 +01:00
Jonas Jenwald
6b6b7867af Remove focus from the toggleButton when closing the sidebar with a mouse (issue 17361) 2023-12-06 11:11:11 +01:00
calixteman
8702e1bbb2
Merge pull request #17359 from calixteman/editor_highlight_color_picker
[Editor] Add a color picker with predefined colors for highlighting text (bug 1866434)
2023-12-06 11:06:55 +01:00
calixteman
7e64f8213d
Merge pull request #17385 from calixteman/bug1868503
Set text field value as a string when it's for a date or a time (bug 1868503)
2023-12-06 10:48:32 +01:00
calixteman
c8f6b39fc1
Merge pull request #17381 from calixteman/editor_highlight_selected
[Editor] Highlight must keep selected after the document has been scrolled
2023-12-06 10:28:39 +01:00
Calixte Denizet
098cc16c46 Set text field value as a string when it's for a date or a time (bug 1868503) 2023-12-06 09:44:30 +01:00
Calixte Denizet
ff23d37fa2 [Editor] Add a color picker with predefined colors for highlighting text (bug 1866434)
The doorhanger for highlighting has a basic color picker composed of 5 predefined colors
to set the default color to use.
These colors can be changed thanks to a preference for now but it's something which could
be changed in the Firefox settings in the future.
Each highlight has in its own toolbar a color picker to just change its color.
The different color pickers are so similar (modulo few differences in their styles) that
this patch introduces a new class ColorPicker which provides a color picker component
which could be reused in future editors.
All in all, a large part of this patch is dedicated to color picker itself and its style
and the rest is almost a matter of wiring the component.
2023-12-05 23:27:22 +01:00
Calixte Denizet
621b7af60d [Editor] Highlight must keep selected after the document has been scrolled 2023-12-05 23:22:35 +01:00
calixteman
c0436013a0
Merge pull request #17380 from calixteman/issue17379
[Editor] Don't remove elements from the draw layer after it has been destroyed
2023-12-05 23:03:12 +01:00
Calixte Denizet
f7fec8c6d7 [Editor] Don't remove elements from the draw layer after it has been destroyed
Fixes issue #17379.
2023-12-05 22:41:20 +01:00
Jonas Jenwald
319e85449e
Merge pull request #17377 from Snuffleupagus/pr-17352-follow-up
Remove the unused `--editor-toolbar-active-bg-color` CSS variable (PR 17352 follow-up)
2023-12-05 15:06:13 +01:00
calixteman
7f04ce4d22
Merge pull request #17374 from calixteman/bug1865341
[Editor] Avoid conflicts between new persistent refs and the ones created when saving (bug 1865341)
2023-12-05 14:50:15 +01:00
Jonas Jenwald
c0bc5f9013 Remove the unused --editor-toolbar-active-bg-color CSS variable (PR 17352 follow-up)
This CSS variable became unused in PR 17352 but we apparently forgot to remove it there, which causes issues when trying to update PDF.js in mozilla-central; see https://treeherder.mozilla.org/push-health/push?repo=try&revision=0701bd2c189d85cd9ff050d6d3e8336d8f36e625&tab=tests&testGroup=pr&selectedTest=browserbasecontentteststaticbrowserparsablecssjs&selectedTaskId=
2023-12-05 14:01:23 +01:00
Calixte Denizet
ae5828c968 [Editor] Avoid conflicts between new persistent refs and the ones created when saving (bug 1865341)
When a pdf as a FreeText without appearance, we use a fake font in order to render it
and that leads to create few new refs for the font.
But then when we're saving, we create some new refs which start at the same number
as the previous created ones.
Consequently, when saving we're using some wrong objects (like a font) to check if
we're able to render the newly added FreeText.
In order to fix this bug, we just remove the persistent refs (which are only used
when rendering/printing) during the saving.
2023-12-05 12:33:21 +01:00
calixteman
795c63e400
Merge pull request #17375 from calixteman/bug1867588
[Editor] Always give the focus to the ink editor when starting drawing (bug 1867588)
2023-12-05 10:54:11 +01:00
Calixte Denizet
11610a9e66 [Editor] Always give the focus to the ink editor when starting drawing (bug 1867588)
This way, when the editor is blurred, it can be committed and everything works fine.
It fixes issue #17373.
2023-12-05 10:26:59 +01:00
calixteman
a3637e653f
Merge pull request #17370 from calixteman/issue17368
[Editor] Make sure that all layers are disabled when an editing session is done
2023-12-04 16:58:41 +01:00
Jonas Jenwald
d7bec1b527 Limit the amount of console "spam" during fuzz tests (PR 17337 follow-up)
Having just tested PR 17337 locally I noticed that especially the `JpxImage`-test causes a "ridiculous" amount of warning messages to be printed, which doesn't seem helpful.
Given that only actual `Error`s should be relevant here, we can easily disable this logging during the tests.
2023-12-04 16:39:45 +01:00
Jonas Jenwald
476cb84d92
Merge pull request #17367 from timvandermeij/modernize-test
Modernize the `calculateMD5` and `verifyManifestFiles` test helper functions
2023-12-04 16:03:19 +01:00
Calixte Denizet
43eea0b38e [Editor] Make sure that all layers are disabled when an editing session is done
Fixes issue #17368.
2023-12-04 13:27:39 +01:00
Tim van der Meij
ac5667166e
Modernize the verifyManifestFiles test helper function
The test helper code largely predates the introduction of modern
JavaScript features and should be refactored to improve readability.
In particular callbacks and recursive function calls make the code
harder to understand and maintain.

This commit:

- replaces the callback argument with returning a promise;
- replaces the recursive function calls with a simple loop;
- uses `const`/`let` instead of `var`;
- uses template strings for shorter string formatting code;
- improves the error messages to have more details.
2023-12-03 20:42:50 +01:00
Tim van der Meij
c9a923066b
Modernize the calculateMD5 test helper function
The test helper code largely predates the introduction of modern
JavaScript features and should be refactored to improve readability.
In particular callbacks and recursive function calls make the code
harder to understand and maintain.

This commit:

- replaces the callback argument with returning a promise;
- uses `const` instead of `var`;
- uses arrow functions for shorter code;
- uses template strings for shorter string formatting code;
- improves the error messages to have more details.
2023-12-03 20:42:45 +01:00
Tim van der Meij
5111b6d371
Merge pull request #17337 from manunio/initial-fuzzing-support
fuzz: initial integration
2023-12-03 15:12:18 +01:00
manunio
8bb8070116 fuzz: initial integration
- Adds initial fuzz_target for image decoders.
  - Adds jazzer.js as dev-dependency.
  - Adds a .eslintrc rule to ignore import/no-unresolved error.
2023-12-03 18:52:48 +05:30
calixteman
6b3ae4492e
Merge pull request #17364 from calixteman/editor_disable_highlight
[Editor] Disable mouse events when leaving the highlight mode
2023-12-01 18:49:52 +01:00
Jonas Jenwald
a1d84f5ecf
Merge pull request #17363 from Snuffleupagus/issue-17353
[Firefox] Restore opening of PDF attachments (issue 17353, bug 1867764)
2023-12-01 18:12:52 +01:00
Calixte Denizet
83d0b6cb55 [Editor] Disable mouse events when leaving the highlight mode 2023-12-01 17:10:19 +01:00
Jonas Jenwald
4c92ec9008 [Firefox] Restore opening of PDF attachments (issue 17353)
This unfortunately broke in PR 17060, since I had completely forgotten about https://bugzilla.mozilla.org/show_bug.cgi?id=1632644#c5 when writing that patch.
The easiest solution, while slightly unfortunate, seems to be to add a couple of non-standard hash parameters specifically for the PDF attachment use-case in the Firefox PDF Viewer. (Note that we cannot use "nameddest" here, since we also need to support the stringified destination-Array case.)
2023-12-01 12:16:56 +01:00
Jonas Jenwald
096426f073
Merge pull request #17360 from Snuffleupagus/issue-17347
Remove the "transitionend" event listener from the default viewer (issue 17347)
2023-12-01 10:22:42 +01:00
Jonas Jenwald
fe3bc575de Disable the "should compress and save text" unit-test in additional Node.js versions (PR 17202 follow-up)
It seems this unit-test started failing in Node.js version 20.10 as well. We should probably try and understand why, but for now just disable it to get passing CI tests.
2023-11-30 20:47:15 +01:00
Jonas Jenwald
412502370d Remove the "transitionend" event listener from the default viewer (issue 17347)
Given that this event listener is only used to trigger rendering after the sidebar has been opened/closed, we can utilize the existing one in the `PDFSidebar` class for this purpose instead. That one is registered on the sidebar DOM-element, and is needed to remove a CSS-class indicating that the sidebar is moving.
2023-11-30 20:29:40 +01:00
calixteman
d65dca7811
Merge pull request #17358 from whimboo/mouse_click_count
Use "count" and not "clickCount" when calling page.mouse.click()
2023-11-30 10:12:37 +01:00
Henrik Skupin
9052327e07
Use "count" and not "clickCount" when calling page.mouse.click() 2023-11-30 09:40:57 +01:00
calixteman
9ac1ac6ed3
Merge pull request #17352 from calixteman/move_button_hcm
[Editor] Fix the colors in HCM when hovering a button in the editor toolbar
2023-11-29 20:21:16 +01:00
Calixte Denizet
91eda77f63 [Editor] Fix the colors in HCM when hovering a button in the editor toolbar
It fixes few errors in the CSS for HCM.
It now complies to the specs from UI/UX.
Only the foreground must change in HCM and not the background, similarly to what
we had for the alt-text button before moving it.
2023-11-29 19:53:03 +01:00
calixteman
6a35e4206e
Merge pull request #17351 from calixteman/fix_mc_test
[Editor] Fix subtype for telemetry data (follow-up of #17329)
2023-11-29 11:48:42 +01:00
Calixte Denizet
05ca005eeb [Editor] Fix subtype for telemetry data (follow-up of #17329)
Fix a test failure in m-c.
2023-11-29 11:09:22 +01:00
calixteman
59cf2ee5a9
Merge pull request #17338 from Snuffleupagus/rm-FirefoxCom-requestSync
[Firefox] Remove the `FirefoxCom.requestSync` method
2023-11-28 16:26:32 +01:00
Jonas Jenwald
b03ce96605 [Firefox] Remove the FirefoxCom.requestSync method, since it's unused
After the two previous commits, which removed the remaining call-sites, this method is no longer used and can thus be removed.
As mentioned in the JSDocs for the now removed method, synchronous communication between the viewer and the platform code isn't really a good idea.

Once this patch has landed in mozilla-central some additional clean-up of the platform code will also be possible.
2023-11-28 16:19:58 +01:00
Jonas Jenwald
9ca504e538 [Firefox] Don't send the "abortLoading" message synchronously
Despite the comment, I believe that changing this should be fine for two separate reasons:
 - The platform code has an "unload" event listener, see [this code](https://searchfox.org/mozilla-central/rev/edb2612db13e89f1c44ab95b1e4d4366c16eb9fb/toolkit/components/pdfjs/content/PdfStreamConverter.sys.mjs#533-538), that invokes the same method. Hence we should still be guaranteed that the relevant platform method will run.

 - The `FirefoxComDataRangeTransport.abort` method is never actually invoked in the Firefox PDF Viewer.
   Note that the [`PDFDataRangeTransport.abort` method](f4b396f6c8/src/display/api.js (L759)) is only invoked via the [`PDFDataTransportStream.cancelAllRequests` method](f4b396f6c8/src/display/transport_stream.js (L167-L175)), which in turn is only invoked via the [`WorkerTransport.destroy` method](f4b396f6c8/src/display/api.js (L2485-L2487)). That method is invoked via the [`PDFDocumentLoadingTask.destroy` method](f4b396f6c8/src/display/api.js (L630)), which in the viewer is only invoked via the [`PDFViewerApplication.close` method](f4b396f6c8/web/app.js (L919)) which is never actually called in the Firefox PDF Viewer.

All-in-all, given the existing platform code *and* the current viewer-implementation it should thus be safe to not wait for the "abortLoading" message to complete.
2023-11-28 16:19:58 +01:00
Jonas Jenwald
ddebb0f954 [Firefox] Don't send the "initPassiveLoading" message synchronously
The return value is not, nor has it ever been, used for anything and we should thus be able to just send the message.
Note that the responses are already handled by the "message" event listener registered above.
2023-11-28 16:19:58 +01:00
calixteman
f4952399a4
Merge pull request #17329 from calixteman/move_alt_text_button
[Editor] Move the alt text button in the editor toolbar
2023-11-28 15:57:35 +01:00
Calixte Denizet
59112a7730 [Editor] Move the alt text button in the editor toolbar 2023-11-28 15:36:29 +01:00
calixteman
8e2507e0e8
Merge pull request #17317 from calixteman/editor_highlight
[Editor] Add a new editor to highlight some text in a pdf (bug 1866119)
2023-11-28 15:12:43 +01:00
Calixte Denizet
1ea6293923 [Editor] Add a new editor to highlight some text in a pdf (bug 1866119)
This patch is first big step for the new highlight feature.
Few patches will follow in order to conform to the specs UX/UI gave us.
2023-11-28 14:21:53 +01:00
calixteman
4bf7ff2027
Merge pull request #17344 from calixteman/issue17342
[Editor] Avoid to add a new ink editor when we aren't editing anymore
2023-11-27 16:53:48 +01:00
Calixte Denizet
2be136ab70 [Editor] Avoid to add a new ink editor when we aren't editing anymore 2023-11-27 16:18:31 +01:00
calixteman
b7e943bc7d
Merge pull request #17340 from calixteman/issue17332
Don't throw when there isn't enough data to get block info in flate stream
2023-11-26 19:23:25 +01:00
Calixte Denizet
52ea20eda4 Don't throw when there isn't enough data to get block info in flate stream
but just ends the stream.
2023-11-26 18:12:22 +01:00
Tim van der Meij
02a0189795
Merge pull request #17339 from timvandermeij/bump
Bump the stable version in `pdfjs.config`
2023-11-26 13:50:08 +01:00
Tim van der Meij
dd07267da6
Bump the stable version in pdfjs.config 2023-11-26 13:46:23 +01:00
Tim van der Meij
f4b396f6c8
Merge pull request #17334 from timvandermeij/updates
Update dependencies and translations to the most recent versions
2023-11-25 19:42:40 +01:00
Tim van der Meij
ab692f805a
Update translations to the most recent versions 2023-11-25 19:34:44 +01:00
Tim van der Meij
dd7ff7e662
Update the JSDoc comments for the new TypeScript version
This commit fixes the JSDoc comment for the `annotationEditorMode` setter.
The types tests fail on that now because the input value was changed from
a number to an object with various properties in recent patches, but the
JSDoc comment was not updated accordingly.

Moreover, the types tests also fail because TypeScript 5.3 assumes that
getters and setters have equal return and input value types, which is
arguably also what one would expect, but our `annotationEditorMode`
getter and setter deviate from that because the getter returns a number
while the setter accepts an object. Given that it seems more important
to document the setter entirely, including the meaning and types of its
properties, and the type of the getter can easily be inferred from this
comment and the other JSDoc comments that have `annotationEditorMode` in
it, we remove the getter type to make the types tests pass again.
2023-11-25 19:34:44 +01:00
Tim van der Meij
8aa26fad24
Update the code style for the new Prettier version
This patch is automatically generated using `gulp lint --fix`.
2023-11-25 18:15:09 +01:00
Tim van der Meij
7381515e20
Update dependencies to the most recent versions 2023-11-25 17:25:35 +01:00
calixteman
9d863f5180
Merge pull request #17331 from calixteman/lang_marker
Remove language codes from text strings.
2023-11-25 16:43:37 +01:00
Calixte Denizet
eb5f610d18 Remove language codes from text strings.
And take care to have an even number of bytes with utf16 strings.
2023-11-25 15:09:31 +01:00
Tim van der Meij
4b1de1537f
Merge pull request #17320 from tamuratak/fix_webpack_readme
Fix examples/webpack/README.md.
2023-11-25 12:49:04 +01:00
Jonas Jenwald
3d9f68cb97
Merge pull request #17328 from Snuffleupagus/fetchData-blob
Use the `fetchData` helper function in more cases
2023-11-25 08:31:12 +01:00
calixteman
58316369e5
Merge pull request #17330 from calixteman/issue17327
[Editor] Only focus the canvas for mouse events when drawing in the canvas
2023-11-24 19:09:18 +01:00
Calixte Denizet
42147e8839 [Editor] Only focus the canvas for mouse events when drawing in the canvas
And if we've to focus it, we must prevent scrolling to avoid to draw at an
unexpected position.
2023-11-24 16:00:04 +01:00
Jonas Jenwald
fd7a7e2859 Use the fetchData helper function in more cases
- Extend the `fetchData` helper function to also support fetching of "blob" data.

 - Use the `fetchData` helper function more in the code-base, when fetching non-PDF data. Given that the Fetch API isn't supported for all protocols, this should improve compatibility for the PDF.js library.
2023-11-24 13:05:57 +01:00
calixteman
d679078beb
Merge pull request #17318 from calixteman/bug1864136_2
Make sure that only one radio button is checked in its group (bug 1864136)
2023-11-24 08:40:23 +01:00
Calixte Denizet
1f0f51613a Make sure that only one radio button is checked in its group (bug 1864136)
When the first checked radio is met, the others in the group are set to false.
2023-11-23 17:01:49 +01:00
Takashi Tamura
6e7381bc20 Fix examples/webpack/README.md. The .mjs extension is necessary. Close #17319 2023-11-23 09:25:20 +09:00
Jonas Jenwald
5781e722bf
Merge pull request #17294 from Snuffleupagus/toolbarViewerRight-reorder
Move the editor-buttons in the main toolbar
2023-11-22 14:06:24 +01:00
Jonas Jenwald
5df7c97074 Move the editor-buttons in the main toolbar
By introducing a CSS variable for the editor-toolbars we're able to handle resizing of the viewer without complicating the code too much.
2023-11-22 13:04:05 +01:00
calixteman
09ff1b98ee
Merge pull request #17304 from calixteman/editor_highlight2
[Editor] Add support for saving/printing a newly added Highlight annotation (bug 1865708)
2023-11-22 12:23:27 +01:00
Calixte Denizet
f8f4432961 [Editor] Add support for saving/printing a newly added Highlight annotation (bug 1865708) 2023-11-22 10:41:55 +01:00
Jonas Jenwald
83f0029212
Merge pull request #17287 from Snuffleupagus/CSS-loading-icon
Re-factor the loading-icons used in the viewer toolbars
2023-11-21 14:11:55 +01:00
Jonas Jenwald
625d4f794e Re-factor the loading-icons used in the viewer toolbars
Currently the SVG images for the loading-icons exist in two versions, for the light- respectively dark-theme, which nowadays are the only "duplicated" icons left.
The reason for this is that these icons are being used in `input`-elements, where the regular `mask-image` approach used for all buttons don't work.

To address this we add containers for the `input`-elements, such that we have a "regular" DOM-element where we can use `mask-image`.
2023-11-21 13:55:36 +01:00
calixteman
02ccdbb2b1
Merge pull request #17291 from calixteman/editor_highlight1
[Editor] Add a way to extract the outlines of a union of rectangles
2023-11-21 10:56:18 +01:00
Jonas Jenwald
086a5921dc
Merge pull request #17303 from Snuffleupagus/issue-17302
Throw a `JpegError` when a JPEG image has no frame data (issue 17302)
2023-11-20 18:53:35 +01:00
Calixte Denizet
31d9b9f574 [Editor] Add a way to extract the outlines of a union of rectangles
The goal is to be able to get these outlines to fill the shape corresponding
to a text selection in order to highlight some text contents.
The outlines will be used either to show selected/hovered highlights.
2023-11-20 18:45:19 +01:00
Jonas Jenwald
a6f0609a6e Throw a JpegError when a JPEG image has no frame data (issue 17302)
Given that there's nothing to parse in this case, since we're dealing with an invalid JPEG image, throwing an *explicit* Error makes sense here.
2023-11-20 17:33:49 +01:00
calixteman
d8424a43ba
Merge pull request #17300 from calixteman/issue17299
[Editor] Make the alt-text button large enough to display correctly whatever string
2023-11-20 15:45:53 +01:00
Calixte Denizet
bd6c2a192c [Editor] Make the alt-text button large enough to display correctly whatever string 2023-11-20 13:22:02 +01:00
calixteman
3459615ec3
Merge pull request #17293 from calixteman/dark
Restore the option to set light/dark mode for chromium and generic builds
2023-11-18 21:48:09 +01:00
Calixte Denizet
53101b379b Restore the option to set light/dark mode for chromium and generic builds 2023-11-18 21:32:25 +01:00
calixteman
ffbfd680ec
Merge pull request #17281 from calixteman/delete_button_tooltip
[Editor] Add a tooltip to the delete button
2023-11-15 12:59:52 +01:00
Calixte Denizet
b7d28a3bf6 [Editor] Add a tooltip to the delete button 2023-11-15 10:51:39 +01:00
Jonas Jenwald
1df648733e
Merge pull request #17277 from Snuffleupagus/L10n-fetchData
Re-factor how the `GenericL10n` class fetches localization-data
2023-11-14 16:09:05 +01:00
Jonas Jenwald
5099dc4699
Merge pull request #17273 from Snuffleupagus/L10n-lowercase-locales
Re-factor the `L10n`-implementations to use lowercase language-codes internally
2023-11-14 15:59:13 +01:00
Jonas Jenwald
709d89420e Re-factor how the GenericL10n class fetches localization-data
- Re-factor the existing `fetchData` helper function such that it can fetch more types of data, and it now supports "arraybuffer", "json", and "text".
   This only needed minor adjustments in the `DOMCMapReaderFactory` and `DOMStandardFontDataFactory` classes.[1]

 - Expose the `fetchData` helper function in the API, such that the viewer is able to access it.

 - Use the `fetchData` helper function in the `GenericL10n` class, since this should allow fetching of localization-data even if the default viewer is run in an environment without support for the Fetch API.

---
[1] While testing this I also noticed a minor inconsistency when handling standard font-data on the worker-thread.
2023-11-14 13:45:14 +01:00
Jonas Jenwald
1f9533bae9 Re-factor the L10n-implementations to use lowercase language-codes internally
This is consistent with the implementation used in the (now removed) webL10n-library, and by only using lowercase language-codes internally in the `L10n`-implementations we should avoid future issues e.g. when users manually set the `locale`-option (in the default viewer).
2023-11-13 21:06:03 +01:00
Jonas Jenwald
44cde3ccca
Merge pull request #17263 from timvandermeij/font-tests
Introduce a GitHub Actions workflow for running the font tests
2023-11-13 17:43:08 +01:00
calixteman
787d092ecb
Merge pull request #17271 from calixteman/maif
Get the field name from its parent when it doesn't have one when collecting fields (bug 1864136)
2023-11-13 15:57:42 +01:00
Calixte Denizet
09b4fe6a30 Get the field name from its parent when it doesn't have one when collecting fields (bug 1864136)
Some fields, somewhere under the Fields entry in Acroform, could have no name (in T)
but with a parent which has a name but which isn't somewhere under Fields.
As a side-effect, this patch prevents infinite loops because of potential cycles
under Fields.
2023-11-13 14:41:14 +01:00
Jonas Jenwald
096c5fe2b5
Merge pull request #17272 from Snuffleupagus/issue-17254
Fix typo in the `--hcm-highlight-filter` CSS variable name (issue 17254)
2023-11-13 11:34:02 +01:00
Jonas Jenwald
90864a5672 Fix typo in the --hcm-highlight-filter CSS variable name (issue 17254) 2023-11-13 11:18:35 +01:00
Jonas Jenwald
7b89e7e0d2
Merge pull request #17270 from Snuffleupagus/issue-17269
[GENERIC viewer] Fallback to the short-format of the language code (issue 17269)
2023-11-13 11:10:33 +01:00
Jonas Jenwald
3f7fd2f035 [GENERIC viewer] Fallback to the short-format of the language code (issue 17269)
This shouldn't cause any issues, since `GenericL10n.#createBundle` has an early return for languages that don't exist in the `locale.json` file.
2023-11-13 10:04:48 +01:00
Tim van der Meij
8157f39c62
Introduce a GitHub Actions workflow for running the font tests
This commit migrates the font tests away from the bots. Not only are the
font tests broken on the Windows bot since some time, they also run on
Python 2 (end of life since January 2020) and `ttx` 3.19.0 (released in
November 2017). The latter is installed via a submodule, which requires
more complicated logic for finding and running `ttx`.

We solve the issues by implementing a modern workflow that installs the
most recent stable Python and `ttx` (`fonttools` package) versions. This
simplifies the `ttx` driver code as well because it can now assume `ttx`
is available on the path (just like we do for e.g. `node` invocations).
GitHub Actions takes care of creating a virtual environment with
`fonttools` in it so that the `ttx`  entrypoint is available. Locally
the font tests can be run in a similar way by creating and sourcing a
virtual environment with `fonttools` in it before running the font
tests, and a README file is included with instructions for doing so.
2023-11-12 17:48:04 +01:00
Tim van der Meij
69452bb60e
Implement optionally running the tests in headless mode
This commit prepares for running the font tests on GitHub Actions where
we can't spin up headful browsers because there are no display
capabilities on the workers. This will also be useful for porting other
test targets to GitHub Actions at a later time, as well as running the
tests locally in headless mode.
2023-11-12 17:48:04 +01:00
Tim van der Meij
a1d84f8ce1
Refactor parameter passing for the startBrowser(s) functions in test.mjs
This commit prepares for the introduction of extra options in later
commits by changing the function signatures of the `startBrowser(s)`
functions to take parameter objects instead of plain parameters. This
makes the call sites explicitly state which parameters they pass,
improving overall readability as well.
2023-11-12 14:59:25 +01:00
Tim van der Meij
24fcc042f4
Refactor URL handling for the startBrowsers function in test.mjs
The current logic is more complicated than it needs to be because it's
passing a callback function to `startBrowsers` instead of a string.
This commit simplifies the logic by passing the base URL as a string to
`startBrowsers` and having it do further augmentation internally,
thereby removing all indirection of the function calls to `makeTestUrl`
and the inner function it returned.
2023-11-12 14:06:45 +01:00
Tim van der Meij
7884119975
Merge pull request #17268 from Snuffleupagus/ci-test-refactor
Clean-up the CI workflow a bit
2023-11-12 14:04:02 +01:00
Jonas Jenwald
5687326046 Clean-up the CI workflow a bit
After recent PRs the size and scope of the CI workflow is now reduced, and this patch tries to simplify things further. More specifically we can directly specify the gulp-tasks in the workflow, and thus clean-up the `gulpfile` a tiny bit.

Note that this will technically be slower, since the tests are now run in series (rather than in parallel), however `gulp externaltest` runs so quickly that it really won't matter in practice.
2023-11-12 13:48:02 +01:00
Tim van der Meij
af3147c3fe
Merge pull request #17266 from Snuffleupagus/typestest-workflow
Move `gulp typestest` to a separate GitHub Actions workflow
2023-11-12 13:32:20 +01:00
Jonas Jenwald
d89ca97887 Move gulp typestest to a separate GitHub Actions workflow
This way we introduce more parallelism in the GitHub Actions tests, which should reduce overall runtime and thus cannot hurt.
2023-11-12 13:27:29 +01:00
Tim van der Meij
e0e5be2c62
Merge pull request #17267 from Snuffleupagus/lint-workflow
Move linting to a separate GitHub Actions workflow
2023-11-12 13:08:26 +01:00
Tim van der Meij
9172d649ed
Merge pull request #17264 from calixteman/issue17262
[Editor] Avoid to click on the delete button in the freetext integration tests
2023-11-12 13:04:13 +01:00
Tim van der Meij
290b483167
Merge pull request #17255 from Snuffleupagus/issue-17228
Ensure that the viewer waits for the library to complete loading (issue 17228)
2023-11-12 13:02:34 +01:00
Tim van der Meij
2869b63800
Merge pull request #17252 from tamuratak/to_mts
Rename *.d.ts to *.d.mts
2023-11-12 13:00:44 +01:00
Tim van der Meij
37a8311b4c
Merge pull request #17265 from Snuffleupagus/createCDNWrapper-blob-type
Set a type for the `Blob` used in `createCDNWrapper` (issue 17259)
2023-11-12 12:58:21 +01:00
Jonas Jenwald
2f70369d02 Move linting to a separate GitHub Actions workflow
This way we introduce more parallelism in the GitHub Actions tests, which should reduce overall runtime and thus cannot hurt.
2023-11-12 10:21:29 +01:00
Jonas Jenwald
ade692ff2e Set a type for the Blob used in createCDNWrapper (issue 17259)
Hopefully this is enough to address the problem of initializing the Worker in Chromium-based browsers.
Locally I've tried to *force* use of `createCDNWrapper` in development mode, by commenting out the `isSameOrigin` checks, and worker-loading fails against `master` and works with this patch.
2023-11-12 09:30:26 +01:00
Takashi Tamura
61ed77cfb4 Rename *.d.ts to *.d.mts. Close #17241
Add a type test for legacy.

- https://www.typescriptlang.org/docs/handbook/modules/reference.html#file-extension-substitution
2023-11-12 07:30:36 +09:00
Calixte Denizet
2d42c04543 [Editor] Avoid to click on the delete button in the freetext integration tests 2023-11-11 20:47:05 +01:00
Tim van der Meij
26fcd261fb
Merge pull request #17260 from timvandermeij/updates
Update dependencies and translations to the most recent versions
2023-11-11 18:46:18 +01:00
Tim van der Meij
4b7a0d1841
Update translations to the most recent versions 2023-11-11 15:58:30 +01:00
Tim van der Meij
8e2c9a30d7
Update dependencies to the most recent versions 2023-11-11 15:57:28 +01:00
Jonas Jenwald
8e5311ebf7
Merge pull request #17256 from Snuffleupagus/editorParamsToolbar-color
Tweak the background-color of the `editorParamsToolbar`s
2023-11-10 23:04:30 +01:00
Jonas Jenwald
e61b832764 Tweak the background-color of the editorParamsToolbars
Currently the background-color of the `editorParamsToolbar`s don't match that of the arrow, which is especially noticable in dark mode (see zoomed-in screen-shots below).
The simplest solution seem to be to just style the `editorParamsToolbar`s like the `secondaryToolbar`, to limit the amount of CSS changes required.
2023-11-10 18:19:39 +01:00
calixteman
17213062cc
Merge pull request #17253 from calixteman/issue16839
Fix the maxp table version in font to make it visible on Windows
2023-11-10 17:57:33 +01:00
calixteman
f56215f246
Merge pull request #17243 from calixteman/editor_bin
[Editor] Add a toolbar to selected editors with a button to delete it  (bug 1863763)
2023-11-10 17:01:31 +01:00
Calixte Denizet
334f0eb060 [Editor] Add a toolbar to selected editors with a button to delete it (bug 1863763) 2023-11-10 15:19:43 +01:00
Calixte Denizet
59ce1a4a3f Fix the maxp table version in font to make it visible on Windows 2023-11-10 14:16:20 +01:00
Jonas Jenwald
823d375b8b Ensure that the viewer waits for the library to complete loading (issue 17228)
This should *hopefully* fix 17228, by tweaking the build scripts to give the GENERIC viewer something to await to avoid breaking third-party users of the standalone viewer components.
2023-11-10 13:22:49 +01:00
Jonas Jenwald
1b88aad0db
Merge pull request #17244 from Snuffleupagus/rm-openFile-button
Remove the "Open file"-button from the main toolbar
2023-11-10 10:24:30 +01:00
calixteman
f1122f048e
Merge pull request #17247 from calixteman/bug1863910
Don't avoid to execute the Blur callback when blurring a text field (bug 1863910)
2023-11-09 20:05:53 +01:00
Calixte Denizet
ec396c2150 Don't avoid to execute the Blur callback when blurring a text field (bug 1863910) 2023-11-09 13:50:33 +01:00
Jonas Jenwald
bf016743fc Remove the "Open file"-button from the main toolbar
This button is *only* used in the GENERIC viewer, and will currently be visible either in the main or secondary toolbars (depending on the viewer width).
To simplify upcoming changes, and to avoid then having to complicate the relevant CSS rules unnecessarily, let's place the "Open file"-button permanently in the secondary toolbar instead.

(Note that the GENERIC viewer also, since five years, supports drag-and-drop in order to open local files.)
2023-11-09 08:08:17 +01:00
Jonas Jenwald
42f3d57365
Merge pull request #17242 from Snuffleupagus/fieldObjects-async-fetch
Ensure that `fieldObjects` and `#collectFieldObjects` handles References correctly
2023-11-08 15:28:11 +01:00
Jonas Jenwald
ff62fc8e2c Skip fieldObjects that are not actually References
The `fieldObjects`-getter is implemented in the `PDFDocument` class, which means that the `this._localIdFactory`-property that we pass to `AnnotationFactory.create` doesn't actually exist.
The reason that this hasn't caused any bugs, that I'm aware of, is that all /Fields-entries need to be References to actually make sense.
2023-11-08 14:39:13 +01:00
Jonas Jenwald
65c827b0eb Ensure that fieldObjects and #collectFieldObjects handles References correctly
The `fieldObjects`-getter itself is called, from `src/core/worker.js`, in a way that'll ensure that any `MissingDataException`s are handled. However the problem is that the actual data-lookups in `fieldObjects` and `#collectFieldObjects` are done inside of a Promise, which means that `MissingDataException`s won't be handled and parsing could thus break.

To address this we change all data-lookups to be asynchronous instead.
2023-11-08 14:38:57 +01:00
calixteman
c6a717f900
Merge pull request #17233 from calixteman/issue17232
Don't try to collect a nonexistent field because of an invalid ref
2023-11-07 22:50:55 +01:00
Calixte Denizet
acc62f80de Don't try to collect a nonexistent field because of an invalid ref 2023-11-07 19:58:29 +01:00
Tim van der Meij
72338ce05d
Merge pull request #17226 from timvandermeij/bump
Bump the stable version in `pdfjs.config`
2023-11-05 19:01:34 +01:00
Tim van der Meij
f16401bd67
Bump the stable version in pdfjs.config 2023-11-05 18:58:09 +01:00
Jonas Jenwald
50f52b43a5
Merge pull request #17222 from Snuffleupagus/rm-viewerCssTheme
Remove the `viewerCssTheme`-option, since it's partially broken
2023-11-04 17:40:03 +01:00
Tim van der Meij
87c83ab31c
Merge pull request #17220 from Snuffleupagus/pr-17176-followup
Also pause translation when expanding the current outline-item (PR 17176 follow-up)
2023-11-04 15:29:14 +01:00
Tim van der Meij
0d574f66bc
Merge pull request #17224 from Snuffleupagus/dist-webpack
Update `external/dist/webpack.js` to account for outputting of JavaScript modules (PR 17055 follow-up)
2023-11-04 15:26:35 +01:00
Jonas Jenwald
13ca668be0 Update external/dist/webpack.js to account for outputting of JavaScript modules (PR 17055 follow-up)
Hopefully this makes sense, since I don't know enough about Webpack to tell exactly how this file is being used in practice.
2023-11-04 13:04:26 +01:00
Tim van der Meij
9eb9d3f949
Merge pull request #17218 from Snuffleupagus/app-open-API-options
Re-factor how some API-options are handled in `PDFViewerApplication.open` (PR 17208 follow-up)
2023-11-04 12:53:18 +01:00
Tim van der Meij
71a6c749d0
Merge pull request #17202 from Snuffleupagus/node-ci-latest
Also test the latest Node.js version in GitHub Actions
2023-11-04 12:45:03 +01:00
Tim van der Meij
09f45e6e52
Merge pull request #17217 from Snuffleupagus/more-optional-chaining-5
Use even more optional chaining in the code-base
2023-11-04 12:36:32 +01:00
Tim van der Meij
5e6d80ad07
Merge pull request #17223 from Snuffleupagus/update-packages
Update packages and translations
2023-11-04 12:30:22 +01:00
Jonas Jenwald
89bb0c9e66 Update l10n files 2023-11-04 09:47:38 +01:00
Jonas Jenwald
e0898a7ee3 Update npm packages
The new major version of `gulp-zip` shouldn't be a problem, given the changes listed in https://github.com/sindresorhus/gulp-zip/releases/tag/v6.0.0
2023-11-04 09:47:31 +01:00
Jonas Jenwald
d46578e959 Remove the viewerCssTheme-option, since it's partially broken
The `viewerCssTheme`-implementation has always been somewhat hacky, and now it's also *partially* broken ever since we've started using CSS nesting.
Trying to support nested media queries would thus require a lot more parsing of the CSS rules, which seems inefficient and thus generally undesirable.[1]

As discussed on Matrix, let's try to remove the `viewerCssTheme`-option and see if there's any (significant) fallout from this.

---
[1] If this option is brought back, it seems to me that it (in Firefox) should probably be set through the platform-code that handles theming.
2023-11-04 09:19:01 +01:00
Jonas Jenwald
bf7e8126df Also pause translation when expanding the current outline-item (PR 17176 follow-up)
Depending on the structure of the outline we could potentially need to expand a few levels, especially in long PDF documents, hence it cannot hurt to pause translation in that case as well.
2023-11-03 13:26:36 +01:00
Jonas Jenwald
84aaafcd3e Use a limit when splitting URL-strings in web/app.js
This should be a *tiny* bit more efficient, since it avoids parsing substrings that we don't care about.
2023-11-03 10:53:19 +01:00
Jonas Jenwald
e20dabb65b Simplify how the docBaseUrl-option is handled in PDFViewerApplication.open
Reduce the "special" handling a bit here, by setting the viewer-option such that it'll be automatically included in the API-parameters.
2023-11-03 10:52:31 +01:00
Jonas Jenwald
8bbfcd3bef Re-factor how the canvasMaxAreaInBytes-option is handled in PDFViewerApplication.open (PR 17208 follow-up)
With the changes in PR 17208, where browser-preferences are now handled as "regular" viewer-options, we can tweak the definition of `canvasMaxAreaInBytes` to slightly simplify things in the `PDFViewerApplication.open` method.
2023-11-03 10:52:27 +01:00
Jonas Jenwald
99522c3201 Also test the latest Node.js version in GitHub Actions
Hopefully this will allow us to catch bugs in new Node.js versions earlier, rather than having to wait for bug reports.

Given that `CompressionStream` is (currently) only potentially used when saving a *modified* PDF document, which is unlikely to be a common use-case in Node.js environments, let's just disable the affected unit-test for now.
2023-11-02 16:58:03 +01:00
Jonas Jenwald
155a302e74 Use even more optional chaining in the code-base 2023-11-02 16:47:33 +01:00
calixteman
f528f6f07b
Merge pull request #17216 from calixteman/issue17215
Render rich text with only one text element
2023-11-02 16:42:01 +01:00
Calixte Denizet
085aa4207d Render rich text with only one text element 2023-11-02 15:35:52 +01:00
Jonas Jenwald
20adb2c44d
Merge pull request #17201 from Snuffleupagus/node-ci-lts
Update the GitHub Actions workflows to use the current Node.js LTS version
2023-11-02 13:28:09 +01:00
Jonas Jenwald
6df897267f
Merge pull request #17208 from Snuffleupagus/browser-prefs-async-init
[Firefox] Fetch browser preferences/options together with the viewer preferences (bug 1862192)
2023-11-01 19:34:57 +01:00
Jonas Jenwald
ce9cfa2d72 Skip the PREFERENCE-branch in AppOptions.getAll in official builds
Given that this branch is only necessary in development mode and *during* building, but is never actually used in the final viewer-bundles, we can utilize the pre-processor to ignore this code.
2023-10-31 20:13:13 +01:00
Jonas Jenwald
eebc230cf1 [Firefox] Fetch browser preferences/options together with the viewer preferences (bug 1862192)
Currently we *synchronously* fetch a number of browser preferences/options, from the platform code, during the viewer respectively PDF document initialization paths.
This seems unnecessary, and we can re-factor the code to instead include the relevant data when fetching the regular viewer preferences.
2023-10-31 15:32:01 +01:00
calixteman
50c0fccda6
Merge pull request #17204 from calixteman/issue17167
[Editor] Don't steal the keyboard events when editing mode is enabled
2023-10-30 10:30:38 +01:00
Calixte Denizet
77475ac610 [Editor] Don't steal the keyboard events when editing mode is enabled 2023-10-30 10:03:44 +01:00
calixteman
1ab0f8a0ec
Merge pull request #17205 from calixteman/issue17200
Fix the intermittent failures with PageOpen/PageClose test
2023-10-29 23:23:09 +01:00
Calixte Denizet
66b1a1f34b Fix the intermittent failures with PageOpen/PageClose test 2023-10-29 20:11:51 +01:00
Tim van der Meij
f95a2bbe29
Merge pull request #17203 from timvandermeij/updates
Update dependencies and translations to the most recent versions
2023-10-29 15:25:57 +01:00
Tim van der Meij
447eeeba4d
Update translations to the most recent versions 2023-10-29 14:29:56 +01:00
Tim van der Meij
ecba5b7c6d
Update dependencies to the most recent versions 2023-10-29 14:22:30 +01:00
Jonas Jenwald
d00c7d5cdc Update the GitHub Actions workflows to use the current Node.js LTS version
The active LTS version is now based on Node.js version 20, hence let's update the relevant workflows to use that one instead; see https://en.wikipedia.org/wiki/Node.js#Releases

Given that we still support Node.js version 18, i.e. the maintenance LTS version, in the PDF.js library we'll keep testing both versions in GitHub Actions to prevent regressions.
2023-10-29 12:42:11 +01:00
Tim van der Meij
0329b5e130
Merge pull request #17153 from Snuffleupagus/src-navigator-checks
Guard `navigator`-object accesses in `src/`-files (issue 15728)
2023-10-29 11:59:32 +01:00
Tim van der Meij
355bce28f5
Merge pull request #17199 from timvandermeij/setup-node-4
Upgrade `setup-node` to version 4 in the GitHub Actions workflows
2023-10-29 11:44:28 +01:00
Jonas Jenwald
26fc69f241
Merge pull request #17192 from Snuffleupagus/textLayer-pause-l10n
Pause translation when appending the textLayer and structTreeLayer to the page
2023-10-29 09:31:09 +01:00
Jonas Jenwald
80612f3714
Merge pull request #17184 from Snuffleupagus/xfaLayer-append-print
Handle appending consistently in the xfaLayer regardless of rendering intent (PR 17177 follow-up)
2023-10-28 22:33:17 +02:00
Jonas Jenwald
b798415147
Merge pull request #17081 from Snuffleupagus/examples-modules
Update the `examples/`-folder to account for outputting of JavaScript modules (PR 17055 follow-up)
2023-10-28 22:08:45 +02:00
Tim van der Meij
6dff90ac1f
Upgrade setup-node to version 4 in the GitHub Actions workflows
This major version mainly involves not using Node.js 16 internally
anymore, which will be end of life on September 11th. This prevents the
workflows from using an unsupported version of Node.js as well as
deprecation warnings getting printed in the workflow logs.

For more information please refer to
https://github.com/actions/setup-node/releases/tag/v4.0.0 and
https://github.com/actions/setup-node/issues/850.
2023-10-28 21:08:02 +02:00
Tim van der Meij
973cbb000b
Merge pull request #17198 from timvandermeij/python-3.12-lint
Update the GitHub Actions workflow for the Fluent linter
2023-10-28 20:48:34 +02:00
Tim van der Meij
4845d35c50
Fix the configuration path in the GitHub Actions workflow for the Fluent linter
I noticed the following warning in the GitHub Actions workflow logs:

`Configuration file not found: .github/linter_config.yml`

The configuration file is called `fluent_linter_config.yml` instead, so
this commit fixes the path so it points to the correct file.

Fixes 487816b.
2023-10-28 20:15:25 +02:00
Tim van der Meij
9d6cdf216d
Use Python 3.12 in the GitHub Actions workflow for the Fluent linter
The current stable version of Python is Python 3.12, see
https://www.python.org/downloads, so we should switch to that since
Python 3.10 is older and only receives security updates.
2023-10-28 20:10:15 +02:00
Tim van der Meij
4be44a370e
Improve consistency in the GitHub Actions workflow for the Fluent linter
This commit tweaks the Fluent linter workflow to match the other
workflow files we have, so we make sure the steps have a newline between
them for better readability and align names and descriptions of steps
with how they are called in the other workflow files we have.
2023-10-28 20:02:39 +02:00
Jonas Jenwald
c1fef7d2f2 Guard navigator-object accesses in src/-files (issue 15728)
There are environments that include *incomplete* polyfills for the `navigator`-object, which may thus cause the PDF.js library to break.
Despite that clearly not being our fault, it may still result in bug reports filed against the PDF.js project; see e.g. 15728.

Currently this even seem to affect *the latest* version of Node.js; see e.g. [here].

*Please note:* Thanks to the pre-processor none of these changes affect the Firefox PDF Viewer, however it does add "overhead" when working with and reviewing the affected code (which is why I'm not crazy about this).
2023-10-28 14:41:46 +02:00
Tim van der Meij
238f3e728f
Merge pull request #17185 from Snuffleupagus/annotationLayer-modifier
Fix `WidgetAnnotationElement._getKeyModifier` to account for Linux
2023-10-28 14:21:19 +02:00
Jonas Jenwald
d7b39fe696 Update the webpack example to account for outputting of JavaScript modules (PR 17055 follow-up)
*Please note:* While following the steps in the README still works with this patch, in the sense that the example runs and successfully renders a PDF document, I unfortunately cannot tell if it illustrates Webpack best practices.
2023-10-28 10:26:34 +02:00
Jonas Jenwald
9ec2fda09f Simplify the l10n-handling in the mobile-viewer example
- Remove the `errorWrapper`-element, since it simplifies the example and is consistent with the default viewer; see PR 15533.

 - Simplify the l10n-handling, since the `NullL10n` should be able to translate everything e.g. without fallback values; see PR 17146.
2023-10-28 10:26:34 +02:00
Jonas Jenwald
59c4041a49 Update the examples/-folder to account for outputting of JavaScript modules (PR 17055 follow-up)
This patch also changes most examples to use "top level await", since that's now supported and slightly simplifies the code.
2023-10-28 10:26:25 +02:00
Jonas Jenwald
3f0b3b15de
Merge pull request #17196 from Snuffleupagus/annotationLayer-css-nesting
Use CSS nesting in the annotationLayer
2023-10-27 19:50:10 +02:00
Jonas Jenwald
7d5b970eee Collect the forced-colors CSS rules for linkAnnotation in one spot 2023-10-27 19:29:33 +02:00
Jonas Jenwald
d30bf4482f
Merge pull request #17195 from Snuffleupagus/textLayer-css-nesting
Use CSS nesting in the textLayer
2023-10-27 19:24:15 +02:00
Jonas Jenwald
b779e418a5 Use CSS nesting in the annotationLayer 2023-10-27 18:46:47 +02:00
Jonas Jenwald
525be9afea Use CSS nesting in the textLayer 2023-10-27 17:38:01 +02:00
Jonas Jenwald
d293048c5d Pause translation when appending the textLayer and structTreeLayer to the page
Note that we must append the textLayer to the DOM *before* enabling the `highlighter` and `accessibilityManager`, to avoid breaking e.g. a pending searching operation.
The least invasive solution, that I was able to come up with, is to introduce a new `TextLayerBuilder` callback-function for this purpose.
2023-10-27 16:55:46 +02:00
calixteman
6115a328ea
Merge pull request #17189 from calixteman/mac_integration_test
Fix integration tests on Mac
2023-10-27 16:45:46 +02:00
Calixte Denizet
d72fd9ce4f Fix intermittents failure on mac 2023-10-27 16:10:06 +02:00
Calixte Denizet
517a262fb1 Fix keyboard shortcuts on mac and for some tests make sure that all
the page is displayed in using page-fit in order to make all tested
elements visible.
2023-10-27 16:09:35 +02:00
Jonas Jenwald
34781121cd
Merge pull request #17186 from flodolo/fluent_linter
Add workflow to lint Fluent en-US files
2023-10-26 17:47:08 +02:00
Francesco Lodolo
487816bd68
Add workflow to lint Fluent en-US files 2023-10-26 17:27:42 +02:00
Jonas Jenwald
069096e78f Fix WidgetAnnotationElement._getKeyModifier to account for Linux
Currently the `WidgetAnnotationElement._getKeyModifier` method will always be falsy on Linux, which seems like a simple oversight. Looking at all the other `FeatureTest.platform` accesses we only handle the `isMac`-case specially, and it seems reasonable to do the same thing here.
The reason that this hasn't led to any bug reports is most likely that the `modifier`-property seems completely unused in the scripting-implementation.

Finally, with these changes we can (slightly) simplify the `FeatureTest.platform` implementation.
2023-10-26 13:36:42 +02:00
Jonas Jenwald
097f214222 Handle appending consistently in the xfaLayer regardless of rendering intent (PR 17177 follow-up)
After PR 17177 the interface of `XfaLayerBuilder` is now inconsistent, since whether or not we directly append the xfaLayer to the DOM now depends on the rendering intent.
2023-10-26 12:05:33 +02:00
calixteman
fbfacf8828
Merge pull request #17177 from Snuffleupagus/xfaLayer-pause-l10n
Pause translation when appending the xfaLayer to the page
2023-10-25 21:46:49 +02:00
Jonas Jenwald
399f444c84 Pause translation when appending the xfaLayer to the page 2023-10-25 20:33:39 +02:00
calixteman
b31e77df17
Merge pull request #17166 from calixteman/improve_oc_parsing
Improve performance of optional content parsing
2023-10-25 18:28:38 +02:00
Jonas Jenwald
806ac67ea4
Merge pull request #17176 from Snuffleupagus/BaseTreeViewer-pause-l10n
Pause translation when appending the outline/attachment/layer trees to the sidebar
2023-10-25 17:51:39 +02:00
Calixte Denizet
0c38c6e103 Improve performance of optional content parsing 2023-10-25 17:50:53 +02:00
Jonas Jenwald
6b265b3a15 Pause translation when appending the outline/attachment/layer trees to the sidebar
Also, pause translation when collapsing/expanding subtrees.
2023-10-25 17:38:02 +02:00
Jonas Jenwald
0fc899338c
Merge pull request #17006 from Snuffleupagus/rm-enableStampEditor-pref
Remove the `enableStampEditor` preference
2023-10-25 16:24:49 +02:00
calixteman
f27f2bb403
Merge pull request #17165 from calixteman/improve_removenullchars
Slightly improve the performance of removeNullCharacters
2023-10-25 15:01:32 +02:00
Jonas Jenwald
5d3823a81a
Merge pull request #17173 from Snuffleupagus/ConstL10n-setL10n
Fix error that's breaking the `ConstL10n` class (PR 17161 follow-up)
2023-10-25 14:51:33 +02:00
calixteman
31243230af
Merge pull request #17174 from calixteman/update_import_l10n
Update the path to get all locales and update locales
2023-10-25 14:40:22 +02:00
calixteman
3ba68f68dc
Merge pull request #17171 from calixteman/issue17169
Don't take into account the INVISIBLE flag for well-known annotations
2023-10-25 14:00:12 +02:00
Jonas Jenwald
bd9b39be28
Merge pull request #17175 from Snuffleupagus/rm-lint-ignores
Remove obsolete entries in the lint-ignore files
2023-10-25 13:46:13 +02:00
Jonas Jenwald
b575de9860 Remove obsolete entries in the lint-ignore files
- The `external/webL10n/` directory was removed in PR 17115.

 - The `src/shared/{cffStandardStrings, fonts_utils}.js` files were removed in PR 17120.
2023-10-25 13:38:51 +02:00
Calixte Denizet
2967eca605 Update the path to get all locales and update locales 2023-10-25 12:47:06 +02:00
Jonas Jenwald
846bd86520 Fix error that's breaking the ConstL10n class (PR 17161 follow-up)
I forgot to include `web/l10n_utils.js` in PR 17161, which currently breaks `ConstL10n` since there's no longer a method called `setL10n`; sorry about that!
2023-10-25 12:11:57 +02:00
Calixte Denizet
133ed96f8f Don't take into account the INVISIBLE flag for well-known annotations 2023-10-25 10:16:14 +02:00
Calixte Denizet
651057c039 Slightly improve the performance of removeNullCharacters
Most of the strings shouldn't contain special chars (<= 0x1F) so we can
have a fast path which just checks if the string contains at least one such
a char.
2023-10-25 10:11:14 +02:00
Jonas Jenwald
f098121644
Merge pull request #17161 from Snuffleupagus/NullL10n-test
Add a unit-test to ensure that `NullL10n` won't diverge from the `L10n`-class
2023-10-24 20:28:34 +02:00
calixteman
3f2072eaee
Merge pull request #17159 from calixteman/bug1860602
[Annotation] Use the field V entry when there is no Parent one for a radio button (bug 1860602)
2023-10-24 16:50:18 +02:00
Jonas Jenwald
bcb01e5e2b Tweak the matchCount l10n-args handling slightly (PR 17146 follow-up)
Given that providing unused parameters in the l10n-args shouldn't be a problem, let's simplify the relevant JavaScript code a tiny bit.
2023-10-24 13:17:02 +02:00
Jonas Jenwald
e2af77fd6c Add a unit-test to ensure that NullL10n won't diverge from the L10n-class
To prevent the *standalone* viewer-components from breaking, we need to ensure that the `NullL10n`-interface won't accidentally diverge from the actual `L10n`-implementations.
2023-10-24 13:13:14 +02:00
Calixte Denizet
2f3797db34 [Annotation] Use the field V entry when there is no Parent one for a radio button (bug 1860602) 2023-10-23 22:11:30 +02:00
calixteman
377af6892b
Merge pull request #17157 from calixteman/auto_update_locale
Update locale on *.ftl change
2023-10-23 14:36:30 +02:00
Jonas Jenwald
cc18d9749a
Merge pull request #17156 from Snuffleupagus/landmark-pageLabel
Update the "aria-label" of the page when a `pageLabel` exists
2023-10-23 14:33:13 +02:00
Calixte Denizet
31cfec63c3 Update locale on *.ftl change 2023-10-23 14:03:31 +02:00
Jonas Jenwald
04696080f8 Update the "aria-label" of the page when a pageLabel exists
Looking at the `PDFThumbnailView.setPageLabel` method you'll see that we update e.g. the "aria-label" of the thumbnail-image for documents that contain (valid) pageLabels.
This isn't done in `PDFPageView`, which seems inconsistent, hence this patch.
2023-10-23 13:42:06 +02:00
Jonas Jenwald
8376b3fb05
Merge pull request #17141 from Snuffleupagus/l10n-more-setAttribute
[api-minor] Use "data-l10n-id"/"data-l10n-args", rather than manually updating DOM-elements, to trigger translation (PR 17146 follow-up)
2023-10-23 12:58:59 +02:00
Jonas Jenwald
17af706070 [api-minor] Use "data-l10n-id"/"data-l10n-args", rather than manually updating DOM-elements, to trigger translation (PR 17146 follow-up)
This patch changes almost all viewer-components[1] to use "data-l10n-id"/"data-l10n-args" for localization, which means that in many cases we no longer need to pass around the `L10n`-instance any more.

One part of the code-base where the `L10n`-instance is still being used "directly" is the AnnotationEditors, however while it might be possible to convert (most of) that code as well that's not attempted in this patch.

---
[1] The one exception is the `PDFDocumentProperties` dialog, since the way it's currently implemented makes that less straightforward to fix without a lot of code changes.
2023-10-22 14:17:47 +02:00
Tim van der Meij
898cc2e399
Merge pull request #17151 from Snuffleupagus/Fluent-PDFDocumentProperties-fixes
A couple of `PDFDocumentProperties` tweaks (PR 17115 follow-up)
2023-10-22 12:33:34 +02:00
Jonas Jenwald
da186d1b89
Merge pull request #17146 from Snuffleupagus/NullL10n-refactor
[api-minor] Re-factor `NullL10n` and remove the hard-coded l10n strings (PR 17115 follow-up)
2023-10-21 17:53:30 +02:00
Jonas Jenwald
4c4676e5a4
Merge pull request #17152 from Snuffleupagus/findbar-resizeObserver
Use a `ResizeObserver` to update the layout of `PDFFindBar`
2023-10-21 17:46:30 +02:00
Jonas Jenwald
e20ef39f59 Use a ResizeObserver to update the layout of PDFFindBar
*Please note:* In the Firefox PDF Viewer this findbar is only used for PDF documents placed in e.g. `<iframe>` elements.

By registering a `ResizeObserver` when the `PDFFindBar` is open we slightly unify and simplify how the findbar layout (row vs column) is handled.
This will be especially helpful with upcoming changes, where we'll make use of "data-l10n-id"/"data-l10n-args" to trigger translation in the viewer.
2023-10-21 16:17:49 +02:00
Jonas Jenwald
7df082fce3 A couple of PDFDocumentProperties tweaks (PR 17115 follow-up)
- The old translation engine handled language code casing slightly differently, hence we need to tweak the non-metric locale check in `PDFDocumentProperties` to account for that.

 - Use only lowercase names for the pre-defined page names, to improve overall consistency.
2023-10-21 10:27:47 +02:00
Jonas Jenwald
f07675a6a8 [api-minor] Re-factor NullL10n and remove the hard-coded l10n strings (PR 17115 follow-up)
*Please note:* These changes only affect the GENERIC build, since `NullL10n` is only a stub elsewhere (see PR 17135).

After the changes in PR 17115, which modernized and improved l10n-handling, the `NullL10n`-implementation is no longer a good fallback for the "proper" `L10n`-classes.
To improve this situation, especially for the *standalone* viewer-components, this patch makes the following changes:
 - Let the `NullL10n`-implementation extend an actual `L10n`-class, which is constant and lazily initialized, to ensure that it works *exactly* like the "proper" ones.

 - Automatically bundle the "en-US" l10n-strings in the build, via the pre-processor, such that we don't need to remember to manually update them.

 - Ensure that the *standalone* viewer-components register their DOM-elements for translation, similar to the default viewer, since this will allow future code improvements by using "data-l10n-id"/"data-l10n-args" in most (if not all) parts of the viewer.

 - Remove the `NullL10n` from the `AnnotationLayer`, to avoid affecting bundle size too much.
   For third-party users that access the `AnnotationLayer`, as exposed in the main PDF.js library, they'll now need to *manually* register it for translation. (However, the *standalone* viewer-components still works given the point above.)
2023-10-20 21:49:33 +02:00
Jonas Jenwald
a4cd2ef1db
Merge pull request #17148 from JT-External/support-rotated-imagemask
Fix size of maskCanvas to draw image masks correctly
2023-10-20 17:25:55 +02:00
JT-External
0eacd5c107 Fix size of maskCanvas to draw image masks correctly
Use existing helper to calculate the Box

Co-authored-by: Jonas Jenwald <jonas.jenwald@gmail.com>

Ensure that there are non-zero

Co-authored-by: Jonas Jenwald <jonas.jenwald@gmail.com>

Add a reference test for #17147
2023-10-20 23:46:24 +09:00
Jonas Jenwald
5f0e560949
Merge pull request #17140 from Snuffleupagus/l10n-move-init
Initialize the `L10n`-instance as soon as possible in Firefox (PR 17115 follow-up)
2023-10-19 20:13:33 +02:00
Jonas Jenwald
5c14c559dd Initialize the L10n-instance as soon as possible in Firefox (PR 17115 follow-up)
Given that there's now a bit more asynchronicity in the l10n-initialization in the Firefox PDF Viewer, after PR 17115, try to limit the impact of that by moving it to occur a tiny bit earlier in the default viewer initialization.
2023-10-19 18:40:52 +02:00
calixteman
d094e8aab0
Merge pull request #17142 from calixteman/no_connect_root
[L10n] Don't try to connect the root element when it has already been done
2023-10-19 18:29:25 +02:00
Calixte Denizet
a0b9c937ae [L10n] Don't try to connect the root element when it has already been done
In Firefox debug builds, there is an assertion to check that we don't connect
a subelement of an already connected root. Thanks to this assertion, we can see
that the root has already been added to Fluent, hence we don't need to do it
a second time.
We don't need to await anymore on the translation in order to update the
toolbar: it'll be done by Fluent, so we can safely remove the "localized"
event and avoid to wait for it.
2023-10-19 18:19:05 +02:00
Jonas Jenwald
e820688510 Remove the enableStampEditor preference 2023-10-19 15:45:07 +02:00
Jonas Jenwald
c60401a765
Merge pull request #17133 from Snuffleupagus/rm-builder-merge
Use object destructuring, rather than the `merge` helper, in the gulpfile
2023-10-19 15:41:40 +02:00
Jonas Jenwald
d6cfbd2839
Merge pull request #17130 from Snuffleupagus/AppOption-move-init
Try to make the `Preferences`/`AppOptions` initialization slightly more efficient
2023-10-19 15:12:30 +02:00
Jonas Jenwald
5ddc949159 Try to make the Preferences/AppOptions initialization slightly more efficient
*Please note:* This patch contains a couple of micro-optimizations, hence I understand if it's deemed unnecessary.

Move the `AppOptions` initialization into the `Preferences` constructor, since that allows us to remove a couple of function calls, a bit of asynchronicity and one loop that's currently happening in the early stages of the default viewer initialization.

Finally, move the `Preferences` initialization to occur a *tiny* bit earlier since that cannot hurt given that the entire viewer initialization depends on it being available.
2023-10-19 14:44:55 +02:00
Jonas Jenwald
929311fb9d
Merge pull request #17135 from Snuffleupagus/bug-1859818
Only bundle `NullL10n` in GENERIC builds (bug 1859818)
2023-10-19 14:35:01 +02:00
Jonas Jenwald
69ad0d9861 Only bundle NullL10n in GENERIC builds (bug 1859818) 2023-10-19 13:51:00 +02:00
Jonas Jenwald
f39bedd06c
Merge pull request #17138 from Snuffleupagus/issue-17137
Use a CSS-only solution to set the `dropdownToolbarButton` width (issue 17137)
2023-10-19 13:49:05 +02:00
Jonas Jenwald
482b789edf Use a CSS-only solution to set the dropdownToolbarButton width (issue 17137)
Note that CSS-features such as e.g. `flex` didn't exist, or had poor cross-browser support, back when the JavaScript-based solution was initially implemented.
2023-10-19 13:44:02 +02:00
calixteman
5d8be99782
Merge pull request #17115 from calixteman/mv_to_fluent
[api-minor] Move to Fluent for the localization (bug 1858715)
2023-10-19 13:40:50 +02:00
Jonas Jenwald
6a6f6f122c
Merge pull request #17131 from Snuffleupagus/openOrDownloadData-caching
Re-factor the blob-URL caching in `DownloadManager.openOrDownloadData`
2023-10-19 11:25:47 +02:00
Calixte Denizet
66982a2a11 [api-minor] Move to Fluent for the localization (bug 1858715)
- For the generic viewer we use @fluent/dom and @fluent/bundle
- For the builtin pdf viewer in Firefox, we set a localization url
  and then we rely on document.l10n which is a DOMLocalization object.
2023-10-19 11:20:41 +02:00
Jonas Jenwald
2a3090224f
Merge pull request #17134 from Snuffleupagus/writeStream-less-type-conversion
Reduce unnecessary type conversion in `writeStream`
2023-10-18 16:55:04 +02:00
Jonas Jenwald
25a1a9d28f Reduce unnecessary type conversion in writeStream
Currently we're unnecessarily converting data between strings and typed-arrays, when dealing with compressible data, in the `writeStream` function.
Note how we're *first* getting a string-representation of the stream, which involves converting the underlying typed-array into a string, only to immediately convert this back into a typed-array. This seems completely unnecessary, and is easy enough to avoid, and we'll now only do a *single* type-conversion in this function.
2023-10-18 15:39:01 +02:00
Jonas Jenwald
ae664ea8e0 Use object destructuring, rather than the merge helper, in the gulpfile
This helper function was originally added in PR 1953, eleven years ago, at which point object destructuring didn't exist.
2023-10-18 13:49:26 +02:00
Jonas Jenwald
674052d3fc Re-factor the blob-URL caching in DownloadManager.openOrDownloadData
Cache blob-URLs on the actual data, rather than DOM elements, to reduce potential duplicates (note the updated unit-test).
2023-10-17 10:18:34 +02:00
Tim van der Meij
22d6d95f03
Merge pull request #17125 from timvandermeij/find-intermittent
Fix intermittent problems on Windows in the XFA search integration test
2023-10-15 18:32:17 +02:00
Tim van der Meij
2bae8af96a
Fix intermittent problems on Windows in the XFA search integration test
The current test fails intermittently only on Windows for unknown
reasons: the code is correct and on Linux it always passes. However, we
have already spent quite a lot of time on this test, so rather than
spending even more time on it I figured we should look at what behavior
the test is trying to check and find an alternative way to do it that
can't trigger this intermittent issue anymore.

This commit changes the test to use a term that only exists once in the
entire document so we cannot accidentally highlight another match
anymore. This doesn't change anything about the behavior that this test
aims to check: we still test searching in the XFA layer, we still test
that the original term is matched case-insensitively and we still test
that that match is actually highlighted. Note that the only objective of
the test is confirming that the search functionality covers the XFA
layer, so the exact phrase/match is not the interesting bit.
2023-10-15 15:02:41 +02:00
Tim van der Meij
a9a1195582
Merge pull request #17123 from Snuffleupagus/eslint-globals
Update the ESLint `globals` list (PR 17055 follow-up)
2023-10-15 12:06:54 +02:00
Jonas Jenwald
93f24dd5d7 Remove the ESLint "amd" environment (PR 17055 follow-up)
Please see https://eslint.org/docs/latest/use/configure/language-options#specifying-environments
2023-10-15 11:50:57 +02:00
Jonas Jenwald
d5acbbccd3 Update the ESLint globals list (PR 17055 follow-up)
Given that we only use standard `import`/`export` statements now, after recent PRs, the "exports" global is unused.
Instead we add "__non_webpack_import__" to the `globals` to avoid having to sprinkle disable statements throughout the code.

Finally, the way that `globals` are defined has changed in ESLint and we should thus explicitly specify them as "readonly"; please find additional details at https://eslint.org/docs/latest/use/configure/language-options#specifying-globals
2023-10-15 11:38:10 +02:00
Tim van der Meij
76bf3da4b1
Merge pull request #17122 from timvandermeij/autoprint
Remove Escape key press from the `autoprint` integration test, and tweak the protocol timeout configuration for Puppeteer
2023-10-15 11:29:11 +02:00
Tim van der Meij
0c763d6c5a
Tweak the protocol timeout configuration for Puppeteer
The previous change that set the timeout had effect because we have seen
quite a few protocol timeouts now correctly being raised in the context
of the active test, however we have also still seen a handful of cases
where this wasn't the case and the one second difference turned out to
be too low (likely because the operation was started slightly after one
second into the test run). We therefore tweak the value to be 75% of the
Jasmine timeout. This should be enough to catch operations that happen
later on in the test run, and if a single operation takes that long any
hope for success is already gone anyway.
2023-10-14 18:20:22 +02:00
Tim van der Meij
48e41617f5
Remove Escape key press from the autoprint integration test
It's not necessary because we have configured silent printing for
Firefox and Chrome in the browser arguments we pass in `test.mjs`. This
means that the print dialog is not even shown at all or disappears
automatically once printing is done, so the Escape key press serves no
purpose. Since it has been shown to time out, likely because the page
loses focus during printing, and because the page itself doesn't know
when the printing dialog is shown and we therefore can't possibly do the
key press at the right time anyway, this commit gets rid of it to
stabilize the test.
2023-10-14 18:17:29 +02:00
Tim van der Meij
5c45dfa0ae
Merge pull request #17119 from timvandermeij/updates
Update translations/dependencies to the most recent versions and fix dependency vulnerabilities
2023-10-14 14:36:25 +02:00
Tim van der Meij
d53e166538
Merge pull request #17120 from timvandermeij/code-scanning-alerts
Remove obsolete `src/shared/{cffStandardStrings,fonts_utils}.js` files
2023-10-14 14:26:35 +02:00
Tim van der Meij
58e4fcdc6f
Remove obsolete src/shared/{cffStandardStrings,fonts_utils}.js files
Those files only contain old debugging code that is not used/imported
anywhere anymore, which is generating code scanning alerts. Moreover,
they rely on globals/platform-specific code and don't import/export
logic properly.
2023-10-14 14:07:49 +02:00
Tim van der Meij
4c17f99fab
Fix dependency vulnerabilities with npm audit fix 2023-10-14 13:50:24 +02:00
Tim van der Meij
e1307fdba8
Update dependencies to the most recent versions 2023-10-14 13:50:19 +02:00
Tim van der Meij
e79bb25086
Update translations to the most recent versions 2023-10-14 13:50:12 +02:00
Tim van der Meij
23b8dbb730
Merge pull request #17117 from Snuffleupagus/eslint-import-no-commonjs
Enable the `import/no-commonjs` ESLint plugin rule
2023-10-14 13:11:37 +02:00
Jonas Jenwald
d53093045a Enable the import/no-commonjs ESLint plugin rule
Given the amount of work put into removing `require`-calls from the code-base, let's ensure that new ones aren't accidentally added in the future.

Note that we still have a couple of files where `require` is being used, in particular:
 - The Node.js examples, however those will be updated to use `import` in PR 17081.
 - The Webpack examples, and related support files, however I unfortunately don't know enough about Webpack to be able to update those. (Hopefully users of that code will help out here, once version `4` is released.)
 - The `statcmp`-tool, since *some* of those `require`-calls cannot be converted to `import` without other code changes (and that file is only used during benchmarking).

Please find additional details at https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-commonjs.md
2023-10-14 12:49:17 +02:00
Tim van der Meij
57866cd31b
Merge pull request #14743 from Snuffleupagus/native-import-maps
Use native `import maps` in development mode
2023-10-14 12:07:39 +02:00
Tim van der Meij
7dfe08a0ee
Merge pull request #17098 from Snuffleupagus/createCDNWrapper-import
Tweak `PDFWorkerUtil.createCDNWrapper` to account for JavaScript modules (PR 17055 follow-up)
2023-10-14 12:05:46 +02:00
Jonas Jenwald
af9a7b0003 Tweak PDFWorkerUtil.createCDNWrapper to account for JavaScript modules (PR 17055 follow-up) 2023-10-14 11:34:40 +02:00
Jonas Jenwald
5e986cb514 Use native import maps in development mode
This patch seem to work fine locally now, and `mozregression` points to it being fixed in bug https://bugzilla.mozilla.org/show_bug.cgi?id=1803984 which landed in Firefox 116.

By using the native `import maps` functionality, we can remove a development dependency. Please find the specification at https://wicg.github.io/import-maps/
2023-10-13 20:35:34 +02:00
Jonas Jenwald
36c3c0a4c1
Merge pull request #17114 from Snuffleupagus/lib-modules
Output JavaScript modules for the `LIB` build-target (PR 17055 follow-up)
2023-10-13 20:33:35 +02:00
Jonas Jenwald
38245500fd Output JavaScript modules for the LIB build-target (PR 17055 follow-up)
This *finally* allows us to mark the entire PDF.js library as a "module", which should thus conclude the (multi-year) effort to re-factor and improve how we import files/resources in the code-base.

This also means that the `gulp ci-test` target, which is what's run in GitHub Actions, now uses JavaScript modules since that's supported in modern Node.js versions.
2023-10-13 18:54:33 +02:00
Jonas Jenwald
96258449e3
Merge pull request #17112 from Snuffleupagus/integration-test-modules
Convert the `integration` test-files to JavaScript modules
2023-10-13 18:53:52 +02:00
calixteman
4ac44b9d6d
Merge pull request #17113 from calixteman/bug1858700
Remove useless chrome.properties file (bug 1858700)
2023-10-12 17:19:57 +02:00
Calixte Denizet
cabda362c6 Remove useless chrome.properties file (bug 1858700) 2023-10-12 16:32:44 +02:00
Jonas Jenwald
9878d058fe Convert the integration test-files to JavaScript modules 2023-10-12 13:18:20 +02:00
Jonas Jenwald
33456d3704 Rename the integration test-files, in preparation for converting them to modules
This is done separately to ensure that Git is able to track the history correctly.
2023-10-12 13:17:56 +02:00
Jonas Jenwald
158ab5bf37
Merge pull request #17106 from Snuffleupagus/bug-1854145
Don't store page-level data, in the API, after cleanup has run (bug 1854145)
2023-10-12 10:47:23 +02:00
Jonas Jenwald
0238cf134d Don't store page-level data, in the API, after cleanup has run (bug 1854145)
For large/complex images it's possible that the image-data arrives in the API *after* the page has been scrolled out-of-view and thus been cleaned-up. In this case we obviously shouldn't cache such page-level data, since it'll first of all be unused and secondly can increase memory usage *a lot*.
Also, ensure that we *immediately* release any `ImageBitmap` data in this case to help reclaim memory faster.
2023-10-11 11:51:42 +02:00
Jonas Jenwald
2c39a739f5
Merge pull request #17105 from Snuffleupagus/interactive-examples-update
Update the "Interactive examples" links (PR 17055 follow-up)
2023-10-10 09:53:14 +02:00
Jonas Jenwald
734caab747 Update the "Interactive examples" links (PR 17055 follow-up)
The examples themselves were updated to account for JavaScript modules, which didn't require changing the actual URLs.
However, since it seems that JSFiddle doesn't support JavaScript modules in its separate "JavaScript" editing-area we need to change how we embed the examples to avoid showing a blank "JavaScript"-tab.
2023-10-10 09:41:01 +02:00
calixteman
2c87c4854a
Merge pull request #17073 from calixteman/debug_subst_font
[Debugger] Add some info about substitution font
2023-10-09 14:34:58 +02:00
Calixte Denizet
7851c0da8d [Debugger] Add some info about substitution font
When pdfBug is true, the substitution font is used in the text layer in order
to be able to know what is the font really used thanks to the devtools.
And to be sure that fonts are loaded, the font cache isn't cleaned up when
the debugger is active.
2023-10-09 12:06:33 +02:00
Jonas Jenwald
b4cd8ad215
Merge pull request #17095 from timvandermeij/protocol-timeout
Fix the protocol timeout configuration for Puppeteer
2023-10-09 09:43:51 +02:00
Tim van der Meij
ede65e11c6
Fix the protocol timeout configuration for Puppeteer
The default protocol timeout is 180 seconds according to the
documentation at https://pptr.dev/api/puppeteer.browserconnectoptions,
but the Jasmine timeout we configure in the individual boot files is 30
seconds. The consequence of this is that if a protocol (CDP) error
occurs after 30 seconds Jasmine will fail the test, but the actual
protocol error from Puppeteer is raised much later in the context of
another test, which causes unrelated failures or tracebacks.

This commit fixes the problem by configuring Puppeteer to always use a
lower protocol timeout than the Jasmine timeout so that protocol errors
are always raised in the context of the test that actually triggered it.
2023-10-08 18:22:02 +02:00
Jonas Jenwald
d64f223d03
Merge pull request #17094 from Snuffleupagus/debugger-module
Rename `web/debugger.js` since it's actually a JavaScript module (PR 17055 follow-up)
2023-10-08 13:56:37 +02:00
Jonas Jenwald
6ac3da0d1f Rename web/debugger.js since it's actually a JavaScript module (PR 17055 follow-up)
It's been loaded as a JavaScript module for a long time, and given that the file is bundled as-is (without building) it seems reasonable to just change the file extension now.
2023-10-08 13:16:42 +02:00
Jonas Jenwald
f04967017f
Merge pull request #17093 from mozilla/dependabot/npm_and_yarn/postcss-8.4.31
Bump postcss from 8.4.30 to 8.4.31
2023-10-08 10:08:49 +02:00
dependabot[bot]
67b5c69d15
Bump postcss from 8.4.30 to 8.4.31
Bumps [postcss](https://github.com/postcss/postcss) from 8.4.30 to 8.4.31.
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/8.4.30...8.4.31)

---
updated-dependencies:
- dependency-name: postcss
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-08 04:06:58 +00:00
Tim van der Meij
60a458de29
Merge pull request #17090 from timvandermeij/autoprint-intermittent
Activate the selector check for the `autoprint` integration test as soon as possible
2023-10-07 20:34:16 +02:00
Tim van der Meij
2c1d95b153
Activate the selector check for the autoprint integration test as soon as possible
The Windows bot is usually slower than the Linux bot, and therefore
text layer rendering is as well. However, the `autoprint` test awaited
text layer rendering to complete before activating the selector check,
which makes it timing-sensitive and causes it to never resolve because
the page is already printed (and the printed page div removed) by then.

This commit should fix the issue by activating the selector check as
soon as possible, namely as soon as the viewer appears, which should
ensure we're always registering the selector check in time because we're
doing it even before rendering is starting.
2023-10-07 19:27:34 +02:00
Tim van der Meij
f2c9b64cb2
Merge pull request #17086 from Snuffleupagus/rm-structuredClone-polyfill
[api-minor] Stop polyfilling `structuredClone` in legacy builds
2023-10-07 18:26:28 +02:00
Jonas Jenwald
8bd3cc0313 [api-minor] Stop polyfilling structuredClone in legacy builds
Comparing the currently supported browsers/environments, see [the FAQ](https://github.com/mozilla/pdf.js/wiki/Frequently-Asked-Questions#faq-support) and the [MDN compatibility data](https://developer.mozilla.org/en-US/docs/Web/API/structuredClone#browser_compatibility), the `structuredClone` polyfill is *only* needed in Google Chrome versions < 98. Because of some limitations in the core-js polyfill we're currently forced to special-case the `transfer` handling to prevent bugs, and it'd be nice to avoid that.

Note that `structuredClone`, with transfers, is only used in two spots:
 - The `LoopbackPort` class, which is only used with fake workers. Given that fake workers should *never* be used in browsers, breaking that edge-case in older Google Chrome versions seem fine.
 - The `AnnotationStorage` class, when Stamp-annotations have been added to the document. Given that Google Chrome isn't the main focus of development, breaking *part* of the editing-functionality in older Google Chrome versions should hopefully be acceptable.
2023-10-07 16:52:47 +02:00
Jonas Jenwald
e6c3257175
Merge pull request #17080 from Snuffleupagus/scripting-module
Output `pdf.scripting.js` as a JavaScript module (PR 17055 follow-up)
2023-10-07 16:09:39 +02:00
Jonas Jenwald
4b489cd4e6 Output pdf.scripting.js as a JavaScript module (PR 17055 follow-up)
To avoid problems with `export` statements in the QuickJS Javascript Engine, we can work-around that by *explicitly* exposing `pdfjsScripting` globally instead.
2023-10-07 15:27:26 +02:00
Tim van der Meij
bab4c7f617
Merge pull request #17055 from Snuffleupagus/output-modules
[api-major] Output JavaScript modules in the builds (issue 10317)
2023-10-07 15:02:59 +02:00
Tim van der Meij
89d8c639fa
Merge pull request #17077 from Snuffleupagus/css-rm-unneeded-alpha
Remove unnecessary alpha-value from CSS `rgb` colors
2023-10-07 12:33:48 +02:00
Jonas Jenwald
927e50f5d4 [api-major] Output JavaScript modules in the builds (issue 10317)
At this point in time all browsers, and also Node.js, support standard `import`/`export` statements and we can now finally consider outputting modern JavaScript modules in the builds.[1]

In order for this to work we can *only* use proper `import`/`export` statements throughout the main code-base, and (as expected) our Node.js support made this much more complicated since both the official builds and the GitHub Actions-based tests must keep working.[2]
One remaining issue is that the `pdf.scripting.js` file cannot be built as a JavaScript module, since doing so breaks PDF scripting.

Note that my initial goal was to try and split these changes into a couple of commits, however that unfortunately didn't really work since it turned out to be difficult for smaller patches to work correctly and pass (all) tests that way.[3]
This is a classic case of every change requiring a couple of other changes, with each of those changes requiring further changes in turn and the size/scope quickly increasing as a result.

One possible "issue" with these changes is that we'll now only output JavaScript modules in the builds, which could perhaps be a problem with older tools. However it unfortunately seems far too complicated/time-consuming for us to attempt to support both the old and modern module formats, hence the alternative would be to do "nothing" here and just keep our "old" builds.[4]

---
[1] The final blocker was module support in workers in Firefox, which was implemented in Firefox 114; please see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import#browser_compatibility

[2] It's probably possible to further improve/simplify especially the Node.js-specific code, but it does appear to work as-is.

[3] Having partially "broken" patches, that fail tests, as part of the commit history is *really not* a good idea in general.

[4] Outputting JavaScript modules was first requested almost five years ago, see issue 10317, and nowadays there *should* be much better support for JavaScript modules in various tools.
2023-10-07 09:31:08 +02:00
Jonas Jenwald
0a970ee443 [api-major] Remove the fallbackWorkerSrc functionality in browsers
The user should *always* provide a correct `GlobalWorkerOptions.workerSrc` value when using the PDF.js library in browser environments. Note that the fallback:
 - Has been deprecated ever since PR 11418, first released in version `2.4.456` over three years ago.
 - Was always a best-effort solution, with no guarantees that it'd actually work correctly.
 - With upcoming changes, w.r.t. outputting JavaScript modules, it'd now be more diffiult to determine the correct value.
2023-10-06 12:12:30 +02:00
Jonas Jenwald
8158628a90 [api-minor] Stop building a minified default viewer
The minified default viewer has never been distributed in either official releases or through pdfjs-dist, which means that it's most likely unused, and it's has never been tested nor actively maintained.
2023-10-06 12:12:30 +02:00
calixteman
905ad1fe68
Merge pull request #16761 from calixteman/editor_add_new_with_keyboard
[Editor] Add the possibility to create a new editor in using the keyboard (bug 1853424)
2023-10-06 11:44:07 +02:00
Jonas Jenwald
4ebddcb092 Remove unnecessary alpha-value from CSS rgb colors
Setting the alpha-value explicitly to `1` in `rgb` colors is unnecessary, since that's the default value, and this way we ever so slightly reduce the size of our CSS files.
Unfortunately I've not found a Stylelint rule to enforce this automatically, and the patch was generated using search and replace.
2023-10-06 09:50:03 +02:00
Calixte Denizet
ea5eafa265 [Editor] Add the possibility to create a new editor in using the keyboard (bug 1853424)
When an editing button is disabled, focused and the user press Enter (or space), an
editor is automatically added at the center of the current page.
Next creations can be done in using the same keys within the focused page.
2023-10-05 22:49:15 +02:00
calixteman
2453b79fa8
Merge pull request #17074 from calixteman/issue17071
Make the toolbar buttons usable with keyboard when Page Fit is used
2023-10-05 20:28:56 +02:00
Jonas Jenwald
3747c02d4c
Merge pull request #17076 from Snuffleupagus/stylelint-color-rules
Enable some Stylelint color-related rules to slightly reduce file sizes
2023-10-05 19:18:35 +02:00
Calixte Denizet
3263fd0307 Make the toolbar buttons usable with keyboard when Page Fit is used 2023-10-05 18:33:03 +02:00
Jonas Jenwald
4277205d78 Enable some Stylelint color-related rules to slightly reduce file sizes
- Use a consistent format for all alpha-values (this rule didn't require any code changes); see https://stylelint.io/user-guide/rules/alpha-value-notation
 - Use modern and slightly shorter color notation, since [according to MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/rgb#browser_compatibility) that should be supported "everywhere" nowadays; see https://stylelint.io/user-guide/rules/color-function-notation/
 - Use "short" hexadecimal colors whenever possible; see https://stylelint.io/user-guide/rules/color-hex-length/
 - Help avoid adding broken hexadecimal colors (this rule didn't require any code changes); see https://stylelint.io/user-guide/rules/color-no-invalid-hex/
2023-10-05 17:51:21 +02:00
calixteman
a60f90ae94
Merge pull request #17075 from calixteman/issue17069_followup
Add a HTML containter for locked FreeText annotations in order to be able to display a popup (follow-up of #17070)
2023-10-05 15:17:58 +02:00
Calixte Denizet
e737638a40 Add a HTML containter for locked FreeText annotations in order to be able to display a popup (follow-up iof #17070) 2023-10-05 14:01:34 +02:00
calixteman
c4c24c6d18
Merge pull request #17070 from calixteman/17069
Update the noHTML flag to take into account the hasOwnCanvas one (fixes #17069)
2023-10-05 11:10:40 +02:00
calixteman
66c3b239ae
Merge pull request #17072 from calixteman/resizer_role
[Editor] Add role=spinbutton to resizers when they're used with the keyboard
2023-10-04 23:13:44 +02:00
Calixte Denizet
335cea22b3 [Editor] Add role=spinbutton to resizers when they're used with the keyboard 2023-10-04 21:30:06 +02:00
Calixte Denizet
40b1d92044 Update the noHTML flag to take into account the hasOwnCanvas one (fixes #17069)
When an element has the hasOwnCanvas flag we must have an HTML container to attach
the canvas where the element will be rendered.
So the noHTML flag must take this information into account:
 - in some cases the noHTML flag is resetted depending on the hasOwnCanvas value;
 - in some others, the hasOwnCanvas flag is set depending on the value of noHTML.
2023-10-04 18:06:21 +02:00
calixteman
40d6b0e1bf
Merge pull request #17062 from calixteman/resize_keyboard
[Editor] Support resizing editors with the keyboard (bug 1854340)
2023-10-04 13:55:04 +02:00
Calixte Denizet
05ca3fd99b [Editor] Support resizing editors with the keyboard (bug 1854340) 2023-10-04 12:57:37 +02:00
Jonas Jenwald
c377f2d488
Merge pull request #17060 from Snuffleupagus/issue-17056
Add support for "GoToE" actions with destinations (issue 17056)
2023-10-04 11:36:42 +02:00
Jonas Jenwald
bf9c33e60f Add support for "GoToE" actions with destinations (issue 17056)
This shouldn't be very common in practice, since "GoToE" actions themselves seem quite uncommon; see PR 15537.
2023-10-04 11:14:23 +02:00
Jonas Jenwald
da4fdc76a3
Merge pull request #17063 from Snuffleupagus/version-4
Bump library version to `4.0`
2023-10-04 11:10:27 +02:00
calixteman
0e6d0ca7b6
Merge pull request #17067 from calixteman/issue17065
Compute correctly the bounding box of a transformed rectangle (fixes #17065)
2023-10-03 23:58:11 +02:00
Calixte Denizet
1be9bbd2e1 Compute correctly the bounding box of a transformed rectangle (fixes #17065) 2023-10-03 23:50:59 +02:00
Jonas Jenwald
4245d87de5
Merge pull request #17066 from Snuffleupagus/issue-17064
Ensure that readonly TextWidget-annotations are rendered when forms are disabled (issue 17064)
2023-10-03 23:13:41 +02:00
Jonas Jenwald
f113320bd5 Ensure that readonly TextWidget-annotations are rendered when forms are disabled (issue 17064)
To reduced the risk of regressing something else, given that the issue only applies to a (for the default viewer) non-default configuration, this patch is purposely limited to only TextWidget-annotations in the display layer.
2023-10-03 21:26:08 +02:00
Jonas Jenwald
9cca13bb03 Bump library version to 4.0 2023-10-03 15:57:54 +02:00
Jonas Jenwald
426209c6e6
Merge pull request #16699 from Snuffleupagus/rm-svg
[api-major] Remove the SVG back-end (PR 15173 follow-up)
2023-10-03 15:13:14 +02:00
Jonas Jenwald
0edc490e1b
Merge pull request #16774 from Snuffleupagus/rm-deprecated-options
[api-major] Remove various deprecated functionality and options
2023-10-03 15:12:39 +02:00
calixteman
0cc8c6671c
Merge pull request #17059 from calixteman/fix_copy_paste_integration_test
Remove timeouts from the copy_paste integration test
2023-10-03 13:27:13 +02:00
Calixte Denizet
bb59f445a9 Remove timeouts from the copy_paste integration test 2023-10-03 11:55:18 +02:00
calixteman
0986e40842
Merge pull request #17058 from calixteman/alt_text_canvas
[Editor] Use the alt text to descibe the canvas used to display the image
2023-10-03 11:01:11 +02:00
Calixte Denizet
e3fbe2908a [Editor] Use the alt text to descibe the canvas used to display the image 2023-10-02 23:28:11 +02:00
calixteman
59d94b549f
Merge pull request #17032 from calixteman/alt_text_rm_button
[Editor] Don't show the alt-text button when the alt-text dialog is visible
2023-10-02 22:19:18 +02:00
Calixte Denizet
eebd251552 [Editor] Don't show the alt-text button when the alt-text dialog is visible
This way, the button doens't cover the image.
2023-10-02 20:34:30 +02:00
calixteman
f5367f01ca
Merge pull request #17051 from calixteman/test_stamp_svg
Fix new intermittent failures with ink and stamp tests
2023-10-02 18:10:00 +02:00
Calixte Denizet
077d239b96 Fix new intermittent failures with ink and stamp tests
It happens only on windows with chrome.
For any reason, click event isn't correctly triggered and it seems work correctly
with pointerup.
And it seems that when drawing a svg on an OffscreenCanvas we need to wait
a little in order to be able to transfer it: it's why this patch adds
a check on the canvas content.
2023-10-02 15:04:44 +02:00
Jonas Jenwald
3ced0dec1b [api-major] Remove the SVG back-end (PR 15173 follow-up)
This has been deprecated since version `2.15.349`, which is a year ago.
Removing this will also simplify some upcoming changes, specifically outputting of JavaScript modules in the builds.
2023-10-01 23:14:29 +02:00
Tim van der Meij
be53c7d6f5
Merge pull request #17053 from calixteman/issue17044
Add alt-text svg images to the dist (issue #17044)
2023-10-01 18:11:24 +02:00
Calixte Denizet
0d9aef1a5e Add alt-text svg images to the dist (issue #17044) 2023-10-01 16:47:34 +02:00
Tim van der Meij
71bffcc7a9
Merge pull request #17052 from Snuffleupagus/web-pdfjsLib-export
Use a standard `export` statement in the `web/pdfjs.js` file
2023-10-01 12:09:36 +02:00
Jonas Jenwald
9624505f0f Use a standard export statement in the web/pdfjs.js file
This removes the only remaining old and non-standard handling of exports in the `web/`-folder, since some initial attempts at outputting JavaScript modules in the builds have identified this file as a potential problem.
While this uses a hard-coded list, for overall simplicity, I don't believe that that's a big problem since:
 - Generating this file automatically would require a bunch more parsing *every single time* that the library is built.
 - The official API-surface doesn't change often enough for this to really impede development in any significant way.
 - The added unit-test helps ensure that this list cannot accidentally become outdated.
2023-09-30 12:10:02 +02:00
calixteman
3ca63c68ea
Merge pull request #17050 from calixteman/editor_delete_invisible
[Editor] Make a deleted (when it was invisible) editor undoable
2023-09-29 18:06:55 +02:00
calixteman
7d7a7a46a0
Merge pull request #17049 from calixteman/fix_stamp_tests
Remove the timeouts from the stampEditor integration tests
2023-09-29 17:02:10 +02:00
calixteman
12ca22ba44
Merge pull request #17048 from calixteman/fix_ink_tests
Remove the timeouts from the inkEditor integration tests
2023-09-29 16:30:07 +02:00
Calixte Denizet
b65b079ceb [Editor] Make a deleted (when it was invisible) editor undoable
When the editor is invisible (because on a non-rendered page) its parent is null.
But when we undo its deletion, we need to have a parent to attach it.
2023-09-29 16:19:11 +02:00
Calixte Denizet
b8c118db22 Remove the timeouts from the stampEditor integration tests 2023-09-29 15:57:16 +02:00
Calixte Denizet
627249f889 Remove the timeouts from the inkEditor integration tests 2023-09-29 15:01:52 +02:00
calixteman
46940a5a52
Merge pull request #17036 from calixteman/fix_test_freetext
[Editor] Remove almost all the waitForTimeout from the freetext integration tests
2023-09-29 11:41:53 +02:00
Calixte Denizet
55e5af2d01 [Editor] Remove almost all the waitForTimeout from the freetext integration tests 2023-09-29 11:14:21 +02:00
Jonas Jenwald
52862893f5
Merge pull request #17026 from Snuffleupagus/layerProperties-Object
Convert `layerProperties` to an Object (PR 15811 follow-up)
2023-09-28 18:44:32 +02:00
Jonas Jenwald
46d8d36721
Merge pull request #17027 from Snuffleupagus/update-Puppeteer
Update Puppeteer to the latest version
2023-09-28 18:43:52 +02:00
calixteman
b6d75e736a
Merge pull request #17038 from ayushmourya/master
Make downloadManager optional in JSDoc types
2023-09-28 17:23:33 +02:00
Jonas Jenwald
790b480bbc Update Puppeteer to the latest version
This also required updating the `postinstall`-step to account for recent changes in Puppeteer.
2023-09-28 17:21:07 +02:00
Jonas Jenwald
03ce3b2d54 Convert layerProperties to an Object (PR 15811 follow-up)
Given that this is accessed multiple times per page in the viewer, that leads to a number of (strictly speaking unneeded) function calls and allocated Objects for each invocation. By converting `layerProperties` to a, lazily initialized, Object we can avoid this.
2023-09-28 17:20:23 +02:00
Jonas Jenwald
3072efa064
Merge pull request #17035 from Snuffleupagus/postcss-discard-comments
Remove comments from the *built* CSS files
2023-09-28 15:54:06 +02:00
calixteman
d7d900c65d
Merge pull request #17045 from calixteman/resize_disable_mouse
[Editor] Disable pointer events in the parent layer while an editor is resized
2023-09-28 15:51:53 +02:00
Calixte Denizet
4f6fa35a28 [Editor] Disable pointer events in the parent layer while an editor is resized 2023-09-28 15:09:50 +02:00
calixteman
f78a5ff79e
Merge pull request #17043 from calixteman/bug1855641
StructParents entry isn't required on pages with no tagged contents (bug 1855641)
2023-09-28 14:43:18 +02:00
Calixte Denizet
f2196f7803 StructParents entry isn't required on pages with no tagged contents (bug 1855641) 2023-09-28 14:23:10 +02:00
calixteman
2daf9515b3
Merge pull request #17041 from calixteman/rm_timeouts
[Editor] Clear the different timeouts when destroying
2023-09-28 12:27:20 +02:00
Calixte Denizet
8417eee0c1 [Editor] Clear the different timeouts when destroying 2023-09-28 12:03:11 +02:00
Jonas Jenwald
00c8fbe7e0
Merge pull request #17040 from Snuffleupagus/rm-save-disabled-CSS
[Editor] Remove unused CSS rules for the altText "Save"-button (PR 17015 follow-up)
2023-09-27 16:29:16 +02:00
calixteman
fb16151247
Merge pull request #17039 from calixteman/alt_text_no_tooltip_when_resizing
[Editor] Disabled the alt-text button when the editor is being resized
2023-09-27 15:37:38 +02:00
Calixte Denizet
bdb8410ad4 [Editor] Disabled the alt-text button when the editor is being resized 2023-09-27 15:13:17 +02:00
Jonas Jenwald
880abd910e [Editor] Remove unused CSS rules for the altText "Save"-button (PR 17015 follow-up)
When PR 17015 removed the `disabled` handling for the "Save"-button it left a bunch of now unused CSS rules behind, which seems like a simply oversight.
Rather than shipping "dead" CSS rules, let's remove those until such a time that they're actually needed.
2023-09-27 14:58:22 +02:00
ayush
87a1baf29f docs: Make downloadManager optional in JSDoc 2023-09-27 12:47:50 +05:30
Jonas Jenwald
7413546e16 Remove comments from the *built* CSS files
The old pre-processor used for CSS, and HTML, files leaves comments intact which unnecessarily contributes to the overall size of the *built* CSS files (note that the built JavaScript files don't include comments).
Rather than trying to "hack" comment removal into the pre-processor it seems easier to use a PostCSS plugin instead. The one potential issue is that it also affects *some* whitespaces, and it's not clear to me if this'll work with the various CSS-related tests that run in mozilla-central.

Please refer to https://www.npmjs.com/package/postcss-discard-comments for additional information.
2023-09-26 13:38:26 +02:00
calixteman
3f7060e777
Merge pull request #17034 from calixteman/bug1855157
[Editor] Don't try to add data to the struct tree when there is no accessibilityData (bug 1855157)
2023-09-26 12:04:50 +02:00
Calixte Denizet
3ee5268a23 [Editor] Don't try to add data to the struct tree when there is no accessibilityData (bug 1855157) 2023-09-26 11:02:14 +02:00
calixteman
5f75404bc3
Merge pull request #17030 from calixteman/editor_remove_editing_class
[Editor] Remove the class fooEditing from the layer when destroying it
2023-09-25 19:44:50 +02:00
calixteman
549c414ff5
Merge pull request #17031 from calixteman/bug1854991
[Editor] Slightly postpone the move in the DOM in order to not block the UI (bug 1854991)
2023-09-25 19:44:27 +02:00
Calixte Denizet
71376f089c [Editor] Remove the class fooEditing from the layer when destroying it
and simplify the way to handle the different types of editors.
2023-09-25 18:56:11 +02:00
Calixte Denizet
29bc103fad [Editor] Slightly postpone the move in the DOM in order to not block the UI (bug 1854991) 2023-09-25 18:18:01 +02:00
Tim van der Meij
57d196e349
Merge pull request #17024 from timvandermeij/bump
Bump the stable version in `pdfjs.config`
2023-09-24 20:02:49 +02:00
Tim van der Meij
a93ac2a32b
Bump the stable version in pdfjs.config 2023-09-24 19:57:55 +02:00
Tim van der Meij
ce87167432
Merge pull request #17022 from timvandermeij/fix-intermittent-us
Fix integration test "Interaction in issue14307.pdf (1) must check input for US zip format"
2023-09-24 18:47:18 +02:00
Jonas Jenwald
6112f3ee74
Merge pull request #17023 from Snuffleupagus/altText-padding
[Editor] Add padding to the altText-button to account for different locales
2023-09-24 17:46:55 +02:00
Jonas Jenwald
fc898e1b38 [Editor] Add padding to the altText-button to account for different locales
*For many non-English locales the translated strings will be longer, which is easy to forget about during development/review.*

Note how for some locales (e.g. Swedish) the altText-button end up looking horizontally "cramped", hence it seems reasonable to add a bit of inline padding to improve this.
2023-09-24 16:13:16 +02:00
Tim van der Meij
6e584adfc5
Use realistic typing delays for the scripting integration tests
In the scripting integration tests we use a few different typing
delays, mostly 100 or 200 milliseconds. According to for example
https://www.typingpal.com/en/documentation/school-edition/pedagogical-resources/typing-speed,
a fast typing speed is around 300 characters per minute, which is 5
characters per second and therefore a delay of 200 milliseconds between
each keystroke. Note that this is already above average, so in practice
the delay will be even larger. Therefore the 100 milliseconds variant
is unrealistically fast and therefore not suitable for the integration
tests which aim to simulate the average user behavior.

On top of that, the quick typing speeds are problematic for the tests
that involve validation alert dialogs appearing during typing. In those
tests a handler is registered to close the dialog once it pops up, but
it takes time for Puppeteer to notice the dialog, trigger the handler
and close it. If the typing delay, which is the delay between the key
down and key up events according to the Puppeteer source code at
https://github.com/puppeteer/puppeteer/blob/master/packages/puppeteer-core/src/cdp/Input.ts#L209-L215,
is too short, the key up event will be fired before the dialog is
closed. In that time the text box we're typing in is not focused, so
when the dialog is closed the `page.type()` call on the text box will
never resolve because the key up event never reached the text box.

This commit aims to fix the issues by converting all 100 millisecond
delays to 200 milliseconds. For instance the "must check input for US
zip format" failed pretty consistently locally before and hasn't failed
anymore with a 200 millisecond delay.
2023-09-24 15:47:21 +02:00
calixteman
48d75599d3
Merge pull request #17018 from calixteman/alt_text_test
[Editor] Add an integration test for the new alt-text flow
2023-09-24 14:34:58 +02:00
Calixte Denizet
de553456ce [Editor] Add an integration test for the new alt-text flow 2023-09-24 13:39:18 +02:00
Tim van der Meij
9b464047bc
Merge pull request #17021 from timvandermeij/fix-intermittent-autoprint
Fix integration test "Interaction in autoprint.pdf must check if printing is triggered when the document is open"
2023-09-24 13:37:18 +02:00
Tim van der Meij
b41bca7da9
Don't wait for scripting to be ready in the autoprint integration test
This integration test fails often because we wait for scripting to be
ready before we check the printed page, but most of the time the PDF
is already done printing before scripting is reported to be ready.

This happens because the print trigger is on the `Open` event, which is
one of the first events to be dispatched and, most notably, before
scripting is marked as ready; please see
https://github.com/mozilla/pdf.js/blob/master/web/pdf_scripting_manager.js#L176-L191.
Given that the PDF document is only one page, printing it is usually
finished between triggering the `Open` event and scripting reported
to be ready. If this happens the printed page is already destroyed
before we get to our actual test, which will then timeout because it
will never find the printed page in the DOM.

This commit fixes the problem by not awaiting scripting to be ready
because the fact that the printed page appears is already enough to know
that autoprint was triggered (after all, there is no other user
interaction involved here). While we're here we also switch to the
shorter `page.waitForSelector` function.
2023-09-24 12:48:58 +02:00
Jonas Jenwald
57f548c989
Merge pull request #17019 from calixteman/bug1854818
[Editor] The ::before containter containing the border of a selected editor mustn't catch mouse events (bug 1854818)
2023-09-24 12:42:50 +02:00
Tim van der Meij
587a3a2eae
Merge pull request #17020 from Snuffleupagus/update-packages
Update packages and translations
2023-09-24 12:11:43 +02:00
Jonas Jenwald
073a1da6f5 Update l10n files 2023-09-24 11:05:37 +02:00
Jonas Jenwald
1b95ab7cfa Update npm packages 2023-09-24 11:03:19 +02:00
Calixte Denizet
57caa4601c [Editor] The ::before containter containing the border of a selected editor mustn't catch mouse events (bug 1854818) 2023-09-23 23:53:19 +02:00
Jonas Jenwald
f87ec67ab1 [api-major] Remove various deprecated functionality and options 2023-09-23 17:44:09 +02:00
Jonas Jenwald
0fc0dc3960
Merge pull request #17017 from Snuffleupagus/one-noContextMenu
Use one `noContextMenu` function in both the src/- and web/-folders
2023-09-23 16:18:26 +02:00
Jonas Jenwald
1df31c0284 Use one noContextMenu function in both the src/- and web/-folders
Currently we duplicate this event handler function in multiple places, which seems unnecessary.
2023-09-23 15:37:13 +02:00
Tim van der Meij
a09b7228fb
Merge pull request #16970 from timvandermeij/fix-intermittent-border
Fix integration test "Interaction in issue15053.pdf must check that a button and text field with a border are hidden"
2023-09-23 14:35:07 +02:00
Tim van der Meij
f9eda5b30e
Merge pull request #16967 from timvandermeij/fix-intermittent-freetext
Fix integration test "FreeText Editor FreeText (edit existing in double clicking on it) must move an annotation"
2023-09-23 14:34:43 +02:00
calixteman
d2e34dff93
Merge pull request #17016 from calixteman/alt_text_button_no_menu
[Editor] Disable context menu on alt-text button and in the associated dialog
2023-09-23 14:22:30 +02:00
Calixte Denizet
88f3ed7745 [Editor] Disable context menu on alt-text button and in the associated dialog
but keep it for the text area.
Disable pointerdown on the alt-text button to disable dragging the editor
when the button is clicked (especially when slightly moving the mouse
between the down and the up).
2023-09-22 23:27:55 +02:00
Jonas Jenwald
85568bd6cc
Merge pull request #17012 from Snuffleupagus/altText-telemetry-on-close
[Editor] Report telemetry when closing the altText dialog with `Esc` (PR 16987 follow-up)
2023-09-22 22:45:13 +02:00
Jonas Jenwald
9e0e67918f [Editor] Report telemetry when closing the altText dialog with Esc (PR 16987 follow-up)
The dialog element handles closing with <kbd>Esc</kbd> automatically, however we're not reporting telemetry in that case.
In order to fix that the easiest solution, as far as I'm concerned, seem to be moving the telemetry reporting into the dialog-close handler since it's always invoked.
2023-09-22 22:20:49 +02:00
Jonas Jenwald
d555f351d3
Merge pull request #17011 from Snuffleupagus/altText-destroy-keep-#currentEditor
Don't reset `this.#currentEditor` when destroying the dialog
2023-09-22 22:18:02 +02:00
Jonas Jenwald
8c5da23f67 Don't reset this.#currentEditor when destroying the dialog
This patch addresses an edge-case that'll probably never happen, but it nonetheless seems like something that we want to fix.

Note how we're using the `#currentEditor`-field to prevent opening the dialog when it's already active, and it being reset once the dialog has been closed.
By also resetting the `#currentEditor`-field during destruction, instead of waiting until the dialog has actually closed (assuming it's currently open), there's a *tiny* window of time[1] during which we could theoretically allow to (incorrectly) re-open the dialog and thus getting out-of-sync state in the viewer-component.

---
[1] Since the "close" event, on a dialog-element, is dispatched asynchronously by the browser.
2023-09-22 21:53:26 +02:00
calixteman
c027aaeefa
Merge pull request #17015 from calixteman/alt_text_save_button
[Editor] Let the Save button always enabled in the alt-text dialog
2023-09-22 21:18:30 +02:00
Calixte Denizet
d5936d9a15 [Editor] Let the Save button always enabled in the alt-text dialog 2023-09-22 20:46:29 +02:00
calixteman
f66613c8e4
Merge pull request #17005 from calixteman/alt_text_tweak_save_flow
[Editor] Tweak the save flow in the alt-text dialog
2023-09-22 17:45:49 +02:00
Jonas Jenwald
a68845c902
Merge pull request #17014 from Snuffleupagus/reporttelemetry-tweaks
Don't bother trying to unregister the "reporttelemetry" event listener
2023-09-22 17:35:55 +02:00
Jonas Jenwald
43c7e88fa9 Don't bother trying to unregister the "reporttelemetry" event listener
Note that both event-unbind methods are unused in MOZCENTRAL builds; see https://searchfox.org/mozilla-central/rev/48b6992e03fa66f77ac9688ba61c95d31a451bc1/toolkit/components/pdfjs/content/web/viewer.js#1864-1869
2023-09-22 17:24:32 +02:00
Calixte Denizet
050093c9f5 [Editor] Tweak the save flow in the alt-text dialog
When the user edit an existing alt-text and remove it, we want to be able
to save this state and consequently remove the done state from the
alt-text button.
Remove the button from its parent when the editor is removed: it should
help to save few Kb of memory.
2023-09-22 17:10:20 +02:00
calixteman
3f859f76e6
Merge pull request #17010 from calixteman/alt_text_mask_1
[Editor] Darken the toolbar when the alt-text dialog is opened
2023-09-22 13:34:57 +02:00
Jonas Jenwald
eff7ed580d
Merge pull request #17009 from Snuffleupagus/altText-label-clicks
[Editor] Make the altText dialog labels part of telemetry (PR 16987 follow-up)
2023-09-22 13:26:57 +02:00
Calixte Denizet
0237e2eb2b [Editor] Darken the toolbar when the alt-text dialog is opened
It aims to fix the issue spotted in:
https://github.com/mozilla/pdf.js/pull/17002#issuecomment-1730962273
2023-09-22 13:11:37 +02:00
Jonas Jenwald
ee5b8bcf9e [Editor] Make the altText dialog labels part of telemetry (PR 16987 follow-up)
Radio-buttons can also be toggled by clicking on their associated `label`-elements, and not only the `input`-elements itself, however it seems that "pointerdown" event listeners don't cover that case.
Hence it's possible that telemetry could miss certain cases of a mouse being used, and the easiest solution seem to be to instead use "click" event listeners and just ignore keyboard-based events.
2023-09-22 12:26:03 +02:00
calixteman
2fc8ab3477
Merge pull request #17002 from calixteman/alt_text_mask
[Editor] Avoid to darken the current editor when opening the alt-text dialog
2023-09-22 12:17:21 +02:00
Jonas Jenwald
edb83ffec2
Merge pull request #17004 from Snuffleupagus/dialog-disable-zooming
Prevent wheel/touch zooming in the viewer when a dialog is open
2023-09-22 09:19:19 +02:00
Jonas Jenwald
988222d7de
Merge pull request #17003 from Snuffleupagus/issue-17000
Restore the `collectFields` parameter in the Annotation code (issue 17000)
2023-09-22 09:11:52 +02:00
Calixte Denizet
6545551e76 [Editor] Avoid to darken the current editor when opening the alt-text dialog 2023-09-21 20:44:53 +02:00
Jonas Jenwald
9b21f17b03 Prevent wheel/touch zooming in the viewer when a dialog is open 2023-09-21 20:08:08 +02:00
Jonas Jenwald
4cedc12341 Restore the collectFields parameter in the Annotation code (issue 17000)
Rather than trying to be "clever" here, and possibly affect code readability negatively, let's just restore the `collectFields` parameter to address the unneeded parsing that now happens when printing new Annotations.
2023-09-21 19:49:31 +02:00
Jonas Jenwald
e9f707ce3f
Merge pull request #16999 from Snuffleupagus/issue-16994
[GeckoView] Exclude `annotation_editor_layer_builder.css` in the build (issue 16994)
2023-09-21 19:26:50 +02:00
Jonas Jenwald
5711d0f95d [GeckoView] Exclude annotation_editor_layer_builder.css in the build (issue 16994)
Given the limitations of the old pre-processor that's used for CSS/HTML files, this unfortunately isn't as "easy" to implement as it is for JavaScript code.
Since this is the first case where we've wanted to do conditional CSS imports, rather than trying to completely re-write the pre-processor, this patch settles for handling it explicitly in the `expandCssImports` function.
2023-09-21 15:51:33 +02:00
calixteman
a7894a4d7b
Merge pull request #16993 from Snuffleupagus/gv-no-AltTextManager
[GeckoView] Avoid bundling the `AltTextManager` class, since it's unused
2023-09-21 14:19:51 +02:00
calixteman
9de432ba7a
Merge pull request #16998 from calixteman/fix_css_linter_issue_1
Make one of the m-c linters happy
2023-09-21 14:14:56 +02:00
Calixte Denizet
61c77c7d8b Make one of the m-c linters happy 2023-09-21 14:09:48 +02:00
calixteman
b002d16f04
Merge pull request #16996 from Snuffleupagus/issue-16995
Enable the Stylelint `declaration-block-no-duplicate-properties` rule (issue 16995)
2023-09-21 13:52:54 +02:00
Jonas Jenwald
80e691d2ad Enable the Stylelint declaration-block-no-duplicate-properties rule (issue 16995)
Please refer to https://stylelint.io/user-guide/rules/declaration-block-no-duplicate-properties
2023-09-21 13:42:05 +02:00
Jonas Jenwald
e2b7896826 [GeckoView] Avoid bundling the AltTextManager class, since it's unused 2023-09-21 12:51:34 +02:00
calixteman
561aea530b
Merge pull request #16991 from Snuffleupagus/alt_text_edit-boolean
Ensure that all "alt_text_*" save-telemetry values are boolean (PR 16987 follow-up)
2023-09-21 11:04:06 +02:00
calixteman
237b8ce4a8
Merge pull request #16988 from calixteman/alt_text_dialog_others
[Editor] Tweak few values after review from UX
2023-09-21 11:03:19 +02:00
calixteman
67ddabcbc2
Merge pull request #16990 from calixteman/alt_text_aria_label
[Editor] Add an aria-label to the alt-text button depending on its state
2023-09-21 10:56:25 +02:00
Calixte Denizet
b5d18006a7 [Editor] Tweak few values after review from UX 2023-09-21 10:52:58 +02:00
Jonas Jenwald
5660cdfe68 Ensure that all "alt_text_*" save-telemetry values are boolean (PR 16987 follow-up)
Looking at the save-telemetry values they're all boolean *except* for "alt_text_edit" in one instance, since `this.#previousAltText` may be an empty string (looking at the `editAltText` method) and this value may thus become an empty string as well.
2023-09-21 08:36:41 +02:00
Jonas Jenwald
34506f8874
Merge pull request #16989 from Snuffleupagus/more-reporttelemetry-event
Use the new "reporttelemetry" event in more viewer components
2023-09-20 22:06:14 +02:00
Calixte Denizet
c90ea2314e [Editor] Add an aria-label to the alt-text button depending on its state 2023-09-20 21:56:16 +02:00
Jonas Jenwald
fe60db27b1 Use the new "reporttelemetry" event in more viewer components
By utilizing the recently added "reporttelemetry" event, we can avoid having to manually pass in `externalServices` to a number of viewer components.
2023-09-20 20:18:10 +02:00
calixteman
f2d75d9221
Merge pull request #16985 from calixteman/btn_bg
[Editor] Change the colors for the disabled Save button in alt text dialoag in HCM
2023-09-20 19:03:01 +02:00
Calixte Denizet
7d0bf376d0 [Editor] Change the colors for the disabled Save button in alt text dialoag in HCM 2023-09-20 18:58:31 +02:00
calixteman
67646387c8
Merge pull request #16986 from calixteman/alt_text_contents
[Editor] Change some strings in the alt-text dialog
2023-09-20 18:52:37 +02:00
Calixte Denizet
9a677d0d4d [Editor] Change some strings in the alt-text dialog 2023-09-20 18:44:56 +02:00
calixteman
0317d3e168
Merge pull request #16987 from calixteman/alt_text_telemetry
[Editor] Add more telemetry for the 'add image' feature (bug 1853960)
2023-09-20 17:34:59 +02:00
Calixte Denizet
0a278ef0bc [Editor] Add more telemetry for the 'add image' feature (bug 1853960) 2023-09-20 17:23:23 +02:00
calixteman
b80e0d881d
Merge pull request #16984 from Snuffleupagus/altText-close
Don't try to close the `altText` dialog if it's not open (PR 16977 follow-up)
2023-09-20 11:14:28 +02:00
calixteman
b7fa4fb0f7
Merge pull request #16983 from calixteman/alt_text_tooltip
[Editor] Add a tooltip showing the alt text when hovering the alt-text button (bug 1844952)
2023-09-20 11:00:31 +02:00
Calixte Denizet
7952a36384 [Editor] Add a tooltip showing the alt text when hovering the alt-text button (bug 1844952) 2023-09-20 10:50:28 +02:00
Jonas Jenwald
21c55b56bf Don't try to close the altText dialog if it's not open (PR 16977 follow-up)
When closing a document in the viewer, e.g. by running `PDFViewerApplication.close()` in the console, the `AltTextManager.#finish` method currently throws *unless* the `altText` dialog is actually open.
Similar to e.g. the PasswordPrompt, we should thus only attempt to close the `altText` dialog when it's open.
2023-09-20 07:59:46 +02:00
calixteman
8d326e5e30
Merge pull request #16982 from calixteman/alt_text_rm_copy_listeners
[Editor] Remove copy/paste listener when alt text dialog is displayed
2023-09-19 22:52:49 +02:00
Calixte Denizet
c162b004ce [Editor] Remove copy/paste listener when alt text dialog is displayed 2023-09-19 22:41:47 +02:00
calixteman
54f6264d5b
Merge pull request #16977 from calixteman/add_alt_text
[Editor] Allow the user to add and save an alt-text for images (bug 1844952)
2023-09-19 21:59:59 +02:00
Calixte Denizet
c12049db07 [Editor] Allow the user to add and save an alt-text for images (bug 1844952) 2023-09-19 21:46:48 +02:00
Jonas Jenwald
29a48f9479
Merge pull request #16981 from Snuffleupagus/optionalContent-type-missing
Ignore optional content with missing /Type-entries
2023-09-19 15:15:00 +02:00
Jonas Jenwald
0ac8f33e13 Ignore optional content with missing /Type-entries
In the rare situation that an optional content dictionary lacks a /Type-entry we currently throw, which may prevent e.g. Form XObjects from rendering completely.

Fixes https://bugs.ghostscript.com/show_bug.cgi?id=707147
2023-09-19 14:11:03 +02:00
calixteman
daae6589b6
Merge pull request #16979 from calixteman/alt_text_change_str1
[Editor] Update alt text dialog description
2023-09-19 10:36:50 +02:00
calixteman
b9469c2059
Merge pull request #16980 from calixteman/rounded_resizers
[Editor] Make the border of the resizers slightly rounded
2023-09-19 10:12:11 +02:00
Calixte Denizet
f7870c04ae [Editor] Make the border of the resizers slightly rounded
It's a part of the UX specifications. There's a drawing issue in Firefox
(see bug https://bugzilla.mozilla.org/1853288) but setting the
background-clip property to content-box seems to be a good workaround.
2023-09-19 09:57:00 +02:00
Calixte Denizet
0df9d1d934 [Editor] Update alt text dialog description 2023-09-19 09:27:43 +02:00
calixteman
5ac40b71c0
Merge pull request #16952 from calixteman/alt_text_window
[Editor] Add a dialog box in order to get alt-text data (bug 1844952)
2023-09-18 21:49:33 +02:00
Calixte Denizet
df0da86b64 [Editor] Add a dialog box in order to get alt-text data (bug 1844952)
Implement the specifications provided by UX for light, dark and HCM modes.
2023-09-18 21:42:52 +02:00
calixteman
c0ed7fff2c
Merge pull request #16975 from calixteman/alt_text_fix_icon_dims
[Editor] Use the same height as in the svg for icons for the alt-text button
2023-09-18 19:53:48 +02:00
Calixte Denizet
60ccce5cb1 [Editor] Use the same height as in the svg for icons for the alt-text button 2023-09-18 19:07:36 +02:00
calixteman
c8727d9c70
Merge pull request #16974 from calixteman/fix_css_linter_issue
Fix a CSS linter issue in removing a useless comma
2023-09-18 19:01:33 +02:00
calixteman
2bd7bb3847
Merge pull request #16972 from calixteman/alt_text_icon_alpha
[Editor] Avoid to have some transparency in the icon used in the 'Alt text' button
2023-09-18 18:46:46 +02:00
Calixte Denizet
9b6e37c2cd Fix a CSS linter issue in removing a useless comma 2023-09-18 18:45:14 +02:00
Calixte Denizet
9dbe95c63c [Editor] Avoid to have some transparency in the icon used in the 'Alt text' button 2023-09-18 18:25:03 +02:00
calixteman
b85281914f
Merge pull request #16955 from calixteman/alt_text_button
[Editor] Add a button to trigger a dialog for adding an alt text (bug 1844952)
2023-09-18 15:50:10 +02:00
Calixte Denizet
a216836fd5 [Editor] Add a button to trigger a dialog for adding an alt text (bug 1844952) 2023-09-18 15:07:09 +02:00
calixteman
3afb717eed
Merge pull request #16938 from calixteman/update_struct_tree
[Editor] Add the ability to create/update the structure tree when saving a pdf containing newly added annotations (bug 1845087)
2023-09-18 13:04:52 +02:00
Tim van der Meij
01428f1e23
Wait for visibility change in the issue15053 integration test
Especially on slower bots there is some time between clicking the
element and the actual visibility change, but we didn't await this and
checked the visibility state immediately after clicking. This can be
reproduced 100% of the time by introducing a delay in the `display` and
`hidden` handlers of the `_commonActions` shadow call.

This commit fixes the problem by waiting until the first visibility
change actually happened before continuing with the assertions.
2023-09-17 19:48:14 +02:00
Tim van der Meij
1b3ccf1321
Wait for selector instead of timeout in the freetext double click move integration test
This integration test currently fails intermittently on the bots because
of the fixed timeout in the test, which is sometimes too low on slower
systems. The issue can be reproduced 100% of the time by introducing a
delay just before dispatching the `switchannotationeditormode` event.

Puppeteer also discourages this and instead recommends waiting for a
selector instead, which we now do here. This ensures that the test only
continues if the element under test is available and therefore prevents
any timing problems.
2023-09-17 18:49:11 +02:00
Tim van der Meij
97819891b6
Merge pull request #16964 from timvandermeij/fix-intermittent-annotations-move
Fix off-by-one errors in the "FreeText must move several annotations" integration test
2023-09-17 17:46:19 +02:00
Tim van der Meij
306cca930f
Fix off-by-one errors in the "FreeText must move several annotations" integration test
The x/y-coordinates are floats instead of integers like one might
expect. The current approach rounds both the old and the new
coordinates in order to do integer comparison. However, rounding each
coordinate individually causes too much loss of precision because,
depending on the decimal value, they are either rounded up or down
which causes intermittent off-by-one errors.

This commit fixes the problem by comparing coordinate differences
instead of the coordinates themselves. The precision loss is avoided
by subtracting the old from the new coordinate as-is and only rounding
the final result.
2023-09-17 15:56:51 +02:00
Tim van der Meij
e37e7b6f39
Merge pull request #16962 from timvandermeij/fix-intermittent-bug1844576
Fix integration test "Interaction in bug1844576.pdf must check that a field has the correct formatted value"
2023-09-17 14:12:55 +02:00
Tim van der Meij
0d3fbc1818
Wait for selector instead of timeout in the bug1844576 integration test
This integration test currently fails intermittently on the bots because
of the fixed timeout in the test, which is sometimes too low on slower
systems. The issue can be reproduced 100% of the time by introducing a
delay in the `WidgetAnnotationElement.showElementAndHideCanvas` method.

Puppeteer also discourages this and instead recommends waiting for a
selector instead, which we now do here. This ensures that the test only
continues if the element under test is available and therefore prevents
any timing problems.
2023-09-17 13:15:53 +02:00
Tim van der Meij
dd46110f6b
Use the page.$eval method in the bug1844576 integration test
We already use `page.$eval` in most other integration tests and it's
simpler because it already takes the selector as argument, so we don't
have to do a separate `querySelector` call ourselves.
2023-09-17 13:09:39 +02:00
Tim van der Meij
518590ac7d
Merge pull request #16961 from Snuffleupagus/debugger-rm-closure
Remove (some) closures from `web/debugger.js`
2023-09-17 11:45:14 +02:00
Tim van der Meij
98671c3618
Merge pull request #16959 from Snuffleupagus/rm-CipherTransformFactory-closure
Remove the closure from the `CipherTransformFactory` class
2023-09-17 11:42:20 +02:00
Jonas Jenwald
2d79be941e Convert PDFBug, in web/debugger.js, to a class with static methods
This gets rid of one more closure from the code-base.
2023-09-17 08:06:43 +02:00
Jonas Jenwald
c9cd934f8a Stop hard-coding the panel width in web/debugger.js
Thanks to CSS variables we can avoid hard-coding the panel width in the JavaScript code.
2023-09-17 08:06:33 +02:00
Jonas Jenwald
22cd0c6ff8 Remove the closure from the Stepper class in web/debugger.js 2023-09-17 08:06:26 +02:00
Calixte Denizet
a8573d4e1b [Editor] Add the ability to create/update the structure tree when saving a pdf containing newly added annotations (bug 1845087)
When there is no tree, the tags for the new annotions are just put under the root element.
When there is a tree, we insert the new tags at the right place in using the value
of structTreeParentId (added in PR #16916).
2023-09-16 18:34:58 +02:00
Jonas Jenwald
0304b65fcd Remove the closure from the CipherTransformFactory class
Now that modern JavaScript is fully supported also in the worker-thread we no longer need to keep old closures, which slightly reduces the size of the code.
2023-09-16 16:34:24 +02:00
Tim van der Meij
b49fe5baac
Merge pull request #16958 from timvandermeij/puppeteer
Update Puppeteer to version 21.2.1
2023-09-16 15:09:56 +02:00
Tim van der Meij
7f8de83e96
Merge pull request #16957 from Snuffleupagus/SaveDocument-more-await
Use `await` even more in the "SaveDocument" worker-thread handler
2023-09-16 14:31:05 +02:00
Tim van der Meij
6c5d5f3cb9
Update Puppeteer to version 21.2.1
This release fixes the upstream bug that caused old Firefox revisions to
not be removed from the cache.

Fixes #16904.
2023-09-16 14:05:26 +02:00
Tim van der Meij
89c8f90a14
Merge pull request #16956 from Snuffleupagus/opMap-rm-getLookupTableFactory
Simplify the `EvaluatorPreprocessor.opMap` getter a little bit
2023-09-16 13:51:33 +02:00
Jonas Jenwald
ff96c413d3 Use await even more in the "SaveDocument" worker-thread handler
Given that the function is already asynchronous we can make use of `await` even more and reduce the amount of indentation a little bit.
2023-09-16 13:06:48 +02:00
Tim van der Meij
4dd197ae3f
Merge pull request #16954 from Snuffleupagus/rm-colorspace-closure
Remove the remaining closures in the `src/core/colorspace.js` file
2023-09-16 12:28:32 +02:00
Jonas Jenwald
316d1ec5ef Simplify the EvaluatorPreprocessor.opMap getter a little bit
Given that this is a shadowed getter, the `opMap` is already lazily initialized and it shouldn't be necessary to *also* use the `getLookupTableFactory` helper function here. Looking at the history of the code, it seems that this is simply a leftover from before JavaScript classes existed.
2023-09-16 12:26:38 +02:00
Jonas Jenwald
8cb5d01acd Remove the closure from the LabCS class
Now that modern JavaScript is fully supported also in the worker-thread we no longer need to keep old closures, which slightly reduces the size of the code.
2023-09-16 12:20:14 +02:00
Jonas Jenwald
52fa66a98b Remove the closure from the CalRGBCS class
Now that modern JavaScript is fully supported also in the worker-thread we no longer need to keep old closures, which slightly reduces the size of the code.
2023-09-16 12:20:12 +02:00
Jonas Jenwald
4d615f087f Remove the closure from the CalGrayCS class
Now that modern JavaScript is fully supported also in the worker-thread we no longer need to keep old closures, which slightly reduces the size of the code.
2023-09-15 15:53:16 +02:00
Jonas Jenwald
d2c8997380 Remove the closure from the DeviceCmykCS class
Now that modern JavaScript is fully supported also in the worker-thread we no longer need to keep old closures, which slightly reduces the size of the code.
2023-09-15 15:53:05 +02:00
Jonas Jenwald
586d3add46
Merge pull request #16951 from Snuffleupagus/tweak-pattern-getB
Make it possible to clear the cache, used by the `getB` function in `src/core/pattern.js`
2023-09-15 14:06:51 +02:00
Jonas Jenwald
628ca737dd Make it possible to clear the cache, used by the getB function in src/core/pattern.js
While this cache will not contain a huge amount of data in practice, it's nonetheless a *global* cache that currently will never be cleared.

This patch also removes the existing closure, since it shouldn't really be necessary nowadays given that the code is a JavaScript module which means that only explicitly listed properties will be exported.
2023-09-15 12:23:06 +02:00
calixteman
4c0fbe51e5
Merge pull request #16950 from calixteman/resizers_hcm
[Editor] Change the colors of the outline and the resizers for selected editors in HCM
2023-09-15 11:52:27 +02:00
Jonas Jenwald
93ce7c5a89 Change the getB function, in src/core/pattern.js, to use the exponentiation operator 2023-09-15 11:46:00 +02:00
Calixte Denizet
38f60a7eff [Editor] Change the colors of the outline and the resizers for selected editors in HCM 2023-09-15 10:29:49 +02:00
calixteman
8d695c982f
Merge pull request #16943 from calixteman/new_resizers
[Editor] Change the style of the bounding box and the resizers (bug 1852897)
2023-09-14 10:42:18 +02:00
Calixte Denizet
01f9f385d7 [Editor] Change the style of the bounding box and the resizers (bug 1852897) 2023-09-14 09:45:41 +02:00
calixteman
920e51a1e6
Merge pull request #16944 from calixteman/move_dom_after_position
[Editor] Move an editor in the DOM just after having moved it on the screen
2023-09-13 12:34:21 +02:00
Calixte Denizet
720963bbe6 [Editor] Move an editor in the DOM just after having moved it on the screen
It avoids to have to remember to call moveInDOM after fixAndSetPosition is called.
2023-09-13 10:51:25 +02:00
Jonas Jenwald
b1578225fc
Merge pull request #16941 from Snuffleupagus/SaveDocument-await-requestLoadedStream
Ensure that the entire PDF document is loaded *before* we begin saving it
2023-09-12 17:34:34 +02:00
Jonas Jenwald
50937a3539 Ensure that the entire PDF document is loaded *before* we begin saving it
When I started looking at PR 16938 it occurred to me that some of the new structTree-methods are synchronously accessing certain dictionary-data (not used during "normal" structTree-parsing), which may not be generally safe since everything in a dictionary could be a reference (and the relevant data may not have been loaded yet).

Rather than suggesting that we make all those new methods even more asynchronous, to me the overall simplest and safest solution is to ensure that the *entire* PDF document has been loaded *before* we begin saving it. In practice this shouldn't really affect "performance" of saving noticeably, since it's always depended on the entire PDF document being downloaded.

Finally note that with the exception of the PDF document possibly not having been fully downloaded when saving is triggered, all other "global" document properties are pretty much guaranteed to already be available at this point.
2023-09-12 13:26:57 +02:00
calixteman
953f271425
Merge pull request #16940 from calixteman/get_back_focus_when_required
[Editor] Only get back the focus when it has been lost after an editor has been moved in the DOM
2023-09-12 13:22:47 +02:00
Calixte Denizet
5646604883 [Editor] Only get back the focus when it has been lost after an editor has been moved in the DOM 2023-09-12 12:17:24 +02:00
Tim van der Meij
221ee6ca37
Merge pull request #16932 from timvandermeij/unit-test-enable
Enable unit test "creates pdf doc from non-existent URL"
2023-09-10 18:12:56 +02:00
Tim van der Meij
66507ccae8
Enable unit test "creates pdf doc from non-existent URL"
The unit test is re-enabled because it no longer seems to fail after 10
runs on Linux where this used to fail often. Code inspection also shows
that the code is correct and should raise the previous exception
(anymore). Finally, a lot has changed since this test was disabled such
as new Jasmine versions, new Linux bot OS version and new browser
versions.
2023-09-10 15:47:04 +02:00
Tim van der Meij
5f93638045
Merge pull request #16925 from timvandermeij/updates
Update packages and translations
2023-09-10 11:30:56 +02:00
Tim van der Meij
981ef9e31e
Update translations 2023-09-09 17:53:43 +02:00
Tim van der Meij
f42d70a24e
Update packages 2023-09-09 17:53:43 +02:00
Jonas Jenwald
18a661b6a0
Merge pull request #16920 from Snuffleupagus/annotationGlobals
Slightly reduce asynchronicity when parsing Annotations
2023-09-09 09:55:49 +02:00
calixteman
cf7efdb040
Merge pull request #16921 from calixteman/simplify_write
Simplify writeObject function
2023-09-08 21:25:44 +02:00
Calixte Denizet
52cc1220e4 Simplify writeObject function
It'll avoid to have the duplication of the code to get the encrypt transform,
and last but not least, it'll avoid to forget about encryption.
2023-09-08 19:59:59 +02:00
calixteman
b903b3030a
Merge pull request #16916 from calixteman/parent_in_struct_tree
[Editor] Add the parent tag id (if any) to the serialized editors (bug 1845087)
2023-09-08 16:24:47 +02:00
Jonas Jenwald
b5b061cdb6 Slightly re-factor the parameter handling in Catalog.parseDestDictionary
While it makes sense to check that the `destDict` parameter is indeed a Dictionary, since that data comes from the PDF document itself, the `resultObj` parameter is an internal PDF.js implementation detail that should always be correct (or tests will fail).
2023-09-08 13:27:31 +02:00
Jonas Jenwald
df9cce39c0 Slightly reduce asynchronicity when parsing Annotations
Over time the amount of "document level" data potentially needed during parsing of Annotations have increased a fair bit, which means that we currently need to ensure that a bunch of data is available for each individual Annotation.
Given that this data is "constant" for a PDF document we can instead create (and cache) it lazily, only when needed, *before* starting to parse the Annotations on a page. This way the parsing of individual Annotations should become slightly less asynchronous, which really cannot hurt.

An additional benefit of these changes is that we can reduce the number of parameters that need to be explicitly passed around in the annotation-code, which helps overall readability in my opinion.

One potential drawback of these changes is that the `AnnotationFactory.create` method no longer handles "everything" on its own, however given how few call-sites there are I don't think that's too much of a problem.
2023-09-08 13:27:27 +02:00
Calixte Denizet
c6f7e722c9 [Editor] Add the parent tag id (if any) to the serialized editors (bug 1845087)
The tag id will be useful in order to update the StructTree when saving
the pdf.
2023-09-07 18:22:33 +02:00
calixteman
3e32d87be7
Merge pull request #16915 from calixteman/issue16914
Construct the correct field name and strip out classes when searching
2023-09-07 16:46:33 +02:00
Calixte Denizet
a8a50c567a Construct the correct field name and strip out classes when searching
The classes were stripped out during when creating the field name but
it led to a wrong name.
Since class components in a path are irrelevant, they're just ignored
when searching for a node in the datasets.
2023-09-07 15:56:47 +02:00
calixteman
5ffa23c7f1
Merge pull request #16911 from calixteman/issue16872
[Editor] Avoid to use parent of editors in destroyed pages
2023-09-07 14:59:47 +02:00
Calixte Denizet
8ab4e2e6e7 [Editor] Avoid to use parent of editors in destroyed pages 2023-09-07 12:30:29 +02:00
Jonas Jenwald
cf5a1d60a6
Merge pull request #16897 from mozilla/dependabot/github_actions/actions/checkout-4
Bump actions/checkout from 3 to 4
2023-09-05 17:46:48 +02:00
calixteman
03eabae613
Merge pull request #16905 from calixteman/bug1851517
Only call the focus/blur callbacks when it's necessary (bug 1851517)
2023-09-05 15:19:36 +02:00
Calixte Denizet
d03494eeff Only call the focus/blur callbacks when it's necessary (bug 1851517)
Focus callback must be called only when the element has been blurred.
For example, blur callback (which implies some potential validation) is not called
because the newly focused element is an other tab, an alert dialog, ... so consequently
the focus callback mustn't be called when the element gets its focus back.
2023-09-05 14:18:51 +02:00
Jonas Jenwald
92792a8215
Merge pull request #16902 from Snuffleupagus/FileAttachment-keyboard-download
Support downloading FileAttachment annotations with the keyboard
2023-09-05 12:45:04 +02:00
Jonas Jenwald
e7800c22dd Support downloading FileAttachment annotations with the keyboard
While reviewing PR 16898 it occurred to me that it's currently impossible to trigger downloading of FileAttachment annotations using the keyboard.
Hence this patch adds `Ctrl + Enter` as the keyboard shortcut to download those, thus supplementing the existing double-clicking when using a mouse.
2023-09-05 11:31:30 +02:00
calixteman
f2a4f2adaf
Merge pull request #16899 from calixteman/bug1851498
Unconditionally render non-form annotations in the annotation layer (bug 1851498)
2023-09-05 11:28:23 +02:00
Calixte Denizet
a00b542f2f Unconditionally render non-form annotations in the annotation layer (bug 1851498)
The goal is to always have something which is focusable to let the user select
it with the keyboard.
It fixes the mentioned bug because, the annotation layer will now have a container
to attach the canvas for annotations having their own canvas.
2023-09-05 10:41:01 +02:00
calixteman
08f9e48280
Merge pull request #16898 from calixteman/make_annotation_focusable
Make annotations focusable (bug 1851489)
2023-09-04 18:08:58 +02:00
Calixte Denizet
7f44f353b3 Make annotations focusable (bug 1851489)
When the annotation has a popup then the popup can be toggled in using
the Enter key and hidden in using the Escape key.
2023-09-04 17:12:23 +02:00
dependabot[bot]
48a2c29f98
Bump actions/checkout from 3 to 4
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-04 12:51:59 +00:00
Jonas Jenwald
b18a1669ac
Merge pull request #16896 from Rob--W/grab-to-pan-css-fix
Drop redundant styles from .grab-to-pan-grab:active
2023-09-04 10:23:12 +02:00
Rob Wu
28bda9f68b Drop redundant styles from .grab-to-pan-grab:active
`.grab-to-pan-grab:active` is `#viewerContainer` when the mouse is
pressed down.  It is supposed to have a `cursor: grabbing` appearance
immediately on mousedown,

`.grab-to-pan-grabbing` is the overlay that is supposed to cover
everything, and also has the `cursor: grabbing` appearance. The "cover
everything" result is achieved through `position:fixed`, `inset:0`, etc.

The block with these CSS properties for "cover everything" is currently
shared by `.grab-to-pan-grab:active` and `.grab-to-pan-grabbing`, but
only "cursor" need to be shared. The original JS and CSS code at
https://github.com/Rob--W/grab-to-pan.js shows that these were supposed
to be associated with the overlay only.

The PR that added this to PDF.js also shows that the "cover everything"
CSS properties were supposed to be limited to the overlay only:
https://github.com/mozilla/pdf.js/pull/4209#discussion-diff-9285917

But the final version of the PR mistakenly merged them together.
This patch rectifies that mistake.
2023-09-03 19:45:18 +02:00
Tim van der Meij
1e7c907fbf
Merge pull request #16881 from Snuffleupagus/InternalRenderTask-tweaks
A couple of small `InternalRenderTask` changes
2023-09-03 13:05:31 +02:00
Tim van der Meij
11c5213185
Merge pull request #16895 from Snuffleupagus/update-packages
Update packages and translations
2023-09-03 13:03:28 +02:00
Jonas Jenwald
07cca3ddd9 Update l10n files 2023-09-03 10:01:37 +02:00
Jonas Jenwald
92831455bf Update npm packages 2023-09-03 09:59:08 +02:00
Jonas Jenwald
87ea2ed4e2
Merge pull request #16890 from stof/fix_type_generator
[Type-definitions] Fix type generator to support import maps
2023-09-01 12:00:27 +02:00
Christophe Coevoet
46f2c5893d Revert "Temporarily stop running gulp typestest in GitHub Actions"
This reverts commit d9350c38997b31ee9f0058f438b332997eb53e07.
2023-09-01 09:48:39 +02:00
Christophe Coevoet
d0f14b1ce3 Add support for the import map in the type generator
The typescript compiler is now configured to know about the import map
to be able to resolve those imports and find the associated types.
As tsc outputs declaration files using the original module identifiers
and not the resolved ones, tsc-alias is used to post-process the
declaration files by resolving those paths.
2023-09-01 09:48:39 +02:00
Christophe Coevoet
bbf11a5783 Migrate the typescript options to a config file
Some configurations settings like `paths` cannot be provided through CLI
arguments but only in a configuration file. And when using a
configuration file, only a few options (like `--outDir` can still be
provided) through the CLI.
2023-09-01 09:48:34 +02:00
Jonas Jenwald
b5c8849111
Merge pull request #16892 from Snuffleupagus/addLinkAttributes-rm-removeNullCharacters
Stop using `removeNullCharacters` in the `addLinkAttributes` helper function
2023-08-31 21:52:44 +02:00
Jonas Jenwald
c5ee72bb95 Stop using removeNullCharacters in the addLinkAttributes helper function
Using `removeNullCharacters` on the URL should be completely redundant, given the kind of data that we're passing to the `addLinkAttributes` helper function. Note that whenever we're handling a URL, originating in the worker-thread, in the viewer that helper function is always being used.

Furthermore, on the worker-thread all URLs are parsed with the `createValidAbsoluteUrl` helper function, which uses `new URL()` to ensure that a valid URL is obtained. Note that the `URL` constructor will either throw, or in some cases just ignore them, when encountering `\u0000`-characters during parsing.

Hence it should be *impossible* for a valid URL to contain `\u0000`-characters and we can thus simplify the viewer-code a tiny bit. The use of `removeNullCharacters` is most likely a left-over from back when `new URL()` wasn't generally available in browsers.
2023-08-31 20:10:50 +02:00
Jonas Jenwald
9190445a21
Merge pull request #16891 from Snuffleupagus/structElement-removeNullCharacters
Ignore null-chars when using structTree-data in the viewer
2023-08-31 18:09:04 +02:00
Jonas Jenwald
b159cc9e4b
Merge pull request #16888 from stof/fix_jsdoc_types
Fix JSDoc types
2023-08-31 16:36:09 +02:00
Jonas Jenwald
284f32f50b Ignore null-chars when using structTree-data in the viewer
Testing the `tagged_stamp.pdf` document locally in the viewer, I noticed that e.g. the /Alt entry for the StampAnnotation contains "Secondary text for stamp\u0000".
Elsewhere in the viewer we're skipping null-chars and it's easy enough to do that in the `StructTreeLayerBuilder` class as well. (Note that we generally let the API itself return the data as-is.)
2023-08-31 16:29:10 +02:00
calixteman
14b2a31e78
Merge pull request #16889 from calixteman/fix_aria_controls_id
Fix the id used in aria-controls used to make a relationship between the popup and its parent
2023-08-31 16:06:11 +02:00
Calixte Denizet
e7229854bd Fix the id used in aria-controls used to make a relationship between the popup and its parent 2023-08-31 15:48:32 +02:00
calixteman
20b0be973c
Merge pull request #16886 from calixteman/struct_tree_annotation
Add tagged annotations in the structure tree (bug 1850797)
2023-08-31 14:05:55 +02:00
Christophe Coevoet
f84f2646f4 Fix JSDoc types
This fixes invalid type references (either due to invalid paths for the
import or missing imports) in the JS doc, as well as some missing or
invalid parameter names for @param annotations.
2023-08-31 13:09:52 +02:00
Calixte Denizet
d185db2b70 Add tagged annotations in the structure tree (bug 1850797) 2023-08-31 12:35:32 +02:00
Jonas Jenwald
1b8441dacc Don't pass in unused pageColors to CanvasGraphics.endDrawing (PR 16380 follow-up)
This became unnecessary in PR 16380, however we forgot to update one of the API call-sites.
2023-08-28 16:14:22 +02:00
Jonas Jenwald
9b4efe2c2f Use WeakSet.prototype.delete() unconditionally in the InternalRenderTask class
It's not necessary to check if an object exists before trying remove it from a `WeakSet`; see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet/delete#return_value
2023-08-28 16:10:33 +02:00
Tim van der Meij
92f7653cfb
Merge pull request #16876 from timvandermeij/bump
Bump versions in `pdfjs.config`
2023-08-27 18:09:29 +02:00
Tim van der Meij
fd32a53a86
Bump versions in pdfjs.config 2023-08-27 18:04:05 +02:00
556 changed files with 69340 additions and 50586 deletions

View File

@ -3,12 +3,10 @@ l10n/
docs/
node_modules/
external/bcmaps/
external/webL10n/
external/builder/fixtures/
external/builder/fixtures_esprima/
external/quickjs/
src/shared/cffStandardStrings.js
src/shared/fonts_utils.js
test/tmp/
test/pdfs/
web/locale/
*~/

View File

@ -22,12 +22,11 @@
"browser": true,
"es2022": true,
"worker": true,
"amd": true,
},
"globals": {
"PDFJSDev": false,
"exports": false,
"PDFJSDev": "readonly",
"__non_webpack_import__": "readonly",
},
"rules": {
@ -39,10 +38,11 @@
"import/named": "error",
"import/no-cycle": "error",
"import/no-empty-named-blocks": "error",
"import/no-commonjs": "error",
"import/no-mutable-exports": "error",
"import/no-self-import": "error",
"import/no-unresolved": ["error", {
"ignore": ["display", "pdfjs", "pdfjs-lib", "pdfjs-web", "web"]
"ignore": ["display", "pdfjs", "pdfjs-lib", "pdfjs-web", "web", "fluent-bundle", "fluent-dom"],
}],
"mozilla/avoid-removeChild": "error",
"mozilla/use-includes-instead-of-indexOf": "error",
@ -142,9 +142,10 @@
"no-lone-blocks": "error",
"no-lonely-if": "error",
"no-multi-str": "error",
"no-new-func": "error",
"no-new-wrappers": "error",
"no-new": "error",
"no-new-func": "error",
"no-new-symbol": "error",
"no-new-wrappers": "error",
"no-octal-escape": "error",
"no-octal": "error",
"no-redeclare": "error",
@ -242,9 +243,9 @@
}],
// ECMAScript 6
"arrow-body-style": ["error", "as-needed"],
"constructor-super": "error",
"no-class-assign": "error",
"no-confusing-arrow": "error",
"no-const-assign": "error",
"no-dupe-class-members": "error",
"no-duplicate-imports": "error",
@ -257,6 +258,7 @@
"avoidQuotes": true,
}],
"prefer-const": "error",
"require-yield": "error",
"sort-imports": ["error", {
"ignoreCase": true,
}],

6
.git-blame-ignore-revs Normal file
View File

@ -0,0 +1,6 @@
# Auto-format `.js` files with ESLint/Prettier
de36b2aabab2b7fd647d9591f959c4540129541d
# Auto-format `.css` files with Stylelint/Prettier
8aa2718d225ad701a5b8a2788b42d221f1e4327d
# Auto-format `.json` files with Prettier
29de9bdce6c9785574994fda0e51533d796a9bb4

2
.gitattributes vendored
View File

@ -4,7 +4,7 @@
*.css text eol=lf
*.html text eol=lf
*.md text eol=lf
*.properties text eol=lf
*.ftl text eol=lf
*.yml text eol=lf
*.json text eol=lf
*.config text eol=lf

2
.github/CODEOWNERS vendored
View File

@ -1 +1 @@
l10n/en-US/*.properties @mozilla/pdfjs-l10n
l10n/en-US/*.ftl @mozilla/pdfjs-l10n

27
.github/fluent_linter_config.yml vendored Normal file
View File

@ -0,0 +1,27 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
# See https://github.com/mozilla-l10n/moz-fluent-linter/blob/main/src/fluent_linter/config.yml
# for details
---
ID01:
enabled: true
exclusions:
messages: []
files: []
ID02:
enabled: true
min_length: 9
exclusions:
messages: []
files: []
CO01:
enabled: true
brands:
- Firefox
- Mozilla
exclusions:
files: []
messages: []

1
.github/requirements.txt vendored Normal file
View File

@ -0,0 +1 @@
moz-fluent-linter==0.4.*

View File

@ -8,16 +8,21 @@ jobs:
name: Test
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: [18, lts/*, latest]
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Use Node.js 18 LTS
uses: actions/setup-node@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: '18'
node-version: ${{ matrix.node-version }}
- name: Install Gulp
run: npm install -g gulp-cli
@ -25,5 +30,8 @@ jobs:
- name: Install other dependencies
run: npm install
- name: Run tests
run: gulp ci-test
- name: Run external tests
run: gulp externaltest
- name: Run CLI unit tests
run: gulp unittestcli

View File

@ -18,18 +18,18 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
queries: security-and-quality
- name: Autobuild CodeQL
uses: github/codeql-action/autobuild@v2
uses: github/codeql-action/autobuild@v3
- name: Perform CodeQL analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3

42
.github/workflows/fluent_linter.yml vendored Normal file
View File

@ -0,0 +1,42 @@
name: Lint Fluent Reference Files
on:
push:
paths:
- 'l10n/en-US/**.ftl'
- '.github/fluent_linter_config.yml'
- '.github/workflows/fluent_linter.yml'
branches:
- master
pull_request:
paths:
- 'l10n/en-US/**.ftl'
- '.github/fluent_linter_config.yml'
- '.github/workflows/fluent_linter.yml'
branches:
- master
workflow_dispatch:
permissions:
contents: read
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Use Python 3.12
uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: 'pip'
- name: Install Fluent dependencies
run: |
pip install -r .github/requirements.txt
- name: Lint Fluent reference files
run: |
moz-fluent-lint ./l10n/en-US --config .github/fluent_linter_config.yml

64
.github/workflows/font_tests.yml vendored Normal file
View File

@ -0,0 +1,64 @@
name: Font tests
on:
push:
paths:
- 'gulpfile.mjs'
- 'src/**'
- 'test/test.mjs'
- 'test/font/**'
- '.github/workflows/font_tests.yml'
branches:
- master
pull_request:
paths:
- 'gulpfile.mjs'
- 'src/**'
- 'test/test.mjs'
- 'test/font/**'
- '.github/workflows/font_tests.yml'
branches:
- master
workflow_dispatch:
permissions:
contents: read
jobs:
test:
name: Test
strategy:
fail-fast: false
matrix:
node-version: [lts/*]
os: [windows-latest, ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install Gulp
run: npm install -g gulp-cli
- name: Install other dependencies
run: npm install
- name: Use Python 3.12
uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: 'pip'
- name: Install Fonttools
run: pip install fonttools
- name: Run font tests
run: gulp fonttest --headless

37
.github/workflows/lint.yml vendored Normal file
View File

@ -0,0 +1,37 @@
name: Lint
on: [push, pull_request]
permissions:
contents: read
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: [lts/*]
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install Gulp
run: npm install -g gulp-cli
- name: Install other dependencies
run: npm install
- name: Run lint
run: gulp lint
- name: Run lint-chromium
run: gulp lint-chromium

View File

@ -11,16 +11,20 @@ jobs:
name: Build
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [lts/*]
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Use Node.js 18 LTS
uses: actions/setup-node@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: '18'
node-version: ${{ matrix.node-version }}
- name: Install Gulp
run: npm install -g gulp-cli
@ -48,7 +52,7 @@ jobs:
INPUT_PATH: build/gh-pages
- name: Upload the website
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: github-pages
path: ${{ runner.temp }}/website.tar
@ -65,4 +69,4 @@ jobs:
steps:
- name: Deploy the website
uses: actions/deploy-pages@v2
uses: actions/deploy-pages@v4

34
.github/workflows/types_tests.yml vendored Normal file
View File

@ -0,0 +1,34 @@
name: Types tests
on: [push, pull_request]
permissions:
contents: read
jobs:
test:
name: Test
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: [lts/*]
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install Gulp
run: npm install -g gulp-cli
- name: Install other dependencies
run: npm install
- name: Run types tests
run: gulp typestest

3
.gitmodules vendored
View File

@ -1,3 +0,0 @@
[submodule "test/ttx/fonttools-code"]
path = test/ttx/fonttools-code
url = https://github.com/behdad/fonttools.git

12
.prettierignore Normal file
View File

@ -0,0 +1,12 @@
build/
l10n/
docs/
node_modules/
external/bcmaps/
external/builder/fixtures/
external/builder/fixtures_esprima/
external/quickjs/
test/tmp/
test/pdfs/
web/locale/
*~/

View File

@ -5,5 +5,14 @@
"semi": true,
"tabWidth": 2,
"trailingComma": "es5",
"useTabs": false
"useTabs": false,
"overrides": [
{
files: ["tsconfig.json"],
options: {
parser: "json",
},
},
]
}

View File

@ -3,12 +3,10 @@ l10n/
docs/
node_modules/
external/bcmaps/
external/webL10n/
external/builder/fixtures/
external/builder/fixtures_esprima/
external/quickjs/
src/shared/cffStandardStrings.js
src/shared/fonts_utils.js
test/tmp/
test/pdfs/
web/locale/
*~/

View File

@ -6,7 +6,12 @@
"rules": {
"prettier/prettier": true,
"alpha-value-notation": "number",
"block-no-empty": true,
"color-function-notation": "modern",
"color-hex-length": "short",
"color-no-invalid-hex": true,
"declaration-block-no-duplicate-properties": true,
"declaration-block-no-redundant-longhand-properties": true,
"declaration-property-value-disallowed-list": {
"float": ["inline-start", "inline-end"]

View File

@ -55,12 +55,17 @@ Next, install Node.js via the [official package](https://nodejs.org) or via
[nvm](https://github.com/creationix/nvm). You need to install the gulp package
globally (see also [gulp's getting started](https://github.com/gulpjs/gulp/tree/master/docs/getting-started)):
$ npm install -g gulp-cli
$ npm install -g gulp-cli@^2.3.0
If you prefer to not install `gulp-cli` globally, you have to prefix all the `gulp` commands with `npx` (for example, `npx gulp server` instead of `gulp server`).
If everything worked out, install all dependencies for PDF.js:
$ npm install
> [!NOTE]
> On MacOS M1/M2 you may see some `node-gyp`-related errors when running `npm install`. This is because one of our dependencies, `"canvas"`, does not provide pre-built binaries for this platform and instead `npm` will try to build it from source. Please make sure to first install the necessary native dependencies using `brew`: https://github.com/Automattic/node-canvas#compiling.
Finally, you need to start a local web server as some browsers do not allow opening
PDF files using a `file://` URL. Run:

View File

@ -83,17 +83,17 @@ var scaledViewport = page.getViewport({ scale: scale, });
The example demonstrates how promises can be used to handle errors during loading.
It also demonstrates how to wait until a page is loaded and rendered.
<script async src="//jsfiddle.net/pdfjs/9engc9mw/embed/js,html,css,result/"></script>
<script async src="//jsfiddle.net/pdfjs/9engc9mw/embed/html,css,result/"></script>
### Hello World using base64 encoded PDF
The PDF.js can accept any decoded base64 data as an array.
<script async src="//jsfiddle.net/pdfjs/cq0asLqz/embed/js,html,css,result/"></script>
<script async src="//jsfiddle.net/pdfjs/cq0asLqz/embed/html,css,result/"></script>
### Previous/Next example
The same canvas cannot be used to perform to draw two pages at the same time --
the example demonstrates how to wait on previous operation to be complete.
<script async src="//jsfiddle.net/pdfjs/wagvs9Lf/embed/js,html,css,result/"></script>
<script async src="//jsfiddle.net/pdfjs/wagvs9Lf/embed/html,css,result/"></script>

View File

@ -31,13 +31,13 @@ limitations under the License.
<link rel="stylesheet" href="../../node_modules/pdfjs-dist/web/pdf_viewer.css">
<script src="../../node_modules/pdfjs-dist/build/pdf.js"></script>
<script src="../../node_modules/pdfjs-dist/web/pdf_viewer.js"></script>
<script src="../../node_modules/pdfjs-dist/build/pdf.mjs" type="module"></script>
<script src="../../node_modules/pdfjs-dist/web/pdf_viewer.mjs" type="module"></script>
</head>
<body tabindex="1">
<div id="pageContainer" class="pdfViewer singlePageView"></div>
<script src="pageviewer.js"></script>
<script src="pageviewer.mjs" type="module"></script>
</body>
</html>

View File

@ -13,8 +13,6 @@
* limitations under the License.
*/
"use strict";
if (!pdfjsLib.getDocument || !pdfjsViewer.PDFPageView) {
// eslint-disable-next-line no-alert
alert("Please build the pdfjs-dist library using\n `gulp dist-install`");
@ -23,7 +21,7 @@ if (!pdfjsLib.getDocument || !pdfjsViewer.PDFPageView) {
// The workerSrc property shall be specified.
//
pdfjsLib.GlobalWorkerOptions.workerSrc =
"../../node_modules/pdfjs-dist/build/pdf.worker.js";
"../../node_modules/pdfjs-dist/build/pdf.worker.mjs";
// Some PDFs need external cmaps.
//
@ -47,20 +45,19 @@ const loadingTask = pdfjsLib.getDocument({
cMapPacked: CMAP_PACKED,
enableXfa: ENABLE_XFA,
});
(async function () {
const pdfDocument = await loadingTask.promise;
// Document loaded, retrieving the page.
const pdfPage = await pdfDocument.getPage(PAGE_TO_VIEW);
// Creating the page view with default parameters.
const pdfPageView = new pdfjsViewer.PDFPageView({
container,
id: PAGE_TO_VIEW,
scale: SCALE,
defaultViewport: pdfPage.getViewport({ scale: SCALE }),
eventBus,
});
// Associate the actual page with the view, and draw it.
pdfPageView.setPdfPage(pdfPage);
return pdfPageView.draw();
})();
const pdfDocument = await loadingTask.promise;
// Document loaded, retrieving the page.
const pdfPage = await pdfDocument.getPage(PAGE_TO_VIEW);
// Creating the page view with default parameters.
const pdfPageView = new pdfjsViewer.PDFPageView({
container,
id: PAGE_TO_VIEW,
scale: SCALE,
defaultViewport: pdfPage.getViewport({ scale: SCALE }),
eventBus,
});
// Associate the actual page with the view, and draw it.
pdfPageView.setPdfPage(pdfPage);
pdfPageView.draw();

View File

@ -37,8 +37,8 @@ limitations under the License.
<link rel="stylesheet" href="../../node_modules/pdfjs-dist/web/pdf_viewer.css">
<script src="../../node_modules/pdfjs-dist/build/pdf.js"></script>
<script src="../../node_modules/pdfjs-dist/web/pdf_viewer.js"></script>
<script src="../../node_modules/pdfjs-dist/build/pdf.mjs" type="module"></script>
<script src="../../node_modules/pdfjs-dist/web/pdf_viewer.mjs" type="module"></script>
</head>
<body tabindex="1">
@ -46,6 +46,6 @@ limitations under the License.
<div id="viewer" class="pdfViewer"></div>
</div>
<script src="simpleviewer.js"></script>
<script src="simpleviewer.mjs" type="module"></script>
</body>
</html>

View File

@ -13,8 +13,6 @@
* limitations under the License.
*/
"use strict";
if (!pdfjsLib.getDocument || !pdfjsViewer.PDFViewer) {
// eslint-disable-next-line no-alert
alert("Please build the pdfjs-dist library using\n `gulp dist-install`");
@ -23,7 +21,7 @@ if (!pdfjsLib.getDocument || !pdfjsViewer.PDFViewer) {
// The workerSrc property shall be specified.
//
pdfjsLib.GlobalWorkerOptions.workerSrc =
"../../node_modules/pdfjs-dist/build/pdf.worker.js";
"../../node_modules/pdfjs-dist/build/pdf.worker.mjs";
// Some PDFs need external cmaps.
//
@ -37,7 +35,10 @@ const DEFAULT_URL = "../../web/compressed.tracemonkey-pldi-09.pdf";
const ENABLE_XFA = true;
const SEARCH_FOR = ""; // try "Mozilla";
const SANDBOX_BUNDLE_SRC = "../../node_modules/pdfjs-dist/build/pdf.sandbox.js";
const SANDBOX_BUNDLE_SRC = new URL(
"../../node_modules/pdfjs-dist/build/pdf.sandbox.mjs",
window.location
);
const container = document.getElementById("viewerContainer");
@ -87,11 +88,10 @@ const loadingTask = pdfjsLib.getDocument({
cMapPacked: CMAP_PACKED,
enableXfa: ENABLE_XFA,
});
(async function () {
const pdfDocument = await loadingTask.promise;
// Document loaded, specifying document for the viewer and
// the (optional) linkService.
pdfViewer.setDocument(pdfDocument);
pdfLinkService.setDocument(pdfDocument, null);
})();
const pdfDocument = await loadingTask.promise;
// Document loaded, specifying document for the viewer and
// the (optional) linkService.
pdfViewer.setDocument(pdfDocument);
pdfLinkService.setDocument(pdfDocument, null);

View File

@ -37,8 +37,8 @@ limitations under the License.
<link rel="stylesheet" href="../../node_modules/pdfjs-dist/web/pdf_viewer.css">
<script src="../../node_modules/pdfjs-dist/build/pdf.js"></script>
<script src="../../node_modules/pdfjs-dist/web/pdf_viewer.js"></script>
<script src="../../node_modules/pdfjs-dist/build/pdf.mjs" type="module"></script>
<script src="../../node_modules/pdfjs-dist/web/pdf_viewer.mjs" type="module"></script>
</head>
<body tabindex="1">
@ -46,6 +46,6 @@ limitations under the License.
<div id="viewer" class="pdfViewer"></div>
</div>
<script src="singlepageviewer.js"></script>
<script src="singlepageviewer.mjs" type="module"></script>
</body>
</html>

View File

@ -13,8 +13,6 @@
* limitations under the License.
*/
"use strict";
if (!pdfjsLib.getDocument || !pdfjsViewer.PDFSinglePageViewer) {
// eslint-disable-next-line no-alert
alert("Please build the pdfjs-dist library using\n `gulp dist-install`");
@ -23,7 +21,7 @@ if (!pdfjsLib.getDocument || !pdfjsViewer.PDFSinglePageViewer) {
// The workerSrc property shall be specified.
//
pdfjsLib.GlobalWorkerOptions.workerSrc =
"../../node_modules/pdfjs-dist/build/pdf.worker.js";
"../../node_modules/pdfjs-dist/build/pdf.worker.mjs";
// Some PDFs need external cmaps.
//
@ -37,7 +35,10 @@ const DEFAULT_URL = "../../web/compressed.tracemonkey-pldi-09.pdf";
const ENABLE_XFA = true;
const SEARCH_FOR = ""; // try "Mozilla";
const SANDBOX_BUNDLE_SRC = "../../node_modules/pdfjs-dist/build/pdf.sandbox.js";
const SANDBOX_BUNDLE_SRC = new URL(
"../../node_modules/pdfjs-dist/build/pdf.sandbox.mjs",
window.location
);
const container = document.getElementById("viewerContainer");
@ -87,10 +88,10 @@ const loadingTask = pdfjsLib.getDocument({
cMapPacked: CMAP_PACKED,
enableXfa: ENABLE_XFA,
});
loadingTask.promise.then(function (pdfDocument) {
// Document loaded, specifying document for the viewer and
// the (optional) linkService.
pdfSinglePageViewer.setDocument(pdfDocument);
pdfLinkService.setDocument(pdfDocument, null);
});
const pdfDocument = await loadingTask.promise;
// Document loaded, specifying document for the viewer and
// the (optional) linkService.
pdfSinglePageViewer.setDocument(pdfDocument);
pdfLinkService.setDocument(pdfDocument, null);

View File

@ -29,12 +29,12 @@ limitations under the License.
}
</style>
<script src="../../node_modules/pdfjs-dist/image_decoders/pdf.image_decoders.js"></script>
<script src="../../node_modules/pdfjs-dist/image_decoders/pdf.image_decoders.mjs" type="module"></script>
</head>
<body tabindex="1">
<canvas id="jpegCanvas" width="0" height="0"></canvas>
<script src="jpeg_viewer.js"></script>
<script src="jpeg_viewer.mjs" type="module"></script>
</body>
</html>

View File

@ -1,63 +0,0 @@
/* Copyright 2018 Mozilla Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
"use strict";
if (!pdfjsImageDecoders.JpegImage) {
// eslint-disable-next-line no-alert
alert("Please build the pdfjs-dist library using `gulp dist-install`");
}
const JPEG_IMAGE = "fish.jpg";
const jpegCanvas = document.getElementById("jpegCanvas");
const jpegCtx = jpegCanvas.getContext("2d");
(async function () {
// Load the image data, and convert it to a Uint8Array.
//
const response = await fetch(JPEG_IMAGE);
if (!response.ok) {
throw new Error(response.statusText);
}
const typedArrayImage = new Uint8Array(await response.arrayBuffer());
// Parse the image data using `JpegImage`.
//
const jpegImage = new pdfjsImageDecoders.JpegImage();
jpegImage.parse(typedArrayImage);
const width = jpegImage.width,
height = jpegImage.height;
const jpegData = jpegImage.getData({
width,
height,
forceRGB: true,
});
// Render the JPEG image on a <canvas>.
//
const imageData = jpegCtx.createImageData(width, height);
const imageBytes = imageData.data;
for (let j = 0, k = 0, jj = width * height * 4; j < jj; ) {
imageBytes[j++] = jpegData[k++];
imageBytes[j++] = jpegData[k++];
imageBytes[j++] = jpegData[k++];
imageBytes[j++] = 255;
}
jpegCanvas.width = width;
jpegCanvas.height = height;
jpegCtx.putImageData(imageData, 0, 0);
})();

View File

@ -0,0 +1,59 @@
/* Copyright 2018 Mozilla Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
if (!pdfjsImageDecoders.JpegImage) {
// eslint-disable-next-line no-alert
alert("Please build the pdfjs-dist library using `gulp dist-install`");
}
const JPEG_IMAGE = "fish.jpg";
const jpegCanvas = document.getElementById("jpegCanvas");
const jpegCtx = jpegCanvas.getContext("2d");
// Load the image data, and convert it to a Uint8Array.
//
const response = await fetch(JPEG_IMAGE);
if (!response.ok) {
throw new Error(response.statusText);
}
const typedArrayImage = new Uint8Array(await response.arrayBuffer());
// Parse the image data using `JpegImage`.
//
const jpegImage = new pdfjsImageDecoders.JpegImage();
jpegImage.parse(typedArrayImage);
const width = jpegImage.width,
height = jpegImage.height;
const jpegData = jpegImage.getData({
width,
height,
forceRGB: true,
});
// Render the JPEG image on a <canvas>.
//
const imageData = jpegCtx.createImageData(width, height);
const imageBytes = imageData.data;
for (let j = 0, k = 0, jj = width * height * 4; j < jj; ) {
imageBytes[j++] = jpegData[k++];
imageBytes[j++] = jpegData[k++];
imageBytes[j++] = jpegData[k++];
imageBytes[j++] = 255;
}
jpegCanvas.width = width;
jpegCanvas.height = height;
jpegCtx.putImageData(imageData, 0, 0);

View File

@ -10,9 +10,9 @@
<canvas id="the-canvas" style="border: 1px solid black; direction: ltr;"></canvas>
<script src="../../node_modules/pdfjs-dist/build/pdf.js"></script>
<script src="../../node_modules/pdfjs-dist/build/pdf.mjs" type="module"></script>
<script id="script">
<script id="script" type="module">
//
// If absolute URL from the remote server is provided, configure the CORS
// header on that server.
@ -23,48 +23,46 @@
// The workerSrc property shall be specified.
//
pdfjsLib.GlobalWorkerOptions.workerSrc =
'../../node_modules/pdfjs-dist/build/pdf.worker.js';
'../../node_modules/pdfjs-dist/build/pdf.worker.mjs';
//
// Asynchronous download PDF
//
const loadingTask = pdfjsLib.getDocument(url);
(async () => {
const pdf = await loadingTask.promise;
//
// Fetch the first page
//
const page = await pdf.getPage(1);
const scale = 1.5;
const viewport = page.getViewport({ scale });
// Support HiDPI-screens.
const outputScale = window.devicePixelRatio || 1;
const pdf = await loadingTask.promise;
//
// Fetch the first page
//
const page = await pdf.getPage(1);
const scale = 1.5;
const viewport = page.getViewport({ scale });
// Support HiDPI-screens.
const outputScale = window.devicePixelRatio || 1;
//
// Prepare canvas using PDF page dimensions
//
const canvas = document.getElementById("the-canvas");
const context = canvas.getContext("2d");
//
// Prepare canvas using PDF page dimensions
//
const canvas = document.getElementById("the-canvas");
const context = canvas.getContext("2d");
canvas.width = Math.floor(viewport.width * outputScale);
canvas.height = Math.floor(viewport.height * outputScale);
canvas.style.width = Math.floor(viewport.width) + "px";
canvas.style.height = Math.floor(viewport.height) + "px";
canvas.width = Math.floor(viewport.width * outputScale);
canvas.height = Math.floor(viewport.height * outputScale);
canvas.style.width = Math.floor(viewport.width) + "px";
canvas.style.height = Math.floor(viewport.height) + "px";
const transform = outputScale !== 1
? [outputScale, 0, 0, outputScale, 0, 0]
: null;
const transform = outputScale !== 1
? [outputScale, 0, 0, outputScale, 0, 0]
: null;
//
// Render PDF page into canvas context
//
const renderContext = {
canvasContext: context,
transform,
viewport,
};
page.render(renderContext);
})();
//
// Render PDF page into canvas context
//
const renderContext = {
canvasContext: context,
transform,
viewport,
};
page.render(renderContext);
</script>
<hr>

View File

@ -10,9 +10,9 @@
<canvas id="the-canvas" style="border: 1px solid black; direction: ltr;"></canvas>
<script src="../../node_modules/pdfjs-dist/build/pdf.js"></script>
<script src="../../node_modules/pdfjs-dist/build/pdf.mjs" type="module"></script>
<script id="script">
<script id="script" type="module">
// atob() is used to convert base64 encoded PDF to binary-like data.
// (See also https://developer.mozilla.org/en-US/docs/Web/API/WindowBase64/
// Base64_encoding_and_decoding.)
@ -35,41 +35,39 @@
// The workerSrc property shall be specified.
//
pdfjsLib.GlobalWorkerOptions.workerSrc =
'../../node_modules/pdfjs-dist/build/pdf.worker.js';
'../../node_modules/pdfjs-dist/build/pdf.worker.mjs';
// Opening PDF by passing its binary data as a string. It is still preferable
// to use Uint8Array, but string or array-like structure will work too.
var loadingTask = pdfjsLib.getDocument({ data: pdfData, });
(async function() {
var pdf = await loadingTask.promise;
// Fetch the first page.
var page = await pdf.getPage(1);
var scale = 1.5;
var viewport = page.getViewport({ scale: scale, });
// Support HiDPI-screens.
var outputScale = window.devicePixelRatio || 1;
var pdf = await loadingTask.promise;
// Fetch the first page.
var page = await pdf.getPage(1);
var scale = 1.5;
var viewport = page.getViewport({ scale: scale, });
// Support HiDPI-screens.
var outputScale = window.devicePixelRatio || 1;
// Prepare canvas using PDF page dimensions.
var canvas = document.getElementById('the-canvas');
var context = canvas.getContext('2d');
// Prepare canvas using PDF page dimensions.
var canvas = document.getElementById('the-canvas');
var context = canvas.getContext('2d');
canvas.width = Math.floor(viewport.width * outputScale);
canvas.height = Math.floor(viewport.height * outputScale);
canvas.style.width = Math.floor(viewport.width) + "px";
canvas.style.height = Math.floor(viewport.height) + "px";
canvas.width = Math.floor(viewport.width * outputScale);
canvas.height = Math.floor(viewport.height * outputScale);
canvas.style.width = Math.floor(viewport.width) + "px";
canvas.style.height = Math.floor(viewport.height) + "px";
var transform = outputScale !== 1
? [outputScale, 0, 0, outputScale, 0, 0]
: null;
var transform = outputScale !== 1
? [outputScale, 0, 0, outputScale, 0, 0]
: null;
// Render PDF page into canvas context.
var renderContext = {
canvasContext: context,
transform,
viewport,
};
page.render(renderContext);
})();
// Render PDF page into canvas context.
var renderContext = {
canvasContext: context,
transform,
viewport,
};
page.render(renderContext);
</script>
<hr>

View File

@ -19,9 +19,9 @@
<canvas id="the-canvas" style="border: 1px solid black; direction: ltr;"></canvas>
</div>
<script src="../../node_modules/pdfjs-dist/build/pdf.js"></script>
<script src="../../node_modules/pdfjs-dist/build/pdf.mjs" type="module"></script>
<script id="script">
<script id="script" type="module">
//
// If absolute URL from the remote server is provided, configure the CORS
// header on that server.
@ -34,7 +34,7 @@
// shall be specified.
//
pdfjsLib.GlobalWorkerOptions.workerSrc =
'../../node_modules/pdfjs-dist/build/pdf.worker.js';
'../../node_modules/pdfjs-dist/build/pdf.worker.mjs';
var pdfDoc = null,
pageNum = 1,
@ -128,13 +128,11 @@
* Asynchronously downloads PDF.
*/
var loadingTask = pdfjsLib.getDocument(url);
loadingTask.promise.then(function(pdfDoc_) {
pdfDoc = pdfDoc_;
document.getElementById('page_count').textContent = pdfDoc.numPages;
pdfDoc = await loadingTask.promise;
document.getElementById('page_count').textContent = pdfDoc.numPages;
// Initial/first page rendering
renderPage(pageNum);
});
// Initial/first page rendering
renderPage(pageNum);
</script>
</body>

View File

@ -26,12 +26,12 @@ html {
}
header {
background-color: rgba(244, 244, 244, 1);
background-color: rgb(244 244 244 / 1);
}
header h1 {
border-bottom: 1px solid rgba(216, 216, 216, 1);
color: rgba(133, 133, 133, 1);
border-bottom: 1px solid rgb(216 216 216 / 1);
color: rgb(133 133 133 / 1);
font-size: 23px;
font-style: italic;
font-weight: normal;
@ -44,7 +44,7 @@ header h1 {
body {
background: url(images/document_bg.png);
color: rgba(255, 255, 255, 1);
color: rgb(255 255 255 / 1);
font-family: sans-serif;
font-size: 10px;
height: 100%;
@ -71,7 +71,7 @@ footer {
left: 0;
right: 0;
z-index: 1;
box-shadow: 0 -0.2rem 0.5rem rgba(50, 50, 50, 0.75);
box-shadow: 0 -0.2rem 0.5rem rgb(50 50 50 / 0.75);
}
.toolbarButton {
@ -81,7 +81,7 @@ footer {
border-width: 0;
background-position: center center;
background-repeat: no-repeat;
background-color: rgba(0, 0, 0, 0);
background-color: rgb(0 0 0 / 0);
}
.toolbarButton.pageUp {
@ -110,9 +110,9 @@ footer {
left: 36%;
text-align: center;
border: 0;
background-color: rgba(0, 0, 0, 0);
background-color: rgb(0 0 0 / 0);
font-size: 1.2rem;
color: rgba(255, 255, 255, 1);
color: rgb(255 255 255 / 1);
background-image: url(images/div_line_left.png),
url(images/div_line_right.png);
background-repeat: no-repeat;
@ -190,8 +190,8 @@ canvas {
position: relative;
height: 0.6rem;
background-color: rgba(51, 51, 51, 1);
border-bottom: 1px solid rgba(51, 51, 51, 1);
background-color: rgb(51 51 51 / 1);
border-bottom: 1px solid rgb(51 51 51 / 1);
}
#loadingBar .progress {
@ -201,7 +201,7 @@ canvas {
transform: scaleX(var(--progressBar-percent));
transform-origin: 0 0;
height: 100%;
background-color: rgba(221, 221, 221, 1);
background-color: rgb(221 221 221 / 1);
overflow: hidden;
transition: transform 200ms;
}
@ -220,7 +220,7 @@ canvas {
#loadingBar.indeterminate .progress {
transform: none;
background-color: rgba(153, 153, 153, 1);
background-color: rgb(153 153 153 / 1);
transition: none;
}
@ -232,39 +232,11 @@ canvas {
width: 5rem;
background-image: linear-gradient(
to right,
rgba(153, 153, 153, 1) 0%,
rgba(255, 255, 255, 1) 50%,
rgba(153, 153, 153, 1) 100%
rgb(153 153 153 / 1) 0%,
rgb(255 255 255 / 1) 50%,
rgb(153 153 153 / 1) 100%
);
background-size: 100% 100%;
background-repeat: no-repeat;
animation: progressIndeterminate 2s linear infinite;
}
#errorWrapper {
background: none repeat scroll 0 0 rgba(255, 85, 85, 1);
color: rgba(255, 255, 255, 1);
left: 0;
position: absolute;
right: 0;
top: 3.2rem;
z-index: 1000;
padding: 0.3rem;
font-size: 0.8em;
}
#errorMessageLeft {
float: left;
}
#errorMessageRight {
float: right;
}
#errorMoreInfo {
background-color: rgba(255, 255, 255, 1);
color: rgba(0, 0, 0, 1);
padding: 0.3rem;
margin: 0.3rem;
width: 98%;
}

View File

@ -24,8 +24,8 @@ limitations under the License.
<link rel="stylesheet" href="../../node_modules/pdfjs-dist/web/pdf_viewer.css">
<link rel="stylesheet" type="text/css" href="viewer.css">
<script src="../../node_modules/pdfjs-dist/build/pdf.js"></script>
<script src="../../node_modules/pdfjs-dist/web/pdf_viewer.js"></script>
<script src="../../node_modules/pdfjs-dist/build/pdf.mjs" type="module"></script>
<script src="../../node_modules/pdfjs-dist/web/pdf_viewer.mjs" type="module"></script>
</head>
<body>
@ -42,25 +42,6 @@ limitations under the License.
<div class="glimmer"></div>
</div>
<div id="errorWrapper" hidden="true">
<div id="errorMessageLeft">
<span id="errorMessage"></span>
<button id="errorShowMore">
More Information
</button>
<button id="errorShowLess">
Less Information
</button>
</div>
<div id="errorMessageRight">
<button id="errorClose">
Close
</button>
</div>
<div class="clearBoth"></div>
<textarea id="errorMoreInfo" hidden="true" readonly="readonly"></textarea>
</div>
<footer>
<button class="toolbarButton pageUp" title="Previous Page" id="previous"></button>
<button class="toolbarButton pageDown" title="Next Page" id="next"></button>
@ -71,6 +52,6 @@ limitations under the License.
<button class="toolbarButton zoomIn" title="Zoom In" id="zoomIn"></button>
</footer>
<script src="viewer.js"></script>
<script src="viewer.mjs" type="module"></script>
</body>
</html>

View File

@ -13,8 +13,6 @@
* limitations under the License.
*/
"use strict";
if (!pdfjsLib.getDocument || !pdfjsViewer.PDFViewer) {
// eslint-disable-next-line no-alert
alert("Please build the pdfjs-dist library using\n `gulp dist-install`");
@ -27,7 +25,7 @@ const CMAP_URL = "../../node_modules/pdfjs-dist/cmaps/";
const CMAP_PACKED = true;
pdfjsLib.GlobalWorkerOptions.workerSrc =
"../../node_modules/pdfjs-dist/build/pdf.worker.js";
"../../node_modules/pdfjs-dist/build/pdf.worker.mjs";
const DEFAULT_URL = "../../web/compressed.tracemonkey-pldi-09.pdf";
const DEFAULT_SCALE_DELTA = 1.1;
@ -89,41 +87,17 @@ const PDFViewerApplication = {
self.loadingBar.hide();
self.setTitleUsingMetadata(pdfDocument);
},
function (exception) {
const message = exception && exception.message;
const l10n = self.l10n;
let loadingErrorMessage;
if (exception instanceof pdfjsLib.InvalidPDFException) {
// change error message also for other builds
loadingErrorMessage = l10n.get(
"invalid_file_error",
null,
"Invalid or corrupted PDF file."
);
} else if (exception instanceof pdfjsLib.MissingPDFException) {
// special message for missing PDFs
loadingErrorMessage = l10n.get(
"missing_file_error",
null,
"Missing PDF file."
);
} else if (exception instanceof pdfjsLib.UnexpectedResponseException) {
loadingErrorMessage = l10n.get(
"unexpected_response_error",
null,
"Unexpected server response."
);
} else {
loadingErrorMessage = l10n.get(
"loading_error",
null,
"An error occurred while loading the PDF."
);
function (reason) {
let key = "pdfjs-loading-error";
if (reason instanceof pdfjsLib.InvalidPDFException) {
key = "pdfjs-invalid-file-error";
} else if (reason instanceof pdfjsLib.MissingPDFException) {
key = "pdfjs-missing-file-error";
} else if (reason instanceof pdfjsLib.UnexpectedResponseException) {
key = "pdfjs-unexpected-response-error";
}
loadingErrorMessage.then(function (msg) {
self.error(msg, { message });
self.l10n.get(key).then(msg => {
self.error(msg, { message: reason?.message });
});
self.loadingBar.hide();
}
@ -136,9 +110,6 @@ const PDFViewerApplication = {
* destruction is completed.
*/
close() {
const errorWrapper = document.getElementById("errorWrapper");
errorWrapper.hidden = true;
if (!this.pdfLoadingTask) {
return Promise.resolve();
}
@ -231,79 +202,25 @@ const PDFViewerApplication = {
},
error: function pdfViewError(message, moreInfo) {
const l10n = this.l10n;
const moreInfoText = [
l10n.get(
"error_version_info",
{ version: pdfjsLib.version || "?", build: pdfjsLib.build || "?" },
"PDF.js v{{version}} (build: {{build}})"
),
`PDF.js v${pdfjsLib.version || "?"} (build: ${pdfjsLib.build || "?"})`,
];
if (moreInfo) {
moreInfoText.push(
l10n.get(
"error_message",
{ message: moreInfo.message },
"Message: {{message}}"
)
);
moreInfoText.push(`Message: ${moreInfo.message}`);
if (moreInfo.stack) {
moreInfoText.push(
l10n.get("error_stack", { stack: moreInfo.stack }, "Stack: {{stack}}")
);
moreInfoText.push(`Stack: ${moreInfo.stack}`);
} else {
if (moreInfo.filename) {
moreInfoText.push(
l10n.get(
"error_file",
{ file: moreInfo.filename },
"File: {{file}}"
)
);
moreInfoText.push(`File: ${moreInfo.filename}`);
}
if (moreInfo.lineNumber) {
moreInfoText.push(
l10n.get(
"error_line",
{ line: moreInfo.lineNumber },
"Line: {{line}}"
)
);
moreInfoText.push(`Line: ${moreInfo.lineNumber}`);
}
}
}
const errorWrapper = document.getElementById("errorWrapper");
errorWrapper.hidden = false;
const errorMessage = document.getElementById("errorMessage");
errorMessage.textContent = message;
const closeButton = document.getElementById("errorClose");
closeButton.onclick = function () {
errorWrapper.hidden = true;
};
const errorMoreInfo = document.getElementById("errorMoreInfo");
const moreInfoButton = document.getElementById("errorShowMore");
const lessInfoButton = document.getElementById("errorShowLess");
moreInfoButton.onclick = function () {
errorMoreInfo.hidden = false;
moreInfoButton.hidden = true;
lessInfoButton.hidden = false;
errorMoreInfo.style.height = errorMoreInfo.scrollHeight + "px";
};
lessInfoButton.onclick = function () {
errorMoreInfo.hidden = true;
moreInfoButton.hidden = false;
lessInfoButton.hidden = true;
};
moreInfoButton.hidden = false;
lessInfoButton.hidden = true;
Promise.all(moreInfoText).then(function (parts) {
errorMoreInfo.value = parts.join("\n");
});
console.error(`${message}\n\n${moreInfoText.join("\n")}`);
},
progress: function pdfViewProgress(level) {
@ -355,7 +272,7 @@ const PDFViewerApplication = {
});
this.pdfLinkService = linkService;
this.l10n = pdfjsViewer.NullL10n;
this.l10n = new pdfjsViewer.GenericL10n();
const container = document.getElementById("viewerContainer");
const pdfViewer = new pdfjsViewer.PDFViewer({

View File

@ -1,285 +0,0 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
function xmlEncode(s) {
let i = 0,
ch;
s = String(s);
while (
i < s.length &&
(ch = s[i]) !== "&" &&
ch !== "<" &&
ch !== '"' &&
ch !== "\n" &&
ch !== "\r" &&
ch !== "\t"
) {
i++;
}
if (i >= s.length) {
return s;
}
let buf = s.substring(0, i);
while (i < s.length) {
ch = s[i++];
switch (ch) {
case "&":
buf += "&amp;";
break;
case "<":
buf += "&lt;";
break;
case '"':
buf += "&quot;";
break;
case "\n":
buf += "&#xA;";
break;
case "\r":
buf += "&#xD;";
break;
case "\t":
buf += "&#x9;";
break;
default:
buf += ch;
break;
}
}
return buf;
}
function DOMElement(name) {
this.nodeName = name;
this.childNodes = [];
this.attributes = {};
this.textContent = "";
if (name === "style") {
this.sheet = {
cssRules: [],
insertRule(rule) {
this.cssRules.push(rule);
},
};
}
}
DOMElement.prototype = {
getAttribute: function DOMElement_getAttribute(name) {
if (name in this.attributes) {
return this.attributes[name];
}
return null;
},
getAttributeNS: function DOMElement_getAttributeNS(NS, name) {
// Fast path
if (name in this.attributes) {
return this.attributes[name];
}
// Slow path - used by test/unit/display_svg_spec.js
// Assuming that there is only one matching attribute for a given name,
// across all namespaces.
if (NS) {
const suffix = ":" + name;
for (const fullName in this.attributes) {
if (fullName.slice(-suffix.length) === suffix) {
return this.attributes[fullName];
}
}
}
return null;
},
setAttribute: function DOMElement_setAttribute(name, value) {
this.attributes[name] = value || "";
},
setAttributeNS: function DOMElement_setAttributeNS(NS, name, value) {
this.setAttribute(name, value);
},
append: function DOMElement_append(...elements) {
const childNodes = this.childNodes;
for (const element of elements) {
if (!childNodes.includes(element)) {
childNodes.push(element);
}
}
},
appendChild: function DOMElement_appendChild(element) {
const childNodes = this.childNodes;
if (!childNodes.includes(element)) {
childNodes.push(element);
}
},
hasChildNodes: function DOMElement_hasChildNodes() {
return this.childNodes.length !== 0;
},
cloneNode: function DOMElement_cloneNode() {
const newNode = new DOMElement(this.nodeName);
newNode.childNodes = this.childNodes;
newNode.attributes = this.attributes;
newNode.textContent = this.textContent;
return newNode;
},
// This method is offered for convenience. It is recommended to directly use
// getSerializer because that allows you to process the chunks as they come
// instead of requiring the whole image to fit in memory.
toString: function DOMElement_toString() {
const buf = [];
const serializer = this.getSerializer();
let chunk;
while ((chunk = serializer.getNext()) !== null) {
buf.push(chunk);
}
return buf.join("");
},
getSerializer: function DOMElement_getSerializer() {
return new DOMElementSerializer(this);
},
};
function DOMElementSerializer(node) {
this._node = node;
this._state = 0;
this._loopIndex = 0;
this._attributeKeys = null;
this._childSerializer = null;
}
DOMElementSerializer.prototype = {
/**
* Yields the next chunk in the serialization of the element.
*
* @returns {string|null} null if the element has fully been serialized.
*/
getNext: function DOMElementSerializer_getNext() {
const node = this._node;
switch (this._state) {
case 0: // Start opening tag.
++this._state;
return "<" + node.nodeName;
case 1: // Add SVG namespace if this is the root element.
++this._state;
if (node.nodeName === "svg:svg") {
return (
' xmlns:xlink="http://www.w3.org/1999/xlink"' +
' xmlns:svg="http://www.w3.org/2000/svg"'
);
}
/* falls through */
case 2: // Initialize variables for looping over attributes.
++this._state;
this._loopIndex = 0;
this._attributeKeys = Object.keys(node.attributes);
/* falls through */
case 3: // Serialize any attributes and end opening tag.
if (this._loopIndex < this._attributeKeys.length) {
const name = this._attributeKeys[this._loopIndex++];
return " " + name + '="' + xmlEncode(node.attributes[name]) + '"';
}
++this._state;
return ">";
case 4: // Serialize textContent for tspan/style elements.
if (node.nodeName === "svg:tspan" || node.nodeName === "svg:style") {
this._state = 6;
return xmlEncode(node.textContent);
}
++this._state;
this._loopIndex = 0;
/* falls through */
case 5: // Serialize child nodes (only for non-tspan/style elements).
while (true) {
const value =
this._childSerializer && this._childSerializer.getNext();
if (value !== null) {
return value;
}
const nextChild = node.childNodes[this._loopIndex++];
if (nextChild) {
this._childSerializer = new DOMElementSerializer(nextChild);
} else {
this._childSerializer = null;
++this._state;
break;
}
}
/* falls through */
case 6: // Ending tag.
++this._state;
return "</" + node.nodeName + ">";
case 7: // Done.
return null;
default:
throw new Error("Unexpected serialization state: " + this._state);
}
},
};
const document = {
childNodes: [],
get currentScript() {
return { src: "" };
},
get documentElement() {
return this;
},
createElementNS(NS, element) {
const elObject = new DOMElement(element);
return elObject;
},
createElement(element) {
return this.createElementNS("", element);
},
getElementsByTagName(element) {
if (element === "head") {
return [this.head || (this.head = new DOMElement("head"))];
}
return [];
},
};
function Image() {
this._src = null;
this.onload = null;
}
Image.prototype = {
get src() {
return this._src;
},
set src(value) {
this._src = value;
if (this.onload) {
this.onload();
}
},
};
exports.document = document;
exports.Image = Image;
const exported_symbols = Object.keys(exports);
exports.setStubs = function (namespace) {
exported_symbols.forEach(function (key) {
console.assert(!(key in namespace), "property should not be set: " + key);
namespace[key] = exports[key];
});
};
exports.unsetStubs = function (namespace) {
exported_symbols.forEach(function (key) {
console.assert(key in namespace, "property should be set: " + key);
delete namespace[key];
});
};

View File

@ -6,7 +6,7 @@
//
// Run `gulp dist-install` to generate 'pdfjs-dist' npm package files.
const pdfjsLib = require("pdfjs-dist/legacy/build/pdf.js");
import { getDocument } from "pdfjs-dist/legacy/build/pdf.mjs";
// Loading file from file system into typed array
const pdfPath =
@ -14,7 +14,7 @@ const pdfPath =
// Will be using promises to load document, pages and misc data instead of
// callback.
const loadingTask = pdfjsLib.getDocument(pdfPath);
const loadingTask = getDocument(pdfPath);
loadingTask.promise
.then(function (doc) {
const numPages = doc.numPages;

View File

@ -13,13 +13,13 @@
* limitations under the License.
*/
const Canvas = require("canvas");
const assert = require("assert").strict;
const fs = require("fs");
import { strict as assert } from "assert";
import Canvas from "canvas";
import fs from "fs";
import { getDocument } from "pdfjs-dist/legacy/build/pdf.mjs";
function NodeCanvasFactory() {}
NodeCanvasFactory.prototype = {
create: function NodeCanvasFactory_create(width, height) {
class NodeCanvasFactory {
create(width, height) {
assert(width > 0 && height > 0, "Invalid canvas size");
const canvas = Canvas.createCanvas(width, height);
const context = canvas.getContext("2d");
@ -27,16 +27,16 @@ NodeCanvasFactory.prototype = {
canvas,
context,
};
},
}
reset: function NodeCanvasFactory_reset(canvasAndContext, width, height) {
reset(canvasAndContext, width, height) {
assert(canvasAndContext.canvas, "Canvas is not specified");
assert(width > 0 && height > 0, "Invalid canvas size");
canvasAndContext.canvas.width = width;
canvasAndContext.canvas.height = height;
},
}
destroy: function NodeCanvasFactory_destroy(canvasAndContext) {
destroy(canvasAndContext) {
assert(canvasAndContext.canvas, "Canvas is not specified");
// Zeroing the width and height cause Firefox to release graphics
@ -45,10 +45,8 @@ NodeCanvasFactory.prototype = {
canvasAndContext.canvas.height = 0;
canvasAndContext.canvas = null;
canvasAndContext.context = null;
},
};
const pdfjsLib = require("pdfjs-dist/legacy/build/pdf.js");
}
}
// Some PDFs need external cmaps.
const CMAP_URL = "../../../node_modules/pdfjs-dist/cmaps/";
@ -66,7 +64,7 @@ const pdfPath =
const data = new Uint8Array(fs.readFileSync(pdfPath));
// Load the PDF file.
const loadingTask = pdfjsLib.getDocument({
const loadingTask = getDocument({
data,
cMapUrl: CMAP_URL,
cMapPacked: CMAP_PACKED,
@ -74,39 +72,35 @@ const loadingTask = pdfjsLib.getDocument({
canvasFactory,
});
(async function () {
try {
const pdfDocument = await loadingTask.promise;
console.log("# PDF document loaded.");
// Get the first page.
const page = await pdfDocument.getPage(1);
// Render the page on a Node canvas with 100% scale.
const viewport = page.getViewport({ scale: 1.0 });
const canvasAndContext = canvasFactory.create(
viewport.width,
viewport.height
);
const renderContext = {
canvasContext: canvasAndContext.context,
viewport,
};
try {
const pdfDocument = await loadingTask.promise;
console.log("# PDF document loaded.");
// Get the first page.
const page = await pdfDocument.getPage(1);
// Render the page on a Node canvas with 100% scale.
const viewport = page.getViewport({ scale: 1.0 });
const canvasAndContext = canvasFactory.create(
viewport.width,
viewport.height
);
const renderContext = {
canvasContext: canvasAndContext.context,
viewport,
};
const renderTask = page.render(renderContext);
await renderTask.promise;
// Convert the canvas to an image buffer.
const image = canvasAndContext.canvas.toBuffer();
fs.writeFile("output.png", image, function (error) {
if (error) {
console.error("Error: " + error);
} else {
console.log(
"Finished converting first page of PDF file to a PNG image."
);
}
});
// Release page resources.
page.cleanup();
} catch (reason) {
console.log(reason);
}
})();
const renderTask = page.render(renderContext);
await renderTask.promise;
// Convert the canvas to an image buffer.
const image = canvasAndContext.canvas.toBuffer();
fs.writeFile("output.png", image, function (error) {
if (error) {
console.error("Error: " + error);
} else {
console.log("Finished converting first page of PDF file to a PNG image.");
}
});
// Release page resources.
page.cleanup();
} catch (reason) {
console.log(reason);
}

View File

@ -1,128 +0,0 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
//
// Node tool to dump SVG output into a file.
//
const fs = require("fs");
const util = require("util");
const path = require("path");
const stream = require("stream");
// HACK few hacks to let PDF.js be loaded not as a module in global space.
require("./domstubs.js").setStubs(global);
// Run `gulp dist-install` to generate 'pdfjs-dist' npm package files.
const pdfjsLib = require("pdfjs-dist/legacy/build/pdf.js");
// Some PDFs need external cmaps.
const CMAP_URL = "../../node_modules/pdfjs-dist/cmaps/";
const CMAP_PACKED = true;
// Loading file from file system into typed array
const pdfPath =
process.argv[2] || "../../web/compressed.tracemonkey-pldi-09.pdf";
const data = new Uint8Array(fs.readFileSync(pdfPath));
const outputDirectory = "./svgdump";
try {
// Note: This creates a directory only one level deep. If you want to create
// multiple subdirectories on the fly, use the mkdirp module from npm.
fs.mkdirSync(outputDirectory);
} catch (e) {
if (e.code !== "EEXIST") {
throw e;
}
}
// Dumps svg outputs to a folder called svgdump
function getFilePathForPage(pageNum) {
const name = path.basename(pdfPath, path.extname(pdfPath));
return path.join(outputDirectory, `${name}-${pageNum}.svg`);
}
/**
* A readable stream which offers a stream representing the serialization of a
* given DOM element (as defined by domstubs.js).
*
* @param {object} options
* @param {DOMElement} options.svgElement The element to serialize
*/
function ReadableSVGStream(options) {
if (!(this instanceof ReadableSVGStream)) {
return new ReadableSVGStream(options);
}
stream.Readable.call(this, options);
this.serializer = options.svgElement.getSerializer();
}
util.inherits(ReadableSVGStream, stream.Readable);
// Implements https://nodejs.org/api/stream.html#stream_readable_read_size_1
ReadableSVGStream.prototype._read = function () {
let chunk;
while ((chunk = this.serializer.getNext()) !== null) {
if (!this.push(chunk)) {
return;
}
}
this.push(null);
};
// Streams the SVG element to the given file path.
function writeSvgToFile(svgElement, filePath) {
let readableSvgStream = new ReadableSVGStream({
svgElement,
});
const writableStream = fs.createWriteStream(filePath);
return new Promise(function (resolve, reject) {
readableSvgStream.once("error", reject);
writableStream.once("error", reject);
writableStream.once("finish", resolve);
readableSvgStream.pipe(writableStream);
}).catch(function (err) {
readableSvgStream = null; // Explicitly null because of v8 bug 6512.
writableStream.end();
throw err;
});
}
// Will be using async/await to load document, pages and misc data.
const loadingTask = pdfjsLib.getDocument({
data,
cMapUrl: CMAP_URL,
cMapPacked: CMAP_PACKED,
fontExtraProperties: true,
});
(async function () {
const doc = await loadingTask.promise;
const numPages = doc.numPages;
console.log("# Document Loaded");
console.log(`Number of Pages: ${numPages}`);
console.log();
for (let pageNum = 1; pageNum <= numPages; pageNum++) {
try {
const page = await doc.getPage(pageNum);
console.log(`# Page ${pageNum}`);
const viewport = page.getViewport({ scale: 1.0 });
console.log(`Size: ${viewport.width}x${viewport.height}`);
console.log();
const opList = await page.getOperatorList();
const svgGfx = new pdfjsLib.SVGGraphics(
page.commonObjs,
page.objs,
/* forceDataSchema = */ true
);
svgGfx.embedFonts = true;
const svg = await svgGfx.getSVG(opList, viewport);
await writeSvgToFile(svg, getFilePathForPage(pageNum));
// Release page resources.
page.cleanup();
} catch (err) {
console.log(`Error: ${err}`);
}
}
console.log("# End of Document");
})();

View File

@ -3,8 +3,8 @@
<head>
<meta charset="UTF-8">
<title>Text-only PDF.js example</title>
<script src="../../node_modules/pdfjs-dist/build/pdf.js"></script>
<script src="pdf2svg.js"></script>
<script src="../../node_modules/pdfjs-dist/build/pdf.mjs" type="module"></script>
<script src="pdf2svg.mjs" type="module"></script>
</head>
<body>
<p>Text-only PDF.js example</p>

View File

@ -19,7 +19,7 @@ const PAGE_SCALE = 1.5;
const SVG_NS = "http://www.w3.org/2000/svg";
pdfjsLib.GlobalWorkerOptions.workerSrc =
"../../node_modules/pdfjs-dist/build/pdf.worker.js";
"../../node_modules/pdfjs-dist/build/pdf.worker.mjs";
function buildSVG(viewport, textContent) {
// Building SVG with size of the viewport (for simplicity)

View File

@ -27,9 +27,7 @@ otherwise the build is not guaranteed to work correctly.
## Worker loading
If you are getting the `Setting up fake worker` warning, make sure you are
importing `pdfjs-dist/webpack` which is the zero-configuration method for
importing `pdfjs-dist/webpack.mjs` which is the zero-configuration method for
Webpack users. Installing `worker-loader` is no longer necessary.
import * as pdfjsLib from 'pdfjs-dist/webpack';
For a full working example refer to [this repository](https://github.com/yurydelendik/pdfjs-react).
import * as pdfjsLib from 'pdfjs-dist/webpack.mjs';

View File

@ -1,35 +0,0 @@
// Any copyright is dedicated to the Public Domain.
// http://creativecommons.org/licenses/publicdomain/
// Hello world example for webpack.
const pdfjsLib = require("pdfjs-dist");
const pdfPath = "../learning/helloworld.pdf";
// Setting worker path to worker bundle.
pdfjsLib.GlobalWorkerOptions.workerSrc =
"../../build/webpack/pdf.worker.bundle.js";
// Loading a document.
const loadingTask = pdfjsLib.getDocument(pdfPath);
loadingTask.promise
.then(function (pdfDocument) {
// Request a first page
return pdfDocument.getPage(1).then(function (pdfPage) {
// Display page on the existing canvas with 100% scale.
const viewport = pdfPage.getViewport({ scale: 1.0 });
const canvas = document.getElementById("theCanvas");
canvas.width = viewport.width;
canvas.height = viewport.height;
const ctx = canvas.getContext("2d");
const renderTask = pdfPage.render({
canvasContext: ctx,
viewport,
});
return renderTask.promise;
});
})
.catch(function (reason) {
console.error("Error: " + reason);
});

29
examples/webpack/main.mjs Normal file
View File

@ -0,0 +1,29 @@
// Any copyright is dedicated to the Public Domain.
// http://creativecommons.org/licenses/publicdomain/
// Hello world example for webpack.
import * as pdfjsLib from "pdfjs-dist";
const pdfPath = "../learning/helloworld.pdf";
// Setting worker path to worker bundle.
pdfjsLib.GlobalWorkerOptions.workerSrc =
"../../build/webpack/pdf.worker.bundle.js";
// Loading a document.
const loadingTask = pdfjsLib.getDocument(pdfPath);
const pdfDocument = await loadingTask.promise;
// Request a first page
const pdfPage = await pdfDocument.getPage(1);
// Display page on the existing canvas with 100% scale.
const viewport = pdfPage.getViewport({ scale: 1.0 });
const canvas = document.getElementById("theCanvas");
canvas.width = viewport.width;
canvas.height = viewport.height;
const ctx = canvas.getContext("2d");
const renderTask = pdfPage.render({
canvasContext: ctx,
viewport,
});
await renderTask.promise;

View File

@ -1,12 +1,12 @@
{
"name": "webpack-pdf.js-example",
"version": "0.1.0",
"version": "0.2.0",
"scripts": {
"build": "webpack"
},
"devDependencies": {
"webpack": "^5.11.1",
"webpack-cli": "^4.3.1",
"webpack": "^5.89.0",
"webpack-cli": "^5.1.4",
"pdfjs-dist": "../../node_modules/pdfjs-dist"
}
}

View File

@ -1,11 +1,13 @@
/* eslint-disable import/no-commonjs */
const webpack = require("webpack"); // eslint-disable-line no-unused-vars
const path = require("path");
module.exports = {
context: __dirname,
entry: {
main: "./main.js",
"pdf.worker": "pdfjs-dist/build/pdf.worker.entry",
main: "./main.mjs",
"pdf.worker": "pdfjs-dist/build/pdf.worker.mjs",
},
mode: "none",
output: {

View File

@ -47,7 +47,7 @@ limitations under the License.
}
var scheme = url.slice(0, schemeIndex).toLowerCase();
if (schemes.includes(scheme)) {
url = url.split("#")[0];
url = url.split("#", 1)[0];
if (url.charAt(schemeIndex) === ":") {
url = encodeURIComponent(url);
}

View File

@ -11,32 +11,30 @@
},
"permissions": [
"fileBrowserHandler",
"webRequest", "webRequestBlocking",
"webRequest",
"webRequestBlocking",
"<all_urls>",
"tabs",
"webNavigation",
"storage"
],
"content_scripts": [{
"matches": [
"http://*/*",
"https://*/*",
"ftp://*/*",
"file://*/*"
],
"run_at": "document_start",
"all_frames": true,
"css": ["contentstyle.css"],
"js": ["contentscript.js"]
}],
"content_scripts": [
{
"matches": ["http://*/*", "https://*/*", "ftp://*/*", "file://*/*"],
"run_at": "document_start",
"all_frames": true,
"css": ["contentstyle.css"],
"js": ["contentscript.js"]
}
],
"content_security_policy": "script-src 'self' 'unsafe-eval'; object-src 'self'",
"file_browser_handlers": [{
"id": "open-as-pdf",
"default_title": "Open with PDF Viewer",
"file_filters": [
"filesystem:*.pdf"
]
}],
"file_browser_handlers": [
{
"id": "open-as-pdf",
"default_title": "Open with PDF Viewer",
"file_filters": ["filesystem:*.pdf"]
}
],
"storage": {
"managed_schema": "preferences_schema.json"
},

View File

@ -5,11 +5,7 @@
"title": "Theme",
"description": "The theme to use.\n0 = Use system theme.\n1 = Light theme.\n2 = Dark theme.",
"type": "integer",
"enum": [
0,
1,
2
],
"enum": [0, 1, 2],
"default": 2
},
"showPreviousViewOnLoad": {
@ -21,11 +17,7 @@
"title": "View position on load",
"description": "The position in the document upon load.\n -1 = Default (uses OpenAction if available, otherwise equal to `viewOnLoad = 0`).\n 0 = The last viewed page/position.\n 1 = The initial page/position.",
"type": "integer",
"enum": [
-1,
0,
1
],
"enum": [-1, 0, 1],
"default": 0
},
"defaultZoomDelay": {
@ -45,13 +37,7 @@
"title": "Sidebar state on load",
"description": "Controls the state of the sidebar upon load.\n -1 = Default (uses PageMode if available, otherwise the last position if available/enabled).\n 0 = Do not show sidebar.\n 1 = Show thumbnails in sidebar.\n 2 = Show document outline in sidebar.\n 3 = Show attachments in sidebar.",
"type": "integer",
"enum": [
-1,
0,
1,
2,
3
],
"enum": [-1, 0, 1, 2, 3],
"default": -1
},
"enableHandToolOnLoad": {
@ -59,14 +45,15 @@
"type": "boolean",
"default": false
},
"enableML": {
"type": "boolean",
"default": false
},
"cursorToolOnLoad": {
"title": "Cursor tool on load",
"description": "The cursor tool that is enabled upon load.\n 0 = Text selection tool.\n 1 = Hand tool.",
"type": "integer",
"enum": [
0,
1
],
"enum": [0, 1],
"default": 0
},
"pdfBugEnabled": {
@ -81,6 +68,18 @@
"description": "Whether to allow execution of active content (JavaScript) by PDF files.",
"default": false
},
"enableHighlightEditor": {
"type": "boolean",
"default": false
},
"enableHighlightFloatingButton": {
"type": "boolean",
"default": false
},
"highlightEditorColors": {
"type": "string",
"default": "yellow=#FFFF98,green=#53FFBC,blue=#80EBFF,pink=#FFCBE6,red=#FF4F5F"
},
"enableStampEditor": {
"type": "boolean",
"default": true
@ -116,23 +115,14 @@
"title": "Text layer mode",
"description": "Controls if the text layer is enabled, and the selection mode that is used.\n 0 = Disabled.\n 1 = Enabled.",
"type": "integer",
"enum": [
0,
1
],
"enum": [0, 1],
"default": 1
},
"externalLinkTarget": {
"title": "External links target window",
"description": "Controls how external links will be opened.\n 0 = default.\n 1 = replaces current window.\n 2 = new window/tab.\n 3 = parent.\n 4 = in top window.",
"type": "integer",
"enum": [
0,
1,
2,
3,
4
],
"enum": [0, 1, 2, 3, 4],
"default": 0
},
"disablePageLabels": {
@ -152,22 +142,12 @@
},
"annotationMode": {
"type": "integer",
"enum": [
0,
1,
2,
3
],
"enum": [0, 1, 2, 3],
"default": 2
},
"annotationEditorMode": {
"type": "integer",
"enum": [
-1,
0,
3,
15
],
"enum": [-1, 0, 3, 15],
"default": 0
},
"enablePermissions": {
@ -198,25 +178,14 @@
"title": "Scroll mode on load",
"description": "Controls how the viewer scrolls upon load.\n -1 = Default (uses the last position if available/enabled).\n 3 = Page scrolling.\n 0 = Vertical scrolling.\n 1 = Horizontal scrolling.\n 2 = Wrapped scrolling.",
"type": "integer",
"enum": [
-1,
0,
1,
2,
3
],
"enum": [-1, 0, 1, 2, 3],
"default": -1
},
"spreadModeOnLoad": {
"title": "Spread mode on load",
"description": "Whether the viewer should join pages into spreads upon load.\n -1 = Default (uses the last position if available/enabled).\n 0 = No spreads.\n 1 = Odd spreads.\n 2 = Even spreads.",
"type": "integer",
"enum": [
-1,
0,
1,
2
],
"enum": [-1, 0, 1, 2],
"default": -1
},
"forcePageColors": {

View File

@ -6,10 +6,6 @@
"plugin:mozilla/recommended",
],
"parserOptions": {
"sourceType": "module",
},
"plugins": [
"mozilla"
],

View File

@ -1,133 +0,0 @@
"use strict";
// Small subset of the webL10n API by Fabien Cazenave for PDF.js extension.
(function (window) {
let gL10nData = null;
let gLanguage = "";
let gExternalLocalizerServices = null;
let gReadyState = "loading";
// fetch an l10n objects
function getL10nData(key) {
gL10nData ||= gExternalLocalizerServices.getStrings();
const data = gL10nData?.[key];
if (!data) {
console.warn("[l10n] #" + key + " missing for [" + gLanguage + "]");
}
return data;
}
// replace {{arguments}} with their values
function substArguments(text, args) {
if (!args) {
return text;
}
return text.replaceAll(/\{\{\s*(\w+)\s*\}\}/g, function (all, name) {
return name in args ? args[name] : "{{" + name + "}}";
});
}
// translate a string
function translateString(key, args, fallback) {
const i = key.lastIndexOf(".");
let name, property;
if (i >= 0) {
name = key.substring(0, i);
property = key.substring(i + 1);
} else {
name = key;
property = "textContent";
}
const data = getL10nData(name);
const value = data?.[property] || fallback;
if (!value) {
return "{{" + key + "}}";
}
return substArguments(value, args);
}
// translate an HTML element
function translateElement(element) {
if (!element?.dataset) {
return;
}
// get the related l10n object
const key = element.dataset.l10nId;
const data = getL10nData(key);
if (!data) {
return;
}
// get arguments (if any)
// TODO: more flexible parser?
let args;
if (element.dataset.l10nArgs) {
try {
args = JSON.parse(element.dataset.l10nArgs);
} catch {
console.warn("[l10n] could not parse arguments for #" + key + "");
}
}
// translate element
// TODO: security check?
for (const k in data) {
element[k] = substArguments(data[k], args);
}
}
// translate an HTML subtree
function translateFragment(element) {
element ||= document.querySelector("html");
// check all translatable children (= w/ a `data-l10n-id' attribute)
const children = element.querySelectorAll("*[data-l10n-id]");
const elementCount = children.length;
for (let i = 0; i < elementCount; i++) {
translateElement(children[i]);
}
// translate element itself if necessary
if (element.dataset.l10nId) {
translateElement(element);
}
}
// Public API
document.mozL10n = {
// get a localized string
get: translateString,
// get the document language
getLanguage() {
return gLanguage;
},
// get the direction (ltr|rtl) of the current language
getDirection() {
// http://www.w3.org/International/questions/qa-scripts
// Arabic, Hebrew, Farsi, Pashto, Urdu
const rtlList = ["ar", "he", "fa", "ps", "ur"];
// use the short language code for "full" codes like 'ar-sa' (issue 5440)
const shortCode = gLanguage.split("-")[0];
return rtlList.includes(shortCode) ? "rtl" : "ltr";
},
getReadyState() {
return gReadyState;
},
setExternalLocalizerServices(externalLocalizerServices) {
gExternalLocalizerServices = externalLocalizerServices;
gLanguage = gExternalLocalizerServices.getLocale();
gReadyState = "complete";
},
// translate an element or document fragment
translate: translateFragment,
};
})(this);

View File

@ -0,0 +1,253 @@
import { types as t, transformSync } from "@babel/core";
import fs from "fs";
import { join as joinPaths } from "path";
import vm from "vm";
const PDFJS_PREPROCESSOR_NAME = "PDFJSDev";
const ROOT_PREFIX = "$ROOT/";
function isPDFJSPreprocessor(obj) {
return obj.type === "Identifier" && obj.name === PDFJS_PREPROCESSOR_NAME;
}
function evalWithDefines(code, defines) {
if (!code || !code.trim()) {
throw new Error("No JavaScript expression given");
}
return vm.runInNewContext(code, defines, { displayErrors: false });
}
function handlePreprocessorAction(ctx, actionName, args, path) {
try {
const arg = args[0];
switch (actionName) {
case "test":
if (!t.isStringLiteral(arg)) {
throw new Error("No code for testing is given");
}
return !!evalWithDefines(arg.value, ctx.defines);
case "eval":
if (!t.isStringLiteral(arg)) {
throw new Error("No code for eval is given");
}
const result = evalWithDefines(arg.value, ctx.defines);
if (
typeof result === "boolean" ||
typeof result === "string" ||
typeof result === "number" ||
typeof result === "object"
) {
return result;
}
break;
case "json":
if (!t.isStringLiteral(arg)) {
throw new Error("Path to JSON is not provided");
}
let jsonPath = arg.value;
if (jsonPath.startsWith(ROOT_PREFIX)) {
jsonPath = joinPaths(
ctx.rootPath,
jsonPath.substring(ROOT_PREFIX.length)
);
}
return JSON.parse(fs.readFileSync(jsonPath, "utf8"));
}
throw new Error("Unsupported action");
} catch (e) {
throw path.buildCodeFrameError(
"Could not process " +
PDFJS_PREPROCESSOR_NAME +
"." +
actionName +
": " +
e.message
);
}
}
function babelPluginPDFJSPreprocessor(babel, ctx) {
return {
name: "babel-plugin-pdfjs-preprocessor",
manipulateOptions({ parserOpts }) {
parserOpts.attachComment = false;
},
visitor: {
"ExportNamedDeclaration|ImportDeclaration": ({ node }) => {
if (node.source && ctx.map?.[node.source.value]) {
node.source.value = ctx.map[node.source.value];
}
},
"IfStatement|ConditionalExpression": {
exit(path) {
const { node } = path;
if (t.isBooleanLiteral(node.test)) {
// if (true) stmt1; => stmt1
// if (false) stmt1; else stmt2; => stmt2
if (node.test.value === true) {
path.replaceWith(node.consequent);
} else if (node.alternate) {
path.replaceWith(node.alternate);
} else {
path.remove(node);
}
}
},
},
UnaryExpression: {
exit(path) {
const { node } = path;
if (
node.operator === "typeof" &&
isPDFJSPreprocessor(node.argument)
) {
// typeof PDFJSDev => 'object'
path.replaceWith(t.stringLiteral("object"));
return;
}
if (node.operator === "!" && t.isBooleanLiteral(node.argument)) {
// !true => false, !false => true
path.replaceWith(t.booleanLiteral(!node.argument.value));
}
},
},
LogicalExpression: {
exit(path) {
const { node } = path;
if (!t.isBooleanLiteral(node.left)) {
return;
}
switch (node.operator) {
case "&&":
// true && expr => expr
// false && expr => false
path.replaceWith(
node.left.value === true ? node.right : node.left
);
break;
case "||":
// true || expr => true
// false || expr => expr
path.replaceWith(
node.left.value === true ? node.left : node.right
);
break;
}
},
},
BinaryExpression: {
exit(path) {
const { node } = path;
switch (node.operator) {
case "==":
case "===":
case "!=":
case "!==":
if (t.isLiteral(node.left) && t.isLiteral(node.right)) {
// folding == and != check that can be statically evaluated
const { confident, value } = path.evaluate();
if (confident) {
path.replaceWith(t.booleanLiteral(value));
}
}
}
},
},
CallExpression(path) {
const { node } = path;
if (
t.isMemberExpression(node.callee) &&
isPDFJSPreprocessor(node.callee.object) &&
t.isIdentifier(node.callee.property) &&
!node.callee.computed
) {
// PDFJSDev.xxxx(arg1, arg2, ...) => transform
const action = node.callee.property.name;
const result = handlePreprocessorAction(
ctx,
action,
node.arguments,
path
);
path.replaceWith(t.inherits(t.valueToNode(result), path.node));
}
if (t.isIdentifier(node.callee, { name: "__non_webpack_import__" })) {
if (node.arguments.length !== 1) {
throw new Error("Invalid `__non_webpack_import__` usage.");
}
// Replace it with a standard `import`-call and
// ensure that Webpack will leave it alone.
const source = node.arguments[0];
source.leadingComments = [
{
type: "CommentBlock",
value: "webpackIgnore: true",
},
];
path.replaceWith(t.importExpression(source));
}
},
BlockStatement: {
// Visit node in post-order so that recursive flattening
// of blocks works correctly.
exit(path) {
const { node } = path;
let subExpressionIndex = 0;
while (subExpressionIndex < node.body.length) {
switch (node.body[subExpressionIndex].type) {
case "EmptyStatement":
// Removing empty statements from the blocks.
node.body.splice(subExpressionIndex, 1);
continue;
case "BlockStatement":
// Block statements inside a block are flattened
// into the parent one.
const subChildren = node.body[subExpressionIndex].body;
node.body.splice(subExpressionIndex, 1, ...subChildren);
subExpressionIndex += Math.max(subChildren.length - 1, 0);
continue;
case "ReturnStatement":
case "ThrowStatement":
// Removing dead code after return or throw.
node.body.splice(
subExpressionIndex + 1,
node.body.length - subExpressionIndex - 1
);
break;
}
subExpressionIndex++;
}
},
},
Function: {
exit(path) {
if (!t.isBlockStatement(path.node.body)) {
// Arrow function with expression body
return;
}
const { body } = path.node.body;
if (
body.length > 0 &&
t.isReturnStatement(body.at(-1), { argument: null })
) {
// Function body ends with return without arg -- removing it.
body.pop();
}
},
},
},
};
}
function preprocessPDFJSCode(ctx, content) {
return transformSync(content, {
configFile: false,
plugins: [[babelPluginPDFJSPreprocessor, ctx]],
}).code;
}
export { babelPluginPDFJSPreprocessor, preprocessPDFJSCode };

View File

@ -42,6 +42,12 @@ function preprocess(inFilename, outFilename, defines) {
return content.replaceAll(
/^\s*@import\s+url\(([^)]+)\);\s*$/gm,
function (all, url) {
if (defines.GECKOVIEW) {
switch (url) {
case "annotation_editor_layer_builder.css":
return "";
}
}
const file = path.join(path.dirname(baseUrl), url);
const imported = fs.readFileSync(file, "utf8").toString();
return expandCssImports(imported, file);
@ -223,19 +229,4 @@ function preprocess(inFilename, outFilename, defines) {
}
}
/**
* Merge two defines arrays. Values in the second param will override values in
* the first.
*/
function merge(defaults, defines) {
const ret = Object.create(null);
for (const key in defaults) {
ret[key] = defaults[key];
}
for (const key in defines) {
ret[key] = defines[key];
}
return ret;
}
export { merge, preprocess };
export { preprocess };

View File

@ -1,10 +1,10 @@
function test() {
"test";
"1";
"2";
"3";
if ("test") {
"5";
}
"4";
"test";
"1";
"2";
"3";
if ("test") {
"5";
}
"4";
}

View File

@ -1,17 +1,17 @@
function f1() {
"1";
"2";
"1";
"2";
}
function f2() {
"1";
"2";
"1";
"2";
}
function f3() {
if ("1") {
"1";
}
"2";
if ("3") {
"4";
}
if ("1") {
"1";
}
"2";
if ("3") {
"4";
}
}

View File

@ -10,6 +10,6 @@ var i = true;
var j = false;
var k = false;
var l = true;
var m = '1' === true;
var m = false;
var n = false;
var o = true;

View File

@ -1,13 +1,21 @@
function f1() {
}
function f1() {}
function f2() {
return 1;
return 1;
}
function f3() {
var i = 0;
throw "test";
var i = 0;
throw "test";
}
function f4() {
var i = 0;
var i = 0;
}
var obj = {
method1() {},
method2() {}
};
class C {
method1() {}
method2() {}
}
var arrow1 = () => {};
var arrow2 = () => {};

View File

@ -23,3 +23,15 @@ function f4() {
var j = 0;
}
var obj = {
method1() { return; var i = 0; },
method2() { return; },
};
class C {
method1() { return; var i = 0; }
method2() { return; }
}
var arrow1 = () => { return; var i = 0; };
var arrow2 = () => { return; };

View File

@ -3,11 +3,19 @@ var b = true;
var c = true;
var d = false;
var e = true;
var f = 'text';
var f = "text";
var g = {
"obj": { "i": 1 },
"j": 2
obj: {
i: 1
},
j: 2
};
var h = {
test: "test"
};
var h = { 'test': 'test' };
var i = '0';
var j = { "i": 1 };
var j = {
i: 1
};
var k = false;
var l = true;

View File

@ -8,3 +8,5 @@ var g = PDFJSDev.eval('OBJ');
var h = PDFJSDev.json('$ROOT/external/builder/fixtures_esprima/evals.json');
var i = typeof PDFJSDev === 'undefined' ? PDFJSDev.eval('FALSE') : '0';
var j = typeof PDFJSDev !== 'undefined' ? PDFJSDev.eval('OBJ.obj') : '0';
var k = !PDFJSDev.test('TRUE');
var l = !PDFJSDev.test('FALSE');

View File

@ -1 +1 @@
{ 'test': 'test' }
{ "test": "test" }

View File

@ -1,17 +1,18 @@
if ('test') {
"1";
"1";
}
{
"1";
"1";
}
{
"1";
"1";
}
;
{
"2";
"2";
}
;
if ('1') {
"1";
"1";
}
function f1() {
"1";
}

View File

@ -23,3 +23,12 @@ if (true && false) {
if (true && false || '1') {
"1";
}
function f1() {
if (true) {
"1";
}
if (false) {
"2";
}
}

View File

@ -1,7 +1,4 @@
import { Test } from 'import-name';
import { Test } from "import-name";
import { Test2 } from './non-alias';
export {
Test3
} from 'import-name';
var Imp = require('import-name');
var Imp2 = require('./non-alias');
export { Test3 } from "import-name";
await import( /*webpackIgnore: true*/"./non-alias");

View File

@ -1,5 +1,4 @@
import { Test } from 'import-alias';
import { Test2 } from './non-alias';
export { Test3 } from 'import-alias';
var Imp = require('import-alias');
var Imp2 = require('./non-alias');
await __non_webpack_import__("./non-alias");

View File

@ -1,347 +0,0 @@
import * as acorn from "acorn";
import escodegen from "@javascript-obfuscator/escodegen";
import fs from "fs";
import path from "path";
import vm from "vm";
const PDFJS_PREPROCESSOR_NAME = "PDFJSDev";
const ROOT_PREFIX = "$ROOT/";
const ACORN_ECMA_VERSION = 2022;
function isLiteral(obj, value) {
return obj.type === "Literal" && obj.value === value;
}
function isPDFJSPreprocessor(obj) {
return obj.type === "Identifier" && obj.name === PDFJS_PREPROCESSOR_NAME;
}
function evalWithDefines(code, defines, loc) {
if (!code || !code.trim()) {
throw new Error("No JavaScript expression given");
}
return vm.runInNewContext(code, defines, { displayErrors: false });
}
function handlePreprocessorAction(ctx, actionName, args, loc) {
try {
let arg;
switch (actionName) {
case "test":
arg = args[0];
if (!arg || arg.type !== "Literal" || typeof arg.value !== "string") {
throw new Error("No code for testing is given");
}
const isTrue = !!evalWithDefines(arg.value, ctx.defines);
return { type: "Literal", value: isTrue, loc };
case "eval":
arg = args[0];
if (!arg || arg.type !== "Literal" || typeof arg.value !== "string") {
throw new Error("No code for eval is given");
}
const result = evalWithDefines(arg.value, ctx.defines);
if (
typeof result === "boolean" ||
typeof result === "string" ||
typeof result === "number"
) {
return { type: "Literal", value: result, loc };
}
if (typeof result === "object") {
const parsedObj = acorn.parse("(" + JSON.stringify(result) + ")", {
ecmaVersion: ACORN_ECMA_VERSION,
});
parsedObj.body[0].expression.loc = loc;
return parsedObj.body[0].expression;
}
break;
case "json":
arg = args[0];
if (!arg || arg.type !== "Literal" || typeof arg.value !== "string") {
throw new Error("Path to JSON is not provided");
}
let jsonPath = arg.value;
if (jsonPath.indexOf(ROOT_PREFIX) === 0) {
jsonPath = path.join(
ctx.rootPath,
jsonPath.substring(ROOT_PREFIX.length)
);
}
const jsonContent = fs.readFileSync(jsonPath).toString();
const parsedJSON = acorn.parse("(" + jsonContent + ")", {
ecmaVersion: ACORN_ECMA_VERSION,
});
parsedJSON.body[0].expression.loc = loc;
return parsedJSON.body[0].expression;
}
throw new Error("Unsupported action");
} catch (e) {
throw new Error(
"Could not process " +
PDFJS_PREPROCESSOR_NAME +
"." +
actionName +
" at " +
JSON.stringify(loc) +
"\n" +
e.name +
": " +
e.message
);
}
}
function postprocessNode(ctx, node) {
switch (node.type) {
case "ExportNamedDeclaration":
case "ImportDeclaration":
if (
node.source &&
node.source.type === "Literal" &&
ctx.map &&
ctx.map[node.source.value]
) {
const newValue = ctx.map[node.source.value];
node.source.value = node.source.raw = newValue;
}
break;
case "IfStatement":
if (isLiteral(node.test, true)) {
// if (true) stmt1; => stmt1
return node.consequent;
} else if (isLiteral(node.test, false)) {
// if (false) stmt1; else stmt2; => stmt2
return node.alternate || { type: "EmptyStatement", loc: node.loc };
}
break;
case "ConditionalExpression":
if (isLiteral(node.test, true)) {
// true ? stmt1 : stmt2 => stmt1
return node.consequent;
} else if (isLiteral(node.test, false)) {
// false ? stmt1 : stmt2 => stmt2
return node.alternate;
}
break;
case "UnaryExpression":
if (node.operator === "typeof" && isPDFJSPreprocessor(node.argument)) {
// typeof PDFJSDev => 'object'
return { type: "Literal", value: "object", loc: node.loc };
}
if (
node.operator === "!" &&
node.argument.type === "Literal" &&
typeof node.argument.value === "boolean"
) {
// !true => false, !false => true
return { type: "Literal", value: !node.argument.value, loc: node.loc };
}
break;
case "LogicalExpression":
switch (node.operator) {
case "&&":
if (isLiteral(node.left, true)) {
return node.right;
}
if (isLiteral(node.left, false)) {
return node.left;
}
break;
case "||":
if (isLiteral(node.left, true)) {
return node.left;
}
if (isLiteral(node.left, false)) {
return node.right;
}
break;
}
break;
case "BinaryExpression":
switch (node.operator) {
case "==":
case "===":
case "!=":
case "!==":
if (
node.left.type === "Literal" &&
node.right.type === "Literal" &&
typeof node.left.value === typeof node.right.value
) {
// folding two literals == and != check
switch (typeof node.left.value) {
case "string":
case "boolean":
case "number":
const equal = node.left.value === node.right.value;
return {
type: "Literal",
value: (node.operator[0] === "=") === equal,
loc: node.loc,
};
}
}
break;
}
break;
case "CallExpression":
if (
node.callee.type === "MemberExpression" &&
isPDFJSPreprocessor(node.callee.object) &&
node.callee.property.type === "Identifier"
) {
// PDFJSDev.xxxx(arg1, arg2, ...) => transform
const action = node.callee.property.name;
return handlePreprocessorAction(ctx, action, node.arguments, node.loc);
}
// require('string')
if (
node.callee.type === "Identifier" &&
node.callee.name === "require" &&
node.arguments.length === 1 &&
node.arguments[0].type === "Literal" &&
ctx.map &&
ctx.map[node.arguments[0].value]
) {
const requireName = node.arguments[0];
requireName.value = requireName.raw = ctx.map[requireName.value];
}
break;
case "BlockStatement":
let subExpressionIndex = 0;
while (subExpressionIndex < node.body.length) {
switch (node.body[subExpressionIndex].type) {
case "EmptyStatement":
// Removing empty statements from the blocks.
node.body.splice(subExpressionIndex, 1);
continue;
case "BlockStatement":
// Block statements inside a block are moved to the parent one.
const subChildren = node.body[subExpressionIndex].body;
Array.prototype.splice.apply(node.body, [
subExpressionIndex,
1,
...subChildren,
]);
subExpressionIndex += Math.max(subChildren.length - 1, 0);
continue;
case "ReturnStatement":
case "ThrowStatement":
// Removing dead code after return or throw.
node.body.splice(
subExpressionIndex + 1,
node.body.length - subExpressionIndex - 1
);
break;
}
subExpressionIndex++;
}
break;
case "FunctionDeclaration":
case "FunctionExpression":
const block = node.body;
if (
block.body.length > 0 &&
block.body.at(-1).type === "ReturnStatement" &&
!block.body.at(-1).argument
) {
// Function body ends with return without arg -- removing it.
block.body.pop();
}
break;
}
return node;
}
function fixComments(ctx, node) {
if (!ctx.saveComments) {
return;
}
// Fixes double comments in the escodegen output.
delete node.trailingComments;
// Removes ESLint and other service comments.
if (node.leadingComments) {
const CopyrightRegExp = /\bcopyright\b/i;
const BlockCommentRegExp = /^\s*(globals|eslint|falls through)\b/;
const LineCommentRegExp = /^\s*eslint\b/;
let i = 0;
while (i < node.leadingComments.length) {
const type = node.leadingComments[i].type;
const value = node.leadingComments[i].value;
if (ctx.saveComments === "copyright") {
// Remove all comments, except Copyright notices and License headers.
if (!(type === "Block" && CopyrightRegExp.test(value))) {
node.leadingComments.splice(i, 1);
continue;
}
} else if (
(type === "Block" && BlockCommentRegExp.test(value)) ||
(type === "Line" && LineCommentRegExp.test(value))
) {
node.leadingComments.splice(i, 1);
continue;
}
i++;
}
}
}
function traverseTree(ctx, node) {
// generic node processing
for (const i in node) {
const child = node[i];
if (typeof child === "object" && child !== null && child.type) {
const result = traverseTree(ctx, child);
if (result !== child) {
node[i] = result;
}
} else if (Array.isArray(child)) {
child.forEach(function (childItem, index) {
if (
typeof childItem === "object" &&
childItem !== null &&
childItem.type
) {
const result = traverseTree(ctx, childItem);
if (result !== childItem) {
child[index] = result;
}
}
});
}
}
node = postprocessNode(ctx, node) || node;
fixComments(ctx, node);
return node;
}
function preprocessPDFJSCode(ctx, code) {
const format = ctx.format || {
indent: {
style: " ",
},
};
const parseOptions = {
ecmaVersion: ACORN_ECMA_VERSION,
locations: true,
sourceFile: ctx.sourceFile,
sourceType: "module",
};
const codegenOptions = {
format,
parse(input) {
return acorn.parse(input, { ecmaVersion: ACORN_ECMA_VERSION });
},
sourceMap: ctx.sourceMap,
sourceMapWithCode: ctx.sourceMap,
};
const syntax = acorn.parse(code, parseOptions);
traverseTree(ctx, syntax);
return escodegen.generate(syntax, codegenOptions);
}
export { preprocessPDFJSCode };

View File

@ -42,6 +42,12 @@ files.forEach(function (expectationFilename) {
if (out !== expectation) {
errors++;
// Allow regenerating the expected output using
// OVERWRITE=true node ./external/builder/test-fixtures.mjs
if (process.env.OVERWRITE) {
fs.writeFileSync(expectationFilename, out + "\n");
}
console.log("Assertion failed for " + inFilename);
console.log("--------------------------------------------------");
console.log("EXPECTED:");

View File

@ -1,7 +1,7 @@
import { fileURLToPath } from "url";
import fs from "fs";
import path from "path";
import { preprocessPDFJSCode } from "./preprocessor2.mjs";
import { preprocessPDFJSCode } from "./babel-plugin-pdfjs-preprocessor.mjs";
const __dirname = path.dirname(fileURLToPath(import.meta.url));
@ -48,6 +48,12 @@ files.forEach(function (expectationFilename) {
if (out !== expectation) {
errors++;
// Allow regenerating the expected output using
// OVERWRITE=true node ./external/builder/test-fixtures_esprima.mjs
if (process.env.OVERWRITE) {
fs.writeFileSync(expectationFilename, out + "\n");
}
console.log("Assertion failed for " + inFilename);
console.log("--------------------------------------------------");
console.log("EXPECTED:");

View File

@ -0,0 +1 @@
export * from "../../types/web/pdf_viewer.component.js";

View File

@ -1 +0,0 @@
export * from "../../types/web/pdf_viewer.component";

1
external/dist/web/pdf_viewer.d.mts vendored Normal file
View File

@ -0,0 +1 @@
export * from "../types/web/pdf_viewer.component.js";

View File

@ -1 +0,0 @@
export * from "../types/web/pdf_viewer.component";

View File

@ -12,15 +12,15 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* eslint-disable import/no-unresolved */
"use strict";
const pdfjs = require("./build/pdf.js");
import { GlobalWorkerOptions } from "./build/pdf.mjs";
if (typeof window !== "undefined" && "Worker" in window) {
pdfjs.GlobalWorkerOptions.workerPort = new Worker(
new URL("./build/pdf.worker.js", import.meta.url)
GlobalWorkerOptions.workerPort = new Worker(
new URL("./build/pdf.worker.mjs", import.meta.url),
{ type: "module" }
);
}
module.exports = pdfjs;
export * from "./build/pdf.mjs";

View File

@ -14,7 +14,6 @@
*/
import fs from "fs";
import https from "https";
import path from "path";
// Fetches all languages that have an *active* translation in mozilla-central.
@ -22,90 +21,63 @@ import path from "path";
const DEFAULT_LOCALE = "en-US";
const EXCLUDE_LANG_CODES = ["ca-valencia", "ja-JP-mac"];
const EXCLUDE_LANG_CODES = new Set(["ca-valencia", "ja-JP-mac"]);
function normalizeText(s) {
return s.replaceAll(/\r\n?/g, "\n").replaceAll("\uFEFF", "");
}
function downloadLanguageCodes() {
async function downloadLanguageCodes() {
console.log("Downloading language codes...\n");
const ALL_LOCALES =
"https://hg.mozilla.org/mozilla-central/raw-file/tip/browser/locales/all-locales";
return new Promise(function (resolve) {
https.get(ALL_LOCALES, function (response) {
if (response.statusCode === 200) {
let content = "";
response.setEncoding("utf8");
response.on("data", function (chunk) {
content += chunk;
});
response.on("end", function () {
content = content.trim(); // Remove any leading/trailing white-space.
const langCodes = normalizeText(content).split("\n");
// Remove all locales that we don't want to download below.
for (const langCode of [DEFAULT_LOCALE, ...EXCLUDE_LANG_CODES]) {
const i = langCodes.indexOf(langCode);
if (i > -1) {
langCodes.splice(i, 1);
}
}
resolve(langCodes);
});
} else {
resolve([]);
}
});
});
const response = await fetch(ALL_LOCALES);
if (!response.ok) {
throw new Error(response.statusText);
}
const content = await response.text();
// Remove any leading/trailing white-space.
const langCodes = normalizeText(content.trim()).split("\n");
// Remove all locales that we don't want to download below.
return langCodes.filter(
langCode => langCode !== DEFAULT_LOCALE && !EXCLUDE_LANG_CODES.has(langCode)
);
}
function downloadLanguageFiles(root, langCode) {
console.log("Downloading " + langCode + "...");
async function downloadLanguageFiles(root, langCode) {
console.log(`Downloading ${langCode}...`);
// Constants for constructing the URLs. Translations are taken from the
// Nightly channel as those are the most recent ones.
const MOZ_CENTRAL_ROOT = "https://hg.mozilla.org/l10n-central/";
const MOZ_CENTRAL_PDFJS_DIR = "/raw-file/default/browser/pdfviewer/";
const MOZ_CENTRAL_PDFJS_DIR = "/raw-file/default/toolkit/toolkit/pdfviewer/";
// Defines which files to download for each language.
const files = ["viewer.properties"];
let downloadsLeft = files.length;
const files = ["viewer.ftl"];
const outputDir = path.join(root, langCode);
if (!fs.existsSync(outputDir)) {
fs.mkdirSync(outputDir);
}
return new Promise(function (resolve) {
// Download the necessary files for this language.
files.forEach(function (fileName) {
const outputPath = path.join(outputDir, fileName);
const url =
MOZ_CENTRAL_ROOT + langCode + MOZ_CENTRAL_PDFJS_DIR + fileName;
// Download the necessary files for this language.
for (const fileName of files) {
const outputPath = path.join(outputDir, fileName);
const url = MOZ_CENTRAL_ROOT + langCode + MOZ_CENTRAL_PDFJS_DIR + fileName;
https.get(url, function (response) {
// Not all files exist for each language. Files without translations
// have been removed (https://bugzilla.mozilla.org/show_bug.cgi?id=1443175).
if (response.statusCode === 200) {
let content = "";
response.setEncoding("utf8");
response.on("data", function (chunk) {
content += chunk;
});
response.on("end", function () {
fs.writeFileSync(outputPath, normalizeText(content), "utf8");
if (--downloadsLeft === 0) {
resolve();
}
});
} else if (--downloadsLeft === 0) {
resolve();
}
});
});
});
const response = await fetch(url);
if (!response.ok) {
// Not all files exist for each language. Files without translations
// have been removed (https://bugzilla.mozilla.org/show_bug.cgi?id=1443175).
continue;
}
const content = await response.text();
fs.writeFileSync(outputPath, normalizeText(content), "utf8");
}
}
async function downloadL10n(root) {

File diff suppressed because one or more lines are too long

View File

@ -1,3 +0,0 @@
The source code for the library can be found at
https://github.com/fabi1cazenave/webL10n

1034
external/webL10n/l10n.js vendored

File diff suppressed because it is too large Load Diff

View File

@ -1,41 +0,0 @@
/* Copyright 2017 Mozilla Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import path from "path";
import { preprocessPDFJSCode } from "../builder/preprocessor2.mjs";
export default function (source) {
// Options must be specified, ignoring request if not.
if (!this.query || typeof this.query !== "object") {
return source;
}
this.cacheable();
const filePath = this.resourcePath;
const context = this.rootContext;
const sourcePath = path.relative(context, filePath).split(path.sep).join("/");
const ctx = Object.create(this.query);
ctx.sourceMap = true;
ctx.sourceFile = sourcePath;
const callback = this.callback;
const sourceAndMap = preprocessPDFJSCode(ctx, source);
const map = sourceAndMap.map.toJSON();
// escodegen does not embed source -- setting map's sourcesContent.
map.sourcesContent = [source];
callback(null, sourceAndMap.code, map);
return undefined;
}

File diff suppressed because it is too large Load Diff

225
l10n/ach/viewer.ftl Normal file
View File

@ -0,0 +1,225 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
## Main toolbar buttons (tooltips and alt text for images)
pdfjs-previous-button =
.title = Pot buk mukato
pdfjs-previous-button-label = Mukato
pdfjs-next-button =
.title = Pot buk malubo
pdfjs-next-button-label = Malubo
# .title: Tooltip for the pageNumber input.
pdfjs-page-input =
.title = Pot buk
# Variables:
# $pagesCount (Number) - the total number of pages in the document
# This string follows an input field with the number of the page currently displayed.
pdfjs-of-pages = pi { $pagesCount }
# Variables:
# $pageNumber (Number) - the currently visible page
# $pagesCount (Number) - the total number of pages in the document
pdfjs-page-of-pages = ({ $pageNumber } me { $pagesCount })
pdfjs-zoom-out-button =
.title = Jwik Matidi
pdfjs-zoom-out-button-label = Jwik Matidi
pdfjs-zoom-in-button =
.title = Kwot Madit
pdfjs-zoom-in-button-label = Kwot Madit
pdfjs-zoom-select =
.title = Kwoti
pdfjs-presentation-mode-button =
.title = Lokke i kit me tyer
pdfjs-presentation-mode-button-label = Kit me tyer
pdfjs-open-file-button =
.title = Yab Pwail
pdfjs-open-file-button-label = Yab
pdfjs-print-button =
.title = Go
pdfjs-print-button-label = Go
## Secondary toolbar and context menu
pdfjs-tools-button =
.title = Gintic
pdfjs-tools-button-label = Gintic
pdfjs-first-page-button =
.title = Cit i pot buk mukwongo
pdfjs-first-page-button-label = Cit i pot buk mukwongo
pdfjs-last-page-button =
.title = Cit i pot buk magiko
pdfjs-last-page-button-label = Cit i pot buk magiko
pdfjs-page-rotate-cw-button =
.title = Wire i tung lacuc
pdfjs-page-rotate-cw-button-label = Wire i tung lacuc
pdfjs-page-rotate-ccw-button =
.title = Wire i tung lacam
pdfjs-page-rotate-ccw-button-label = Wire i tung lacam
pdfjs-cursor-text-select-tool-button =
.title = Cak gitic me yero coc
pdfjs-cursor-text-select-tool-button-label = Gitic me yero coc
pdfjs-cursor-hand-tool-button =
.title = Cak gitic me cing
pdfjs-cursor-hand-tool-button-label = Gitic cing
## Document properties dialog
pdfjs-document-properties-button =
.title = Jami me gin acoya…
pdfjs-document-properties-button-label = Jami me gin acoya…
pdfjs-document-properties-file-name = Nying pwail:
pdfjs-document-properties-file-size = Dit pa pwail:
# Variables:
# $size_kb (Number) - the PDF file size in kilobytes
# $size_b (Number) - the PDF file size in bytes
pdfjs-document-properties-kb = { $size_kb } KB ({ $size_b } bytes)
# Variables:
# $size_mb (Number) - the PDF file size in megabytes
# $size_b (Number) - the PDF file size in bytes
pdfjs-document-properties-mb = { $size_mb } MB ({ $size_b } bytes)
pdfjs-document-properties-title = Wiye:
pdfjs-document-properties-author = Ngat mucoyo:
pdfjs-document-properties-subject = Subjek:
pdfjs-document-properties-keywords = Lok mapire tek:
pdfjs-document-properties-creation-date = Nino dwe me cwec:
pdfjs-document-properties-modification-date = Nino dwe me yub:
# Variables:
# $date (Date) - the creation/modification date of the PDF file
# $time (Time) - the creation/modification time of the PDF file
pdfjs-document-properties-date-string = { $date }, { $time }
pdfjs-document-properties-creator = Lacwec:
pdfjs-document-properties-producer = Layub PDF:
pdfjs-document-properties-version = Kit PDF:
pdfjs-document-properties-page-count = Kwan me pot buk:
pdfjs-document-properties-page-size = Dit pa potbuk:
pdfjs-document-properties-page-size-unit-inches = i
pdfjs-document-properties-page-size-unit-millimeters = mm
pdfjs-document-properties-page-size-orientation-portrait = atir
pdfjs-document-properties-page-size-orientation-landscape = arii
pdfjs-document-properties-page-size-name-a-three = A3
pdfjs-document-properties-page-size-name-a-four = A4
pdfjs-document-properties-page-size-name-letter = Waraga
pdfjs-document-properties-page-size-name-legal = Cik
## Variables:
## $width (Number) - the width of the (current) page
## $height (Number) - the height of the (current) page
## $unit (String) - the unit of measurement of the (current) page
## $name (String) - the name of the (current) page
## $orientation (String) - the orientation of the (current) page
pdfjs-document-properties-page-size-dimension-string = { $width } × { $height } { $unit } ({ $orientation })
pdfjs-document-properties-page-size-dimension-name-string = { $width } × { $height } { $unit } ({ $name }, { $orientation })
##
pdfjs-document-properties-linearized-yes = Eyo
pdfjs-document-properties-linearized-no = Pe
pdfjs-document-properties-close-button = Lor
## Print
pdfjs-print-progress-message = Yubo coc me agoya…
# Variables:
# $progress (Number) - percent value
pdfjs-print-progress-percent = { $progress }%
pdfjs-print-progress-close-button = Juki
pdfjs-printing-not-supported = Ciko: Layeny ma pe teno goyo liweng.
pdfjs-printing-not-ready = Ciko: PDF pe ocane weng me agoya.
## Tooltips and alt text for side panel toolbar buttons
pdfjs-toggle-sidebar-button =
.title = Lok gintic ma inget
pdfjs-toggle-sidebar-button-label = Lok gintic ma inget
pdfjs-document-outline-button =
.title = Nyut Wiyewiye me Gin acoya (dii-kiryo me yaro/kano jami weng)
pdfjs-document-outline-button-label = Pek pa gin acoya
pdfjs-attachments-button =
.title = Nyut twec
pdfjs-attachments-button-label = Twec
pdfjs-thumbs-button =
.title = Nyut cal
pdfjs-thumbs-button-label = Cal
pdfjs-findbar-button =
.title = Nong iye gin acoya
pdfjs-findbar-button-label = Nong
## Thumbnails panel item (tooltip and alt text for images)
# Variables:
# $page (Number) - the page number
pdfjs-thumb-page-title =
.title = Pot buk { $page }
# Variables:
# $page (Number) - the page number
pdfjs-thumb-page-canvas =
.aria-label = Cal me pot buk { $page }
## Find panel button title and messages
pdfjs-find-input =
.title = Nong
.placeholder = Nong i dokumen…
pdfjs-find-previous-button =
.title = Nong timme pa lok mukato
pdfjs-find-previous-button-label = Mukato
pdfjs-find-next-button =
.title = Nong timme pa lok malubo
pdfjs-find-next-button-label = Malubo
pdfjs-find-highlight-checkbox = Ket Lanyut I Weng
pdfjs-find-match-case-checkbox-label = Lok marwate
pdfjs-find-reached-top = Oo iwi gin acoya, omede ki i tere
pdfjs-find-reached-bottom = Oo i agiki me gin acoya, omede ki iwiye
pdfjs-find-not-found = Lok pe ononge
## Predefined zoom values
pdfjs-page-scale-width = Lac me iye pot buk
pdfjs-page-scale-fit = Porre me pot buk
pdfjs-page-scale-auto = Kwot pire kene
pdfjs-page-scale-actual = Dite kikome
# Variables:
# $scale (Number) - percent value for page scale
pdfjs-page-scale-percent = { $scale }%
## PDF page
## Loading indicator messages
pdfjs-loading-error = Bal otime kun cano PDF.
pdfjs-invalid-file-error = Pwail me PDF ma pe atir onyo obale woko.
pdfjs-missing-file-error = Pwail me PDF tye ka rem.
pdfjs-unexpected-response-error = Lagam mape kigeno pa lapok tic.
pdfjs-rendering-error = Bal otime i kare me nyuto pot buk.
## Annotations
# .alt: This is used as a tooltip.
# Variables:
# $type (String) - an annotation type from a list defined in the PDF spec
# (32000-1:2008 Table 169 Annotation types).
# Some common types are e.g.: "Check", "Text", "Comment", "Note"
pdfjs-text-annotation-type =
.alt = [{ $type } Lok angea manok]
## Password
pdfjs-password-label = Ket mung me donyo me yabo pwail me PDF man.
pdfjs-password-invalid = Mung me donyo pe atir. Tim ber i tem doki.
pdfjs-password-ok-button = OK
pdfjs-password-cancel-button = Juki
pdfjs-web-fonts-disabled = Kijuko dit pa coc me kakube woko: pe romo tic ki dit pa coc me PDF ma kiketo i kine.
## Editing
## Alt-text dialog
## Editor resizers
## This is used in an aria label to help to understand the role of the resizer.

View File

@ -1,203 +0,0 @@
# Copyright 2012 Mozilla Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Main toolbar buttons (tooltips and alt text for images)
previous.title=Pot buk mukato
previous_label=Mukato
next.title=Pot buk malubo
next_label=Malubo
# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
page.title=Pot buk
# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
# representing the total number of pages in the document.
of_pages=pi {{pagesCount}}
# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
# will be replaced by a number representing the currently visible page,
# respectively a number representing the total number of pages in the document.
page_of_pages=({{pageNumber}} me {{pagesCount}})
zoom_out.title=Jwik Matidi
zoom_out_label=Jwik Matidi
zoom_in.title=Kwot Madit
zoom_in_label=Kwot Madit
zoom.title=Kwoti
presentation_mode.title=Lokke i kit me tyer
presentation_mode_label=Kit me tyer
open_file.title=Yab Pwail
open_file_label=Yab
print.title=Go
print_label=Go
# LOCALIZATION NOTE (download_button.title): used in Firefox for Android as a tooltip for the download button (“download” is a verb).
# LOCALIZATION NOTE (download_button_label): used in Firefox for Android as a label for the download button (“download” is a verb).
# Length of the translation matters since we are in a mobile context, with limited screen estate.
# LOCALIZATION NOTE (open_in_app.title): This string is used in Firefox for Android.
# LOCALIZATION NOTE (open_in_app_label): This string is used in Firefox for Android. Length of the translation matters since we are in a mobile context, with limited screen estate.
# Secondary toolbar and context menu
tools.title=Gintic
tools_label=Gintic
first_page.title=Cit i pot buk mukwongo
first_page_label=Cit i pot buk mukwongo
last_page.title=Cit i pot buk magiko
last_page_label=Cit i pot buk magiko
page_rotate_cw.title=Wire i tung lacuc
page_rotate_cw_label=Wire i tung lacuc
page_rotate_ccw.title=Wire i tung lacam
page_rotate_ccw_label=Wire i tung lacam
cursor_text_select_tool.title=Cak gitic me yero coc
cursor_text_select_tool_label=Gitic me yero coc
cursor_hand_tool.title=Cak gitic me cing
cursor_hand_tool_label=Gitic cing
# Document properties dialog box
document_properties.title=Jami me gin acoya…
document_properties_label=Jami me gin acoya…
document_properties_file_name=Nying pwail:
document_properties_file_size=Dit pa pwail:
# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
# will be replaced by the PDF file size in kilobytes, respectively in bytes.
document_properties_kb={{size_kb}} KB ({{size_b}} bytes)
# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
# will be replaced by the PDF file size in megabytes, respectively in bytes.
document_properties_mb={{size_mb}} MB ({{size_b}} bytes)
document_properties_title=Wiye:
document_properties_author=Ngat mucoyo:
document_properties_subject=Subjek:
document_properties_keywords=Lok mapire tek:
document_properties_creation_date=Nino dwe me cwec:
document_properties_modification_date=Nino dwe me yub:
# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
# will be replaced by the creation/modification date, and time, of the PDF file.
document_properties_date_string={{date}}, {{time}}
document_properties_creator=Lacwec:
document_properties_producer=Layub PDF:
document_properties_version=Kit PDF:
document_properties_page_count=Kwan me pot buk:
document_properties_page_size=Dit pa potbuk:
document_properties_page_size_unit_inches=i
document_properties_page_size_unit_millimeters=mm
document_properties_page_size_orientation_portrait=atir
document_properties_page_size_orientation_landscape=arii
document_properties_page_size_name_a3=A3
document_properties_page_size_name_a4=A4
document_properties_page_size_name_letter=Waraga
document_properties_page_size_name_legal=Cik
# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
# the size, respectively their unit of measurement and orientation, of the (current) page.
document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}})
# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})
# LOCALIZATION NOTE (document_properties_linearized): The linearization status of
# the document; usually called "Fast Web View" in English locales of Adobe software.
document_properties_linearized_yes=Eyo
document_properties_linearized_no=Pe
document_properties_close=Lor
print_progress_message=Yubo coc me agoya…
# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
# a numerical per cent value.
print_progress_percent={{progress}}%
print_progress_close=Juki
# Tooltips and alt text for side panel toolbar buttons
# (the _label strings are alt text for the buttons, the .title strings are
# tooltips)
toggle_sidebar.title=Lok gintic ma inget
toggle_sidebar_label=Lok gintic ma inget
document_outline.title=Nyut Wiyewiye me Gin acoya (dii-kiryo me yaro/kano jami weng)
document_outline_label=Pek pa gin acoya
attachments.title=Nyut twec
attachments_label=Twec
thumbs.title=Nyut cal
thumbs_label=Cal
findbar.title=Nong iye gin acoya
findbar_label=Nong
# LOCALIZATION NOTE (page_landmark): "{{page}}" will be replaced by the page number.
# Thumbnails panel item (tooltip and alt text for images)
# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
# number.
thumb_page_title=Pot buk {{page}}
# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
# number.
thumb_page_canvas=Cal me pot buk {{page}}
# Find panel button title and messages
find_input.title=Nong
find_input.placeholder=Nong i dokumen…
find_previous.title=Nong timme pa lok mukato
find_previous_label=Mukato
find_next.title=Nong timme pa lok malubo
find_next_label=Malubo
find_highlight=Ket Lanyut I Weng
find_match_case_label=Lok marwate
find_reached_top=Oo iwi gin acoya, omede ki i tere
find_reached_bottom=Oo i agiki me gin acoya, omede ki iwiye
# LOCALIZATION NOTE (find_match_count): The supported plural forms are
# [one|two|few|many|other], with [other] as the default value.
# "{{current}}" and "{{total}}" will be replaced by a number representing the
# index of the currently active find result, respectively a number representing
# the total number of matches in the document.
# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are
# [zero|one|two|few|many|other], with [other] as the default value.
# "{{limit}}" will be replaced by a numerical value.
find_not_found=Lok pe ononge
# Predefined zoom values
page_scale_width=Lac me iye pot buk
page_scale_fit=Porre me pot buk
page_scale_auto=Kwot pire kene
page_scale_actual=Dite kikome
# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
# numerical scale value.
page_scale_percent={{scale}}%
# Loading indicator messages
loading_error=Bal otime kun cano PDF.
invalid_file_error=Pwail me PDF ma pe atir onyo obale woko.
missing_file_error=Pwail me PDF tye ka rem.
unexpected_response_error=Lagam mape kigeno pa lapok tic.
rendering_error=Bal otime i kare me nyuto pot buk.
# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be
# replaced by the modification date, and time, of the annotation.
# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
# "{{type}}" will be replaced with an annotation type from a list defined in
# the PDF spec (32000-1:2008 Table 169 Annotation types).
# Some common types are e.g.: "Check", "Text", "Comment", "Note"
text_annotation_type.alt=[{{type}} Lok angea manok]
password_label=Ket mung me donyo me yabo pwail me PDF man.
password_invalid=Mung me donyo pe atir. Tim ber i tem doki.
password_ok=OK
password_cancel=Juki
printing_not_supported=Ciko: Layeny ma pe teno goyo liweng.
printing_not_ready=Ciko: PDF pe ocane weng me agoya.
web_fonts_disabled=Kijuko dit pa coc me kakube woko: pe romo tic ki dit pa coc me PDF ma kiketo i kine.
# Editor
# Editor Parameters
# Editor aria

212
l10n/af/viewer.ftl Normal file
View File

@ -0,0 +1,212 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
## Main toolbar buttons (tooltips and alt text for images)
pdfjs-previous-button =
.title = Vorige bladsy
pdfjs-previous-button-label = Vorige
pdfjs-next-button =
.title = Volgende bladsy
pdfjs-next-button-label = Volgende
# .title: Tooltip for the pageNumber input.
pdfjs-page-input =
.title = Bladsy
# Variables:
# $pagesCount (Number) - the total number of pages in the document
# This string follows an input field with the number of the page currently displayed.
pdfjs-of-pages = van { $pagesCount }
# Variables:
# $pageNumber (Number) - the currently visible page
# $pagesCount (Number) - the total number of pages in the document
pdfjs-page-of-pages = ({ $pageNumber } van { $pagesCount })
pdfjs-zoom-out-button =
.title = Zoem uit
pdfjs-zoom-out-button-label = Zoem uit
pdfjs-zoom-in-button =
.title = Zoem in
pdfjs-zoom-in-button-label = Zoem in
pdfjs-zoom-select =
.title = Zoem
pdfjs-presentation-mode-button =
.title = Wissel na voorleggingsmodus
pdfjs-presentation-mode-button-label = Voorleggingsmodus
pdfjs-open-file-button =
.title = Open lêer
pdfjs-open-file-button-label = Open
pdfjs-print-button =
.title = Druk
pdfjs-print-button-label = Druk
## Secondary toolbar and context menu
pdfjs-tools-button =
.title = Nutsgoed
pdfjs-tools-button-label = Nutsgoed
pdfjs-first-page-button =
.title = Gaan na eerste bladsy
pdfjs-first-page-button-label = Gaan na eerste bladsy
pdfjs-last-page-button =
.title = Gaan na laaste bladsy
pdfjs-last-page-button-label = Gaan na laaste bladsy
pdfjs-page-rotate-cw-button =
.title = Roteer kloksgewys
pdfjs-page-rotate-cw-button-label = Roteer kloksgewys
pdfjs-page-rotate-ccw-button =
.title = Roteer anti-kloksgewys
pdfjs-page-rotate-ccw-button-label = Roteer anti-kloksgewys
pdfjs-cursor-text-select-tool-button =
.title = Aktiveer gereedskap om teks te merk
pdfjs-cursor-text-select-tool-button-label = Teksmerkgereedskap
pdfjs-cursor-hand-tool-button =
.title = Aktiveer handjie
pdfjs-cursor-hand-tool-button-label = Handjie
## Document properties dialog
pdfjs-document-properties-button =
.title = Dokumenteienskappe…
pdfjs-document-properties-button-label = Dokumenteienskappe…
pdfjs-document-properties-file-name = Lêernaam:
pdfjs-document-properties-file-size = Lêergrootte:
# Variables:
# $size_kb (Number) - the PDF file size in kilobytes
# $size_b (Number) - the PDF file size in bytes
pdfjs-document-properties-kb = { $size_kb } kG ({ $size_b } grepe)
# Variables:
# $size_mb (Number) - the PDF file size in megabytes
# $size_b (Number) - the PDF file size in bytes
pdfjs-document-properties-mb = { $size_mb } MG ({ $size_b } grepe)
pdfjs-document-properties-title = Titel:
pdfjs-document-properties-author = Outeur:
pdfjs-document-properties-subject = Onderwerp:
pdfjs-document-properties-keywords = Sleutelwoorde:
pdfjs-document-properties-creation-date = Skeppingsdatum:
pdfjs-document-properties-modification-date = Wysigingsdatum:
# Variables:
# $date (Date) - the creation/modification date of the PDF file
# $time (Time) - the creation/modification time of the PDF file
pdfjs-document-properties-date-string = { $date }, { $time }
pdfjs-document-properties-creator = Skepper:
pdfjs-document-properties-producer = PDF-vervaardiger:
pdfjs-document-properties-version = PDF-weergawe:
pdfjs-document-properties-page-count = Aantal bladsye:
## Variables:
## $width (Number) - the width of the (current) page
## $height (Number) - the height of the (current) page
## $unit (String) - the unit of measurement of the (current) page
## $name (String) - the name of the (current) page
## $orientation (String) - the orientation of the (current) page
##
pdfjs-document-properties-close-button = Sluit
## Print
pdfjs-print-progress-message = Berei tans dokument voor om te druk…
# Variables:
# $progress (Number) - percent value
pdfjs-print-progress-percent = { $progress }%
pdfjs-print-progress-close-button = Kanselleer
pdfjs-printing-not-supported = Waarskuwing: Dié blaaier ondersteun nie drukwerk ten volle nie.
pdfjs-printing-not-ready = Waarskuwing: Die PDF is nog nie volledig gelaai vir drukwerk nie.
## Tooltips and alt text for side panel toolbar buttons
pdfjs-toggle-sidebar-button =
.title = Sypaneel aan/af
pdfjs-toggle-sidebar-button-label = Sypaneel aan/af
pdfjs-document-outline-button =
.title = Wys dokumentskema (dubbelklik om alle items oop/toe te vou)
pdfjs-document-outline-button-label = Dokumentoorsig
pdfjs-attachments-button =
.title = Wys aanhegsels
pdfjs-attachments-button-label = Aanhegsels
pdfjs-thumbs-button =
.title = Wys duimnaels
pdfjs-thumbs-button-label = Duimnaels
pdfjs-findbar-button =
.title = Soek in dokument
pdfjs-findbar-button-label = Vind
## Thumbnails panel item (tooltip and alt text for images)
# Variables:
# $page (Number) - the page number
pdfjs-thumb-page-title =
.title = Bladsy { $page }
# Variables:
# $page (Number) - the page number
pdfjs-thumb-page-canvas =
.aria-label = Duimnael van bladsy { $page }
## Find panel button title and messages
pdfjs-find-input =
.title = Vind
.placeholder = Soek in dokument…
pdfjs-find-previous-button =
.title = Vind die vorige voorkoms van die frase
pdfjs-find-previous-button-label = Vorige
pdfjs-find-next-button =
.title = Vind die volgende voorkoms van die frase
pdfjs-find-next-button-label = Volgende
pdfjs-find-highlight-checkbox = Verlig almal
pdfjs-find-match-case-checkbox-label = Kassensitief
pdfjs-find-reached-top = Bokant van dokument is bereik; gaan voort van onder af
pdfjs-find-reached-bottom = Einde van dokument is bereik; gaan voort van bo af
pdfjs-find-not-found = Frase nie gevind nie
## Predefined zoom values
pdfjs-page-scale-width = Bladsywydte
pdfjs-page-scale-fit = Pas bladsy
pdfjs-page-scale-auto = Outomatiese zoem
pdfjs-page-scale-actual = Werklike grootte
# Variables:
# $scale (Number) - percent value for page scale
pdfjs-page-scale-percent = { $scale }%
## PDF page
## Loading indicator messages
pdfjs-loading-error = 'n Fout het voorgekom met die laai van die PDF.
pdfjs-invalid-file-error = Ongeldige of korrupte PDF-lêer.
pdfjs-missing-file-error = PDF-lêer is weg.
pdfjs-unexpected-response-error = Onverwagse antwoord van bediener.
pdfjs-rendering-error = 'n Fout het voorgekom toe die bladsy weergegee is.
## Annotations
# .alt: This is used as a tooltip.
# Variables:
# $type (String) - an annotation type from a list defined in the PDF spec
# (32000-1:2008 Table 169 Annotation types).
# Some common types are e.g.: "Check", "Text", "Comment", "Note"
pdfjs-text-annotation-type =
.alt = [{ $type }-annotasie]
## Password
pdfjs-password-label = Gee die wagwoord om dié PDF-lêer mee te open.
pdfjs-password-invalid = Ongeldige wagwoord. Probeer gerus weer.
pdfjs-password-ok-button = OK
pdfjs-password-cancel-button = Kanselleer
pdfjs-web-fonts-disabled = Webfonte is gedeaktiveer: kan nie PDF-fonte wat ingebed is, gebruik nie.
## Editing
## Alt-text dialog
## Editor resizers
## This is used in an aria label to help to understand the role of the resizer.

View File

@ -1,156 +0,0 @@
# Copyright 2012 Mozilla Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Main toolbar buttons (tooltips and alt text for images)
previous.title=Vorige bladsy
previous_label=Vorige
next.title=Volgende bladsy
next_label=Volgende
# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
page.title=Bladsy
# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
# representing the total number of pages in the document.
of_pages=van {{pagesCount}}
# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
# will be replaced by a number representing the currently visible page,
# respectively a number representing the total number of pages in the document.
page_of_pages=({{pageNumber}} van {{pagesCount}})
zoom_out.title=Zoem uit
zoom_out_label=Zoem uit
zoom_in.title=Zoem in
zoom_in_label=Zoem in
zoom.title=Zoem
presentation_mode.title=Wissel na voorleggingsmodus
presentation_mode_label=Voorleggingsmodus
open_file.title=Open lêer
open_file_label=Open
print.title=Druk
print_label=Druk
# Secondary toolbar and context menu
tools.title=Nutsgoed
tools_label=Nutsgoed
first_page.title=Gaan na eerste bladsy
first_page_label=Gaan na eerste bladsy
last_page.title=Gaan na laaste bladsy
last_page_label=Gaan na laaste bladsy
page_rotate_cw.title=Roteer kloksgewys
page_rotate_cw_label=Roteer kloksgewys
page_rotate_ccw.title=Roteer anti-kloksgewys
page_rotate_ccw_label=Roteer anti-kloksgewys
cursor_text_select_tool.title=Aktiveer gereedskap om teks te merk
cursor_text_select_tool_label=Teksmerkgereedskap
cursor_hand_tool.title=Aktiveer handjie
cursor_hand_tool_label=Handjie
# Document properties dialog box
document_properties.title=Dokumenteienskappe…
document_properties_label=Dokumenteienskappe…
document_properties_file_name=Lêernaam:
document_properties_file_size=Lêergrootte:
# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
# will be replaced by the PDF file size in kilobytes, respectively in bytes.
document_properties_kb={{size_kb}} kG ({{size_b}} grepe)
# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
# will be replaced by the PDF file size in megabytes, respectively in bytes.
document_properties_mb={{size_mb}} MG ({{size_b}} grepe)
document_properties_title=Titel:
document_properties_author=Outeur:
document_properties_subject=Onderwerp:
document_properties_keywords=Sleutelwoorde:
document_properties_creation_date=Skeppingsdatum:
document_properties_modification_date=Wysigingsdatum:
# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
# will be replaced by the creation/modification date, and time, of the PDF file.
document_properties_date_string={{date}}, {{time}}
document_properties_creator=Skepper:
document_properties_producer=PDF-vervaardiger:
document_properties_version=PDF-weergawe:
document_properties_page_count=Aantal bladsye:
document_properties_close=Sluit
print_progress_message=Berei tans dokument voor om te druk…
# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
# a numerical per cent value.
print_progress_percent={{progress}}%
print_progress_close=Kanselleer
# Tooltips and alt text for side panel toolbar buttons
# (the _label strings are alt text for the buttons, the .title strings are
# tooltips)
toggle_sidebar.title=Sypaneel aan/af
toggle_sidebar_label=Sypaneel aan/af
document_outline.title=Wys dokumentskema (dubbelklik om alle items oop/toe te vou)
document_outline_label=Dokumentoorsig
attachments.title=Wys aanhegsels
attachments_label=Aanhegsels
thumbs.title=Wys duimnaels
thumbs_label=Duimnaels
findbar.title=Soek in dokument
findbar_label=Vind
# Thumbnails panel item (tooltip and alt text for images)
# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
# number.
thumb_page_title=Bladsy {{page}}
# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
# number.
thumb_page_canvas=Duimnael van bladsy {{page}}
# Find panel button title and messages
find_input.title=Vind
find_input.placeholder=Soek in dokument…
find_previous.title=Vind die vorige voorkoms van die frase
find_previous_label=Vorige
find_next.title=Vind die volgende voorkoms van die frase
find_next_label=Volgende
find_highlight=Verlig almal
find_match_case_label=Kassensitief
find_reached_top=Bokant van dokument is bereik; gaan voort van onder af
find_reached_bottom=Einde van dokument is bereik; gaan voort van bo af
find_not_found=Frase nie gevind nie
# Predefined zoom values
page_scale_width=Bladsywydte
page_scale_fit=Pas bladsy
page_scale_auto=Outomatiese zoem
page_scale_actual=Werklike grootte
# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
# numerical scale value.
page_scale_percent={{scale}}%
loading_error='n Fout het voorgekom met die laai van die PDF.
invalid_file_error=Ongeldige of korrupte PDF-lêer.
missing_file_error=PDF-lêer is weg.
unexpected_response_error=Onverwagse antwoord van bediener.
rendering_error='n Fout het voorgekom toe die bladsy weergegee is.
# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
# "{{type}}" will be replaced with an annotation type from a list defined in
# the PDF spec (32000-1:2008 Table 169 Annotation types).
# Some common types are e.g.: "Check", "Text", "Comment", "Note"
text_annotation_type.alt=[{{type}}-annotasie]
password_label=Gee die wagwoord om dié PDF-lêer mee te open.
password_invalid=Ongeldige wagwoord. Probeer gerus weer.
password_ok=OK
password_cancel=Kanselleer
printing_not_supported=Waarskuwing: Dié blaaier ondersteun nie drukwerk ten volle nie.
printing_not_ready=Waarskuwing: Die PDF is nog nie volledig gelaai vir drukwerk nie.
web_fonts_disabled=Webfonte is gedeaktiveer: kan nie PDF-fonte wat ingebed is, gebruik nie.

257
l10n/an/viewer.ftl Normal file
View File

@ -0,0 +1,257 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
## Main toolbar buttons (tooltips and alt text for images)
pdfjs-previous-button =
.title = Pachina anterior
pdfjs-previous-button-label = Anterior
pdfjs-next-button =
.title = Pachina siguient
pdfjs-next-button-label = Siguient
# .title: Tooltip for the pageNumber input.
pdfjs-page-input =
.title = Pachina
# Variables:
# $pagesCount (Number) - the total number of pages in the document
# This string follows an input field with the number of the page currently displayed.
pdfjs-of-pages = de { $pagesCount }
# Variables:
# $pageNumber (Number) - the currently visible page
# $pagesCount (Number) - the total number of pages in the document
pdfjs-page-of-pages = ({ $pageNumber } de { $pagesCount })
pdfjs-zoom-out-button =
.title = Achiquir
pdfjs-zoom-out-button-label = Achiquir
pdfjs-zoom-in-button =
.title = Agrandir
pdfjs-zoom-in-button-label = Agrandir
pdfjs-zoom-select =
.title = Grandaria
pdfjs-presentation-mode-button =
.title = Cambear t'o modo de presentación
pdfjs-presentation-mode-button-label = Modo de presentación
pdfjs-open-file-button =
.title = Ubrir o fichero
pdfjs-open-file-button-label = Ubrir
pdfjs-print-button =
.title = Imprentar
pdfjs-print-button-label = Imprentar
## Secondary toolbar and context menu
pdfjs-tools-button =
.title = Ferramientas
pdfjs-tools-button-label = Ferramientas
pdfjs-first-page-button =
.title = Ir ta la primer pachina
pdfjs-first-page-button-label = Ir ta la primer pachina
pdfjs-last-page-button =
.title = Ir ta la zaguer pachina
pdfjs-last-page-button-label = Ir ta la zaguer pachina
pdfjs-page-rotate-cw-button =
.title = Chirar enta la dreita
pdfjs-page-rotate-cw-button-label = Chira enta la dreita
pdfjs-page-rotate-ccw-button =
.title = Chirar enta la zurda
pdfjs-page-rotate-ccw-button-label = Chirar enta la zurda
pdfjs-cursor-text-select-tool-button =
.title = Activar la ferramienta de selección de texto
pdfjs-cursor-text-select-tool-button-label = Ferramienta de selección de texto
pdfjs-cursor-hand-tool-button =
.title = Activar la ferramienta man
pdfjs-cursor-hand-tool-button-label = Ferramienta man
pdfjs-scroll-vertical-button =
.title = Usar lo desplazamiento vertical
pdfjs-scroll-vertical-button-label = Desplazamiento vertical
pdfjs-scroll-horizontal-button =
.title = Usar lo desplazamiento horizontal
pdfjs-scroll-horizontal-button-label = Desplazamiento horizontal
pdfjs-scroll-wrapped-button =
.title = Activaar lo desplazamiento contino
pdfjs-scroll-wrapped-button-label = Desplazamiento contino
pdfjs-spread-none-button =
.title = No unir vistas de pachinas
pdfjs-spread-none-button-label = Una pachina nomás
pdfjs-spread-odd-button =
.title = Mostrar vista de pachinas, con as impars a la zurda
pdfjs-spread-odd-button-label = Doble pachina, impar a la zurda
pdfjs-spread-even-button =
.title = Amostrar vista de pachinas, con as pars a la zurda
pdfjs-spread-even-button-label = Doble pachina, para a la zurda
## Document properties dialog
pdfjs-document-properties-button =
.title = Propiedatz d'o documento...
pdfjs-document-properties-button-label = Propiedatz d'o documento...
pdfjs-document-properties-file-name = Nombre de fichero:
pdfjs-document-properties-file-size = Grandaria d'o fichero:
# Variables:
# $size_kb (Number) - the PDF file size in kilobytes
# $size_b (Number) - the PDF file size in bytes
pdfjs-document-properties-kb = { $size_kb } KB ({ $size_b } bytes)
# Variables:
# $size_mb (Number) - the PDF file size in megabytes
# $size_b (Number) - the PDF file size in bytes
pdfjs-document-properties-mb = { $size_mb } MB ({ $size_b } bytes)
pdfjs-document-properties-title = Titol:
pdfjs-document-properties-author = Autor:
pdfjs-document-properties-subject = Afer:
pdfjs-document-properties-keywords = Parolas clau:
pdfjs-document-properties-creation-date = Calendata de creyación:
pdfjs-document-properties-modification-date = Calendata de modificación:
# Variables:
# $date (Date) - the creation/modification date of the PDF file
# $time (Time) - the creation/modification time of the PDF file
pdfjs-document-properties-date-string = { $date }, { $time }
pdfjs-document-properties-creator = Creyador:
pdfjs-document-properties-producer = Creyador de PDF:
pdfjs-document-properties-version = Versión de PDF:
pdfjs-document-properties-page-count = Numero de pachinas:
pdfjs-document-properties-page-size = Mida de pachina:
pdfjs-document-properties-page-size-unit-inches = pulgadas
pdfjs-document-properties-page-size-unit-millimeters = mm
pdfjs-document-properties-page-size-orientation-portrait = vertical
pdfjs-document-properties-page-size-orientation-landscape = horizontal
pdfjs-document-properties-page-size-name-a-three = A3
pdfjs-document-properties-page-size-name-a-four = A4
pdfjs-document-properties-page-size-name-letter = Carta
pdfjs-document-properties-page-size-name-legal = Legal
## Variables:
## $width (Number) - the width of the (current) page
## $height (Number) - the height of the (current) page
## $unit (String) - the unit of measurement of the (current) page
## $name (String) - the name of the (current) page
## $orientation (String) - the orientation of the (current) page
pdfjs-document-properties-page-size-dimension-string = { $width } x { $height } { $unit } { $orientation }
pdfjs-document-properties-page-size-dimension-name-string = { $width } x { $height } { $unit } { $name }, { $orientation }
##
# The linearization status of the document; usually called "Fast Web View" in
# English locales of Adobe software.
pdfjs-document-properties-linearized = Vista web rapida:
pdfjs-document-properties-linearized-yes = Sí
pdfjs-document-properties-linearized-no = No
pdfjs-document-properties-close-button = Zarrar
## Print
pdfjs-print-progress-message = Se ye preparando la documentación pa imprentar…
# Variables:
# $progress (Number) - percent value
pdfjs-print-progress-percent = { $progress }%
pdfjs-print-progress-close-button = Cancelar
pdfjs-printing-not-supported = Pare cuenta: Iste navegador no maneya totalment as impresions.
pdfjs-printing-not-ready = Aviso: Encara no se ha cargau completament o PDF ta imprentar-lo.
## Tooltips and alt text for side panel toolbar buttons
pdfjs-toggle-sidebar-button =
.title = Amostrar u amagar a barra lateral
pdfjs-toggle-sidebar-notification-button =
.title = Cambiar barra lateral (lo documento contiene esquema/adchuntos/capas)
pdfjs-toggle-sidebar-button-label = Amostrar a barra lateral
pdfjs-document-outline-button =
.title = Amostrar esquema d'o documento (fer doble clic pa expandir/compactar totz los items)
pdfjs-document-outline-button-label = Esquema d'o documento
pdfjs-attachments-button =
.title = Amostrar os adchuntos
pdfjs-attachments-button-label = Adchuntos
pdfjs-layers-button =
.title = Amostrar capas (doble clic para reiniciar totas las capas a lo estau per defecto)
pdfjs-layers-button-label = Capas
pdfjs-thumbs-button =
.title = Amostrar as miniaturas
pdfjs-thumbs-button-label = Miniaturas
pdfjs-findbar-button =
.title = Trobar en o documento
pdfjs-findbar-button-label = Trobar
pdfjs-additional-layers = Capas adicionals
## Thumbnails panel item (tooltip and alt text for images)
# Variables:
# $page (Number) - the page number
pdfjs-thumb-page-title =
.title = Pachina { $page }
# Variables:
# $page (Number) - the page number
pdfjs-thumb-page-canvas =
.aria-label = Miniatura d'a pachina { $page }
## Find panel button title and messages
pdfjs-find-input =
.title = Trobar
.placeholder = Trobar en o documento…
pdfjs-find-previous-button =
.title = Trobar l'anterior coincidencia d'a frase
pdfjs-find-previous-button-label = Anterior
pdfjs-find-next-button =
.title = Trobar a siguient coincidencia d'a frase
pdfjs-find-next-button-label = Siguient
pdfjs-find-highlight-checkbox = Resaltar-lo tot
pdfjs-find-match-case-checkbox-label = Coincidencia de mayusclas/minusclas
pdfjs-find-entire-word-checkbox-label = Parolas completas
pdfjs-find-reached-top = S'ha plegau a l'inicio d'o documento, se contina dende baixo
pdfjs-find-reached-bottom = S'ha plegau a la fin d'o documento, se contina dende alto
pdfjs-find-not-found = No s'ha trobau a frase
## Predefined zoom values
pdfjs-page-scale-width = Amplaria d'a pachina
pdfjs-page-scale-fit = Achuste d'a pachina
pdfjs-page-scale-auto = Grandaria automatica
pdfjs-page-scale-actual = Grandaria actual
# Variables:
# $scale (Number) - percent value for page scale
pdfjs-page-scale-percent = { $scale }%
## PDF page
## Loading indicator messages
pdfjs-loading-error = S'ha produciu una error en cargar o PDF.
pdfjs-invalid-file-error = O PDF no ye valido u ye estorbau.
pdfjs-missing-file-error = No i ha fichero PDF.
pdfjs-unexpected-response-error = Respuesta a lo servicio inasperada.
pdfjs-rendering-error = Ha ocurriu una error en renderizar a pachina.
## Annotations
# Variables:
# $date (Date) - the modification date of the annotation
# $time (Time) - the modification time of the annotation
pdfjs-annotation-date-string = { $date }, { $time }
# .alt: This is used as a tooltip.
# Variables:
# $type (String) - an annotation type from a list defined in the PDF spec
# (32000-1:2008 Table 169 Annotation types).
# Some common types are e.g.: "Check", "Text", "Comment", "Note"
pdfjs-text-annotation-type =
.alt = [Anotación { $type }]
## Password
pdfjs-password-label = Introduzca a clau ta ubrir iste fichero PDF.
pdfjs-password-invalid = Clau invalida. Torna a intentar-lo.
pdfjs-password-ok-button = Acceptar
pdfjs-password-cancel-button = Cancelar
pdfjs-web-fonts-disabled = As fuents web son desactivadas: no se puet incrustar fichers PDF.
## Editing
## Alt-text dialog
## Editor resizers
## This is used in an aria label to help to understand the role of the resizer.

View File

@ -1,222 +0,0 @@
# Copyright 2012 Mozilla Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Main toolbar buttons (tooltips and alt text for images)
previous.title=Pachina anterior
previous_label=Anterior
next.title=Pachina siguient
next_label=Siguient
# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
page.title=Pachina
# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
# representing the total number of pages in the document.
of_pages=de {{pagesCount}}
# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
# will be replaced by a number representing the currently visible page,
# respectively a number representing the total number of pages in the document.
page_of_pages=({{pageNumber}} de {{pagesCount}})
zoom_out.title=Achiquir
zoom_out_label=Achiquir
zoom_in.title=Agrandir
zoom_in_label=Agrandir
zoom.title=Grandaria
presentation_mode.title=Cambear t'o modo de presentación
presentation_mode_label=Modo de presentación
open_file.title=Ubrir o fichero
open_file_label=Ubrir
print.title=Imprentar
print_label=Imprentar
# Secondary toolbar and context menu
tools.title=Ferramientas
tools_label=Ferramientas
first_page.title=Ir ta la primer pachina
first_page_label=Ir ta la primer pachina
last_page.title=Ir ta la zaguer pachina
last_page_label=Ir ta la zaguer pachina
page_rotate_cw.title=Chirar enta la dreita
page_rotate_cw_label=Chira enta la dreita
page_rotate_ccw.title=Chirar enta la zurda
page_rotate_ccw_label=Chirar enta la zurda
cursor_text_select_tool.title=Activar la ferramienta de selección de texto
cursor_text_select_tool_label=Ferramienta de selección de texto
cursor_hand_tool.title=Activar la ferramienta man
cursor_hand_tool_label=Ferramienta man
scroll_vertical.title=Usar lo desplazamiento vertical
scroll_vertical_label=Desplazamiento vertical
scroll_horizontal.title=Usar lo desplazamiento horizontal
scroll_horizontal_label=Desplazamiento horizontal
scroll_wrapped.title=Activaar lo desplazamiento contino
scroll_wrapped_label=Desplazamiento contino
spread_none.title=No unir vistas de pachinas
spread_none_label=Una pachina nomás
spread_odd.title=Mostrar vista de pachinas, con as impars a la zurda
spread_odd_label=Doble pachina, impar a la zurda
spread_even.title=Amostrar vista de pachinas, con as pars a la zurda
spread_even_label=Doble pachina, para a la zurda
# Document properties dialog box
document_properties.title=Propiedatz d'o documento...
document_properties_label=Propiedatz d'o documento...
document_properties_file_name=Nombre de fichero:
document_properties_file_size=Grandaria d'o fichero:
# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
# will be replaced by the PDF file size in kilobytes, respectively in bytes.
document_properties_kb={{size_kb}} KB ({{size_b}} bytes)
# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
# will be replaced by the PDF file size in megabytes, respectively in bytes.
document_properties_mb={{size_mb}} MB ({{size_b}} bytes)
document_properties_title=Titol:
document_properties_author=Autor:
document_properties_subject=Afer:
document_properties_keywords=Parolas clau:
document_properties_creation_date=Calendata de creyación:
document_properties_modification_date=Calendata de modificación:
# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
# will be replaced by the creation/modification date, and time, of the PDF file.
document_properties_date_string={{date}}, {{time}}
document_properties_creator=Creyador:
document_properties_producer=Creyador de PDF:
document_properties_version=Versión de PDF:
document_properties_page_count=Numero de pachinas:
document_properties_page_size=Mida de pachina:
document_properties_page_size_unit_inches=pulgadas
document_properties_page_size_unit_millimeters=mm
document_properties_page_size_orientation_portrait=vertical
document_properties_page_size_orientation_landscape=horizontal
document_properties_page_size_name_a3=A3
document_properties_page_size_name_a4=A4
document_properties_page_size_name_letter=Carta
document_properties_page_size_name_legal=Legal
# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
# the size, respectively their unit of measurement and orientation, of the (current) page.
document_properties_page_size_dimension_string={{width}} x {{height}} {{unit}} {{orientation}}
# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
document_properties_page_size_dimension_name_string={{width}} x {{height}} {{unit}} {{name}}, {{orientation}}
# LOCALIZATION NOTE (document_properties_linearized): The linearization status of
# the document; usually called "Fast Web View" in English locales of Adobe software.
document_properties_linearized=Vista web rapida:
document_properties_linearized_yes=
document_properties_linearized_no=No
document_properties_close=Zarrar
print_progress_message=Se ye preparando la documentación pa imprentar…
# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
# a numerical per cent value.
print_progress_percent={{progress}}%
print_progress_close=Cancelar
# Tooltips and alt text for side panel toolbar buttons
# (the _label strings are alt text for the buttons, the .title strings are
# tooltips)
toggle_sidebar.title=Amostrar u amagar a barra lateral
toggle_sidebar_notification2.title=Cambiar barra lateral (lo documento contiene esquema/adchuntos/capas)
toggle_sidebar_label=Amostrar a barra lateral
document_outline.title=Amostrar esquema d'o documento (fer doble clic pa expandir/compactar totz los items)
document_outline_label=Esquema d'o documento
attachments.title=Amostrar os adchuntos
attachments_label=Adchuntos
layers.title=Amostrar capas (doble clic para reiniciar totas las capas a lo estau per defecto)
layers_label=Capas
thumbs.title=Amostrar as miniaturas
thumbs_label=Miniaturas
findbar.title=Trobar en o documento
findbar_label=Trobar
additional_layers=Capas adicionals
# Thumbnails panel item (tooltip and alt text for images)
# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
# number.
thumb_page_title=Pachina {{page}}
# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
# number.
thumb_page_canvas=Miniatura d'a pachina {{page}}
# Find panel button title and messages
find_input.title=Trobar
find_input.placeholder=Trobar en o documento…
find_previous.title=Trobar l'anterior coincidencia d'a frase
find_previous_label=Anterior
find_next.title=Trobar a siguient coincidencia d'a frase
find_next_label=Siguient
find_highlight=Resaltar-lo tot
find_match_case_label=Coincidencia de mayusclas/minusclas
find_entire_word_label=Parolas completas
find_reached_top=S'ha plegau a l'inicio d'o documento, se contina dende baixo
find_reached_bottom=S'ha plegau a la fin d'o documento, se contina dende alto
# LOCALIZATION NOTE (find_match_count): The supported plural forms are
# [one|two|few|many|other], with [other] as the default value.
# "{{current}}" and "{{total}}" will be replaced by a number representing the
# index of the currently active find result, respectively a number representing
# the total number of matches in the document.
find_match_count={[ plural(total) ]}
find_match_count[one]={{current}} de {{total}} coincidencia
find_match_count[two]={{current}} de {{total}} coincidencias
find_match_count[few]={{current}} de {{total}} coincidencias
find_match_count[many]={{current}} de {{total}} coincidencias
find_match_count[other]={{current}} de {{total}} coincidencias
# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are
# [zero|one|two|few|many|other], with [other] as the default value.
# "{{limit}}" will be replaced by a numerical value.
find_match_count_limit={[ plural(limit) ]}
find_match_count_limit[zero]=Mas de {{limit}} coincidencias
find_match_count_limit[one]=Mas de {{limit}} coincidencias
find_match_count_limit[two]=Mas que {{limit}} coincidencias
find_match_count_limit[few]=Mas que {{limit}} coincidencias
find_match_count_limit[many]=Mas que {{limit}} coincidencias
find_match_count_limit[other]=Mas que {{limit}} coincidencias
find_not_found=No s'ha trobau a frase
# Predefined zoom values
page_scale_width=Amplaria d'a pachina
page_scale_fit=Achuste d'a pachina
page_scale_auto=Grandaria automatica
page_scale_actual=Grandaria actual
# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
# numerical scale value.
page_scale_percent={{scale}}%
loading_error=S'ha produciu una error en cargar o PDF.
invalid_file_error=O PDF no ye valido u ye estorbau.
missing_file_error=No i ha fichero PDF.
unexpected_response_error=Respuesta a lo servicio inasperada.
rendering_error=Ha ocurriu una error en renderizar a pachina.
# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be
# replaced by the modification date, and time, of the annotation.
annotation_date_string={{date}}, {{time}}
# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
# "{{type}}" will be replaced with an annotation type from a list defined in
# the PDF spec (32000-1:2008 Table 169 Annotation types).
# Some common types are e.g.: "Check", "Text", "Comment", "Note"
text_annotation_type.alt=[Anotación {{type}}]
password_label=Introduzca a clau ta ubrir iste fichero PDF.
password_invalid=Clau invalida. Torna a intentar-lo.
password_ok=Acceptar
password_cancel=Cancelar
printing_not_supported=Pare cuenta: Iste navegador no maneya totalment as impresions.
printing_not_ready=Aviso: Encara no se ha cargau completament o PDF ta imprentar-lo.
web_fonts_disabled=As fuents web son desactivadas: no se puet incrustar fichers PDF.

289
l10n/ar/viewer.ftl Normal file
View File

@ -0,0 +1,289 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
## Main toolbar buttons (tooltips and alt text for images)
pdfjs-previous-button =
.title = الصفحة السابقة
pdfjs-previous-button-label = السابقة
pdfjs-next-button =
.title = الصفحة التالية
pdfjs-next-button-label = التالية
# .title: Tooltip for the pageNumber input.
pdfjs-page-input =
.title = صفحة
# Variables:
# $pagesCount (Number) - the total number of pages in the document
# This string follows an input field with the number of the page currently displayed.
pdfjs-of-pages = من { $pagesCount }
# Variables:
# $pageNumber (Number) - the currently visible page
# $pagesCount (Number) - the total number of pages in the document
pdfjs-page-of-pages = ({ $pageNumber } من { $pagesCount })
pdfjs-zoom-out-button =
.title = بعّد
pdfjs-zoom-out-button-label = بعّد
pdfjs-zoom-in-button =
.title = قرّب
pdfjs-zoom-in-button-label = قرّب
pdfjs-zoom-select =
.title = التقريب
pdfjs-presentation-mode-button =
.title = انتقل لوضع العرض التقديمي
pdfjs-presentation-mode-button-label = وضع العرض التقديمي
pdfjs-open-file-button =
.title = افتح ملفًا
pdfjs-open-file-button-label = افتح
pdfjs-print-button =
.title = اطبع
pdfjs-print-button-label = اطبع
pdfjs-save-button =
.title = احفظ
pdfjs-save-button-label = احفظ
# Used in Firefox for Android as a tooltip for the download button (“download” is a verb).
pdfjs-download-button =
.title = نزّل
# Used in Firefox for Android as a label for the download button (“download” is a verb).
# Length of the translation matters since we are in a mobile context, with limited screen estate.
pdfjs-download-button-label = نزّل
pdfjs-bookmark-button =
.title = الصفحة الحالية (عرض URL من الصفحة الحالية)
pdfjs-bookmark-button-label = الصفحة الحالية
# Used in Firefox for Android.
pdfjs-open-in-app-button =
.title = افتح في تطبيق
# Used in Firefox for Android.
# Length of the translation matters since we are in a mobile context, with limited screen estate.
pdfjs-open-in-app-button-label = افتح في تطبيق
## Secondary toolbar and context menu
pdfjs-tools-button =
.title = الأدوات
pdfjs-tools-button-label = الأدوات
pdfjs-first-page-button =
.title = انتقل إلى الصفحة الأولى
pdfjs-first-page-button-label = انتقل إلى الصفحة الأولى
pdfjs-last-page-button =
.title = انتقل إلى الصفحة الأخيرة
pdfjs-last-page-button-label = انتقل إلى الصفحة الأخيرة
pdfjs-page-rotate-cw-button =
.title = أدر باتجاه عقارب الساعة
pdfjs-page-rotate-cw-button-label = أدر باتجاه عقارب الساعة
pdfjs-page-rotate-ccw-button =
.title = أدر بعكس اتجاه عقارب الساعة
pdfjs-page-rotate-ccw-button-label = أدر بعكس اتجاه عقارب الساعة
pdfjs-cursor-text-select-tool-button =
.title = فعّل أداة اختيار النص
pdfjs-cursor-text-select-tool-button-label = أداة اختيار النص
pdfjs-cursor-hand-tool-button =
.title = فعّل أداة اليد
pdfjs-cursor-hand-tool-button-label = أداة اليد
pdfjs-scroll-vertical-button =
.title = استخدم التمرير الرأسي
pdfjs-scroll-vertical-button-label = التمرير الرأسي
pdfjs-scroll-horizontal-button =
.title = استخدم التمرير الأفقي
pdfjs-scroll-horizontal-button-label = التمرير الأفقي
pdfjs-scroll-wrapped-button =
.title = استخدم التمرير الملتف
pdfjs-scroll-wrapped-button-label = التمرير الملتف
pdfjs-spread-none-button =
.title = لا تدمج هوامش الصفحات مع بعضها البعض
pdfjs-spread-none-button-label = بلا هوامش
pdfjs-spread-odd-button =
.title = ادمج هوامش الصفحات الفردية
pdfjs-spread-odd-button-label = هوامش الصفحات الفردية
pdfjs-spread-even-button =
.title = ادمج هوامش الصفحات الزوجية
pdfjs-spread-even-button-label = هوامش الصفحات الزوجية
## Document properties dialog
pdfjs-document-properties-button =
.title = خصائص المستند…
pdfjs-document-properties-button-label = خصائص المستند…
pdfjs-document-properties-file-name = اسم الملف:
pdfjs-document-properties-file-size = حجم الملف:
# Variables:
# $size_kb (Number) - the PDF file size in kilobytes
# $size_b (Number) - the PDF file size in bytes
pdfjs-document-properties-kb = { $size_kb } ك.بايت ({ $size_b } بايت)
# Variables:
# $size_mb (Number) - the PDF file size in megabytes
# $size_b (Number) - the PDF file size in bytes
pdfjs-document-properties-mb = { $size_mb } م.بايت ({ $size_b } بايت)
pdfjs-document-properties-title = العنوان:
pdfjs-document-properties-author = المؤلف:
pdfjs-document-properties-subject = الموضوع:
pdfjs-document-properties-keywords = الكلمات الأساسية:
pdfjs-document-properties-creation-date = تاريخ الإنشاء:
pdfjs-document-properties-modification-date = تاريخ التعديل:
# Variables:
# $date (Date) - the creation/modification date of the PDF file
# $time (Time) - the creation/modification time of the PDF file
pdfjs-document-properties-date-string = { $date }، { $time }
pdfjs-document-properties-creator = المنشئ:
pdfjs-document-properties-producer = منتج PDF:
pdfjs-document-properties-version = إصدارة PDF:
pdfjs-document-properties-page-count = عدد الصفحات:
pdfjs-document-properties-page-size = مقاس الورقة:
pdfjs-document-properties-page-size-unit-inches = بوصة
pdfjs-document-properties-page-size-unit-millimeters = ملم
pdfjs-document-properties-page-size-orientation-portrait = طوليّ
pdfjs-document-properties-page-size-orientation-landscape = عرضيّ
pdfjs-document-properties-page-size-name-a-three = A3
pdfjs-document-properties-page-size-name-a-four = A4
pdfjs-document-properties-page-size-name-letter = خطاب
pdfjs-document-properties-page-size-name-legal = قانونيّ
## Variables:
## $width (Number) - the width of the (current) page
## $height (Number) - the height of the (current) page
## $unit (String) - the unit of measurement of the (current) page
## $name (String) - the name of the (current) page
## $orientation (String) - the orientation of the (current) page
pdfjs-document-properties-page-size-dimension-string = { $width } × { $height } { $unit } ({ $orientation })
pdfjs-document-properties-page-size-dimension-name-string = { $width } × { $height } { $unit } ({ $name }، { $orientation })
##
# The linearization status of the document; usually called "Fast Web View" in
# English locales of Adobe software.
pdfjs-document-properties-linearized = العرض السريع عبر الوِب:
pdfjs-document-properties-linearized-yes = نعم
pdfjs-document-properties-linearized-no = لا
pdfjs-document-properties-close-button = أغلق
## Print
pdfjs-print-progress-message = يُحضّر المستند للطباعة…
# Variables:
# $progress (Number) - percent value
pdfjs-print-progress-percent = { $progress }٪
pdfjs-print-progress-close-button = ألغِ
pdfjs-printing-not-supported = تحذير: لا يدعم هذا المتصفح الطباعة بشكل كامل.
pdfjs-printing-not-ready = تحذير: ملف PDF لم يُحمّل كاملًا للطباعة.
## Tooltips and alt text for side panel toolbar buttons
pdfjs-toggle-sidebar-button =
.title = بدّل ظهور الشريط الجانبي
pdfjs-toggle-sidebar-notification-button =
.title = بدّل ظهور الشريط الجانبي (يحتوي المستند على مخطط أو مرفقات أو طبقات)
pdfjs-toggle-sidebar-button-label = بدّل ظهور الشريط الجانبي
pdfjs-document-outline-button =
.title = اعرض فهرس المستند (نقر مزدوج لتمديد أو تقليص كل العناصر)
pdfjs-document-outline-button-label = مخطط المستند
pdfjs-attachments-button =
.title = اعرض المرفقات
pdfjs-attachments-button-label = المُرفقات
pdfjs-layers-button =
.title = اعرض الطبقات (انقر مرتين لتصفير كل الطبقات إلى الحالة المبدئية)
pdfjs-layers-button-label = ‏‏الطبقات
pdfjs-thumbs-button =
.title = اعرض مُصغرات
pdfjs-thumbs-button-label = مُصغّرات
pdfjs-findbar-button =
.title = ابحث في المستند
pdfjs-findbar-button-label = ابحث
pdfjs-additional-layers = الطبقات الإضافية
## Thumbnails panel item (tooltip and alt text for images)
# Variables:
# $page (Number) - the page number
pdfjs-thumb-page-title =
.title = صفحة { $page }
# Variables:
# $page (Number) - the page number
pdfjs-thumb-page-canvas =
.aria-label = مصغّرة صفحة { $page }
## Find panel button title and messages
pdfjs-find-input =
.title = ابحث
.placeholder = ابحث في المستند…
pdfjs-find-previous-button =
.title = ابحث عن التّواجد السّابق للعبارة
pdfjs-find-previous-button-label = السابق
pdfjs-find-next-button =
.title = ابحث عن التّواجد التّالي للعبارة
pdfjs-find-next-button-label = التالي
pdfjs-find-highlight-checkbox = أبرِز الكل
pdfjs-find-match-case-checkbox-label = طابق حالة الأحرف
pdfjs-find-match-diacritics-checkbox-label = طابِق الحركات
pdfjs-find-entire-word-checkbox-label = كلمات كاملة
pdfjs-find-reached-top = تابعت من الأسفل بعدما وصلت إلى بداية المستند
pdfjs-find-reached-bottom = تابعت من الأعلى بعدما وصلت إلى نهاية المستند
pdfjs-find-not-found = لا وجود للعبارة
## Predefined zoom values
pdfjs-page-scale-width = عرض الصفحة
pdfjs-page-scale-fit = ملائمة الصفحة
pdfjs-page-scale-auto = تقريب تلقائي
pdfjs-page-scale-actual = الحجم الفعلي
# Variables:
# $scale (Number) - percent value for page scale
pdfjs-page-scale-percent = { $scale }٪
## PDF page
# Variables:
# $page (Number) - the page number
pdfjs-page-landmark =
.aria-label = صفحة { $page }
## Loading indicator messages
pdfjs-loading-error = حدث عطل أثناء تحميل ملف PDF.
pdfjs-invalid-file-error = ملف PDF تالف أو غير صحيح.
pdfjs-missing-file-error = ملف PDF غير موجود.
pdfjs-unexpected-response-error = استجابة خادوم غير متوقعة.
pdfjs-rendering-error = حدث خطأ أثناء عرض الصفحة.
## Annotations
# Variables:
# $date (Date) - the modification date of the annotation
# $time (Time) - the modification time of the annotation
pdfjs-annotation-date-string = { $date }، { $time }
# .alt: This is used as a tooltip.
# Variables:
# $type (String) - an annotation type from a list defined in the PDF spec
# (32000-1:2008 Table 169 Annotation types).
# Some common types are e.g.: "Check", "Text", "Comment", "Note"
pdfjs-text-annotation-type =
.alt = [تعليق { $type }]
## Password
pdfjs-password-label = أدخل لكلمة السر لفتح هذا الملف.
pdfjs-password-invalid = كلمة سر خطأ. من فضلك أعد المحاولة.
pdfjs-password-ok-button = حسنا
pdfjs-password-cancel-button = ألغِ
pdfjs-web-fonts-disabled = خطوط الوب مُعطّلة: تعذّر استخدام خطوط PDF المُضمّنة.
## Editing
## Remove button for the various kind of editor.
##
## Alt-text dialog
## Editor resizers
## This is used in an aria label to help to understand the role of the resizer.
## Color picker

View File

@ -1,224 +0,0 @@
# Copyright 2012 Mozilla Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Main toolbar buttons (tooltips and alt text for images)
previous.title=الصفحة السابقة
previous_label=السابقة
next.title=الصفحة التالية
next_label=التالية
# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
page.title=صفحة
# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
# representing the total number of pages in the document.
of_pages=من {{pagesCount}}
# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
# will be replaced by a number representing the currently visible page,
# respectively a number representing the total number of pages in the document.
page_of_pages=({{pageNumber}} من {{pagesCount}})
zoom_out.title=بعّد
zoom_out_label=بعّد
zoom_in.title=قرّب
zoom_in_label=قرّب
zoom.title=التقريب
presentation_mode.title=انتقل لوضع العرض التقديمي
presentation_mode_label=وضع العرض التقديمي
open_file.title=افتح ملفًا
open_file_label=افتح
print.title=اطبع
print_label=اطبع
# Secondary toolbar and context menu
tools.title=الأدوات
tools_label=الأدوات
first_page.title=انتقل إلى الصفحة الأولى
first_page_label=انتقل إلى الصفحة الأولى
last_page.title=انتقل إلى الصفحة الأخيرة
last_page_label=انتقل إلى الصفحة الأخيرة
page_rotate_cw.title=أدر باتجاه عقارب الساعة
page_rotate_cw_label=أدر باتجاه عقارب الساعة
page_rotate_ccw.title=أدر بعكس اتجاه عقارب الساعة
page_rotate_ccw_label=أدر بعكس اتجاه عقارب الساعة
cursor_text_select_tool.title=فعّل أداة اختيار النص
cursor_text_select_tool_label=أداة اختيار النص
cursor_hand_tool.title=فعّل أداة اليد
cursor_hand_tool_label=أداة اليد
scroll_vertical.title=استخدم التمرير الرأسي
scroll_vertical_label=التمرير الرأسي
scroll_horizontal.title=استخدم التمرير الأفقي
scroll_horizontal_label=التمرير الأفقي
scroll_wrapped.title=استخدم التمرير الملتف
scroll_wrapped_label=التمرير الملتف
spread_none.title=لا تدمج هوامش الصفحات مع بعضها البعض
spread_none_label=بلا هوامش
spread_odd.title=ادمج هوامش الصفحات الفردية
spread_odd_label=هوامش الصفحات الفردية
spread_even.title=ادمج هوامش الصفحات الزوجية
spread_even_label=هوامش الصفحات الزوجية
# Document properties dialog box
document_properties.title=خصائص المستند…
document_properties_label=خصائص المستند…
document_properties_file_name=اسم الملف:
document_properties_file_size=حجم الملف:
# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
# will be replaced by the PDF file size in kilobytes, respectively in bytes.
document_properties_kb={{size_kb}} ك.بايت ({{size_b}} بايت)
# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
# will be replaced by the PDF file size in megabytes, respectively in bytes.
document_properties_mb={{size_mb}} م.بايت ({{size_b}} بايت)
document_properties_title=العنوان:
document_properties_author=المؤلف:
document_properties_subject=الموضوع:
document_properties_keywords=الكلمات الأساسية:
document_properties_creation_date=تاريخ الإنشاء:
document_properties_modification_date=تاريخ التعديل:
# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
# will be replaced by the creation/modification date, and time, of the PDF file.
document_properties_date_string={{date}}، {{time}}
document_properties_creator=المنشئ:
document_properties_producer=منتج PDF:
document_properties_version=إصدارة PDF:
document_properties_page_count=عدد الصفحات:
document_properties_page_size=مقاس الورقة:
document_properties_page_size_unit_inches=بوصة
document_properties_page_size_unit_millimeters=ملم
document_properties_page_size_orientation_portrait=طوليّ
document_properties_page_size_orientation_landscape=عرضيّ
document_properties_page_size_name_a3=A3
document_properties_page_size_name_a4=A4
document_properties_page_size_name_letter=خطاب
document_properties_page_size_name_legal=قانونيّ
# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
# the size, respectively their unit of measurement and orientation, of the (current) page.
document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}})
# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}، {{orientation}})
# LOCALIZATION NOTE (document_properties_linearized): The linearization status of
# the document; usually called "Fast Web View" in English locales of Adobe software.
document_properties_linearized=العرض السريع عبر الوِب:
document_properties_linearized_yes=نعم
document_properties_linearized_no=لا
document_properties_close=أغلق
print_progress_message=يُحضّر المستند للطباعة…
# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
# a numerical per cent value.
print_progress_percent={{progress}}٪
print_progress_close=ألغِ
# Tooltips and alt text for side panel toolbar buttons
# (the _label strings are alt text for the buttons, the .title strings are
# tooltips)
toggle_sidebar.title=بدّل ظهور الشريط الجانبي
toggle_sidebar_notification2.title=بدّل ظهور الشريط الجانبي (يحتوي المستند على مخطط أو مرفقات أو طبقات)
toggle_sidebar_label=بدّل ظهور الشريط الجانبي
document_outline.title=اعرض فهرس المستند (نقر مزدوج لتمديد أو تقليص كل العناصر)
document_outline_label=مخطط المستند
attachments.title=اعرض المرفقات
attachments_label=المُرفقات
layers.title=اعرض الطبقات (انقر مرتين لتصفير كل الطبقات إلى الحالة المبدئية)
layers_label=‏‏الطبقات
thumbs.title=اعرض مُصغرات
thumbs_label=مُصغّرات
findbar.title=ابحث في المستند
findbar_label=ابحث
additional_layers=الطبقات الإضافية
# LOCALIZATION NOTE (page_landmark): "{{page}}" will be replaced by the page number.
page_landmark=صفحة {{page}}
# Thumbnails panel item (tooltip and alt text for images)
# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
# number.
thumb_page_title=صفحة {{page}}
# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
# number.
thumb_page_canvas=مصغّرة صفحة {{page}}
# Find panel button title and messages
find_input.title=ابحث
find_input.placeholder=ابحث في المستند…
find_previous.title=ابحث عن التّواجد السّابق للعبارة
find_previous_label=السابق
find_next.title=ابحث عن التّواجد التّالي للعبارة
find_next_label=التالي
find_highlight=أبرِز الكل
find_match_case_label=طابق حالة الأحرف
find_entire_word_label=كلمات كاملة
find_reached_top=تابعت من الأسفل بعدما وصلت إلى بداية المستند
find_reached_bottom=تابعت من الأعلى بعدما وصلت إلى نهاية المستند
# LOCALIZATION NOTE (find_match_count): The supported plural forms are
# [one|two|few|many|other], with [other] as the default value.
# "{{current}}" and "{{total}}" will be replaced by a number representing the
# index of the currently active find result, respectively a number representing
# the total number of matches in the document.
find_match_count={[ plural(total) ]}
find_match_count[one]={{current}} من أصل مطابقة واحدة
find_match_count[two]={{current}} من أصل مطابقتين
find_match_count[few]={{current}} من أصل {{total}} مطابقات
find_match_count[many]={{current}} من أصل {{total}} مطابقة
find_match_count[other]={{current}} من أصل {{total}} مطابقة
# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are
# [zero|one|two|few|many|other], with [other] as the default value.
# "{{limit}}" will be replaced by a numerical value.
find_match_count_limit={[ plural(limit) ]}
find_match_count_limit[zero]=فقط
find_match_count_limit[one]=أكثر من مطابقة واحدة
find_match_count_limit[two]=أكثر من مطابقتين
find_match_count_limit[few]=أكثر من {{limit}} مطابقات
find_match_count_limit[many]=أكثر من {{limit}} مطابقة
find_match_count_limit[other]=أكثر من {{limit}} مطابقة
find_not_found=لا وجود للعبارة
# Predefined zoom values
page_scale_width=عرض الصفحة
page_scale_fit=ملائمة الصفحة
page_scale_auto=تقريب تلقائي
page_scale_actual=الحجم الفعلي
# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
# numerical scale value.
page_scale_percent={{scale}}٪
loading_error=حدث عطل أثناء تحميل ملف PDF.
invalid_file_error=ملف PDF تالف أو غير صحيح.
missing_file_error=ملف PDF غير موجود.
unexpected_response_error=استجابة خادوم غير متوقعة.
rendering_error=حدث خطأ أثناء عرض الصفحة.
# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be
# replaced by the modification date, and time, of the annotation.
annotation_date_string={{date}}، {{time}}
# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
# "{{type}}" will be replaced with an annotation type from a list defined in
# the PDF spec (32000-1:2008 Table 169 Annotation types).
# Some common types are e.g.: "Check", "Text", "Comment", "Note"
text_annotation_type.alt=[تعليق {{type}}]
password_label=أدخل لكلمة السر لفتح هذا الملف.
password_invalid=كلمة سر خطأ. من فضلك أعد المحاولة.
password_ok=حسنا
password_cancel=ألغِ
printing_not_supported=تحذير: لا يدعم هذا المتصفح الطباعة بشكل كامل.
printing_not_ready=تحذير: ملف PDF لم يُحمّل كاملًا للطباعة.
web_fonts_disabled=خطوط الوب مُعطّلة: تعذّر استخدام خطوط PDF المُضمّنة.

201
l10n/ast/viewer.ftl Normal file
View File

@ -0,0 +1,201 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
## Main toolbar buttons (tooltips and alt text for images)
pdfjs-previous-button =
.title = Páxina anterior
pdfjs-previous-button-label = Anterior
pdfjs-next-button =
.title = Páxina siguiente
pdfjs-next-button-label = Siguiente
# .title: Tooltip for the pageNumber input.
pdfjs-page-input =
.title = Páxina
# Variables:
# $pagesCount (Number) - the total number of pages in the document
# This string follows an input field with the number of the page currently displayed.
pdfjs-of-pages = de { $pagesCount }
# Variables:
# $pageNumber (Number) - the currently visible page
# $pagesCount (Number) - the total number of pages in the document
pdfjs-page-of-pages = ({ $pageNumber } de { $pagesCount })
pdfjs-zoom-out-button =
.title = Alloñar
pdfjs-zoom-out-button-label = Alloña
pdfjs-zoom-in-button =
.title = Averar
pdfjs-zoom-in-button-label = Avera
pdfjs-zoom-select =
.title = Zoom
pdfjs-presentation-mode-button =
.title = Cambiar al mou de presentación
pdfjs-presentation-mode-button-label = Mou de presentación
pdfjs-open-file-button-label = Abrir
pdfjs-print-button =
.title = Imprentar
pdfjs-print-button-label = Imprentar
## Secondary toolbar and context menu
pdfjs-tools-button =
.title = Ferramientes
pdfjs-tools-button-label = Ferramientes
pdfjs-first-page-button-label = Dir a la primer páxina
pdfjs-last-page-button-label = Dir a la última páxina
pdfjs-page-rotate-cw-button =
.title = Voltia a la derecha
pdfjs-page-rotate-cw-button-label = Voltiar a la derecha
pdfjs-page-rotate-ccw-button =
.title = Voltia a la esquierda
pdfjs-page-rotate-ccw-button-label = Voltiar a la esquierda
pdfjs-cursor-text-select-tool-button =
.title = Activa la ferramienta d'esbilla de testu
pdfjs-cursor-text-select-tool-button-label = Ferramienta d'esbilla de testu
pdfjs-cursor-hand-tool-button =
.title = Activa la ferramienta de mano
pdfjs-cursor-hand-tool-button-label = Ferramienta de mano
pdfjs-scroll-vertical-button =
.title = Usa'l desplazamientu vertical
pdfjs-scroll-vertical-button-label = Desplazamientu vertical
pdfjs-scroll-horizontal-button =
.title = Usa'l desplazamientu horizontal
pdfjs-scroll-horizontal-button-label = Desplazamientu horizontal
pdfjs-scroll-wrapped-button =
.title = Usa'l desplazamientu continuu
pdfjs-scroll-wrapped-button-label = Desplazamientu continuu
pdfjs-spread-none-button-label = Fueyes individuales
pdfjs-spread-odd-button-label = Fueyes pares
pdfjs-spread-even-button-label = Fueyes impares
## Document properties dialog
pdfjs-document-properties-button =
.title = Propiedaes del documentu…
pdfjs-document-properties-button-label = Propiedaes del documentu…
pdfjs-document-properties-file-name = Nome del ficheru:
pdfjs-document-properties-file-size = Tamañu del ficheru:
# Variables:
# $size_kb (Number) - the PDF file size in kilobytes
# $size_b (Number) - the PDF file size in bytes
pdfjs-document-properties-kb = { $size_kb } KB ({ $size_b } bytes)
# Variables:
# $size_mb (Number) - the PDF file size in megabytes
# $size_b (Number) - the PDF file size in bytes
pdfjs-document-properties-mb = { $size_mb } MB ({ $size_b } bytes)
pdfjs-document-properties-title = Títulu:
pdfjs-document-properties-keywords = Pallabres clave:
pdfjs-document-properties-creation-date = Data de creación:
pdfjs-document-properties-modification-date = Data de modificación:
# Variables:
# $date (Date) - the creation/modification date of the PDF file
# $time (Time) - the creation/modification time of the PDF file
pdfjs-document-properties-date-string = { $date }, { $time }
pdfjs-document-properties-producer = Productor del PDF:
pdfjs-document-properties-version = Versión del PDF:
pdfjs-document-properties-page-count = Númberu de páxines:
pdfjs-document-properties-page-size = Tamañu de páxina:
pdfjs-document-properties-page-size-unit-inches = in
pdfjs-document-properties-page-size-unit-millimeters = mm
pdfjs-document-properties-page-size-orientation-portrait = vertical
pdfjs-document-properties-page-size-orientation-landscape = horizontal
pdfjs-document-properties-page-size-name-a-three = A3
pdfjs-document-properties-page-size-name-a-four = A4
## Variables:
## $width (Number) - the width of the (current) page
## $height (Number) - the height of the (current) page
## $unit (String) - the unit of measurement of the (current) page
## $name (String) - the name of the (current) page
## $orientation (String) - the orientation of the (current) page
pdfjs-document-properties-page-size-dimension-string = { $width } × { $height } { $unit } ({ $orientation })
pdfjs-document-properties-page-size-dimension-name-string = { $width } × { $height } { $unit } ({ $name }, { $orientation })
##
# The linearization status of the document; usually called "Fast Web View" in
# English locales of Adobe software.
pdfjs-document-properties-linearized = Vista web rápida:
pdfjs-document-properties-linearized-yes = Sí
pdfjs-document-properties-linearized-no = Non
pdfjs-document-properties-close-button = Zarrar
## Print
# Variables:
# $progress (Number) - percent value
pdfjs-print-progress-percent = { $progress }%
pdfjs-print-progress-close-button = Encaboxar
## Tooltips and alt text for side panel toolbar buttons
pdfjs-toggle-sidebar-button =
.title = Alternar la barra llateral
pdfjs-attachments-button =
.title = Amosar los axuntos
pdfjs-attachments-button-label = Axuntos
pdfjs-layers-button-label = Capes
pdfjs-thumbs-button =
.title = Amosar les miniatures
pdfjs-thumbs-button-label = Miniatures
pdfjs-findbar-button-label = Atopar
pdfjs-additional-layers = Capes adicionales
## Thumbnails panel item (tooltip and alt text for images)
# Variables:
# $page (Number) - the page number
pdfjs-thumb-page-title =
.title = Páxina { $page }
## Find panel button title and messages
pdfjs-find-previous-button-label = Anterior
pdfjs-find-next-button-label = Siguiente
pdfjs-find-entire-word-checkbox-label = Pallabres completes
pdfjs-find-reached-top = Algamóse'l comienzu de la páxina, síguese dende abaxo
pdfjs-find-reached-bottom = Algamóse la fin del documentu, síguese dende arriba
## Predefined zoom values
pdfjs-page-scale-auto = Zoom automáticu
pdfjs-page-scale-actual = Tamañu real
# Variables:
# $scale (Number) - percent value for page scale
pdfjs-page-scale-percent = { $scale }%
## PDF page
# Variables:
# $page (Number) - the page number
pdfjs-page-landmark =
.aria-label = Páxina { $page }
## Loading indicator messages
pdfjs-loading-error = Asocedió un fallu mentanto se cargaba'l PDF.
## Annotations
# Variables:
# $date (Date) - the modification date of the annotation
# $time (Time) - the modification time of the annotation
pdfjs-annotation-date-string = { $date }, { $time }
## Password
pdfjs-password-ok-button = Aceptar
pdfjs-password-cancel-button = Encaboxar
## Editing
## Alt-text dialog
## Editor resizers
## This is used in an aria label to help to understand the role of the resizer.

View File

@ -1,185 +0,0 @@
# Copyright 2012 Mozilla Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Main toolbar buttons (tooltips and alt text for images)
previous.title=Páxina anterior
previous_label=Anterior
next.title=Páxina siguiente
next_label=Siguiente
# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
page.title=Páxina
# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
# representing the total number of pages in the document.
of_pages=de {{pagesCount}}
# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
# will be replaced by a number representing the currently visible page,
# respectively a number representing the total number of pages in the document.
page_of_pages=({{pageNumber}} de {{pagesCount}})
zoom_out.title=Alloñar
zoom_out_label=Alloña
zoom_in.title=Averar
zoom_in_label=Avera
zoom.title=Zoom
presentation_mode.title=Cambiar al mou de presentación
presentation_mode_label=Mou de presentación
open_file_label=Abrir
print.title=Imprentar
print_label=Imprentar
# Secondary toolbar and context menu
tools.title=Ferramientes
tools_label=Ferramientes
first_page_label=Dir a la primer páxina
last_page_label=Dir a la última páxina
page_rotate_cw.title=Voltia a la derecha
page_rotate_cw_label=Voltiar a la derecha
page_rotate_ccw.title=Voltia a la esquierda
page_rotate_ccw_label=Voltiar a la esquierda
cursor_text_select_tool.title=Activa la ferramienta d'esbilla de testu
cursor_text_select_tool_label=Ferramienta d'esbilla de testu
cursor_hand_tool.title=Activa la ferramienta de mano
cursor_hand_tool_label=Ferramienta de mano
scroll_vertical.title=Usa'l desplazamientu vertical
scroll_vertical_label=Desplazamientu vertical
scroll_horizontal.title=Usa'l desplazamientu horizontal
scroll_horizontal_label=Desplazamientu horizontal
scroll_wrapped.title=Usa'l desplazamientu continuu
scroll_wrapped_label=Desplazamientu continuu
spread_none_label=Fueyes individuales
spread_odd_label=Fueyes pares
spread_even_label=Fueyes impares
# Document properties dialog box
document_properties.title=Propiedaes del documentu…
document_properties_label=Propiedaes del documentu…
document_properties_file_name=Nome del ficheru:
document_properties_file_size=Tamañu del ficheru:
# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
# will be replaced by the PDF file size in kilobytes, respectively in bytes.
document_properties_kb={{size_kb}} KB ({{size_b}} bytes)
# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
# will be replaced by the PDF file size in megabytes, respectively in bytes.
document_properties_mb={{size_mb}} MB ({{size_b}} bytes)
document_properties_title=Títulu:
document_properties_keywords=Pallabres clave:
document_properties_creation_date=Data de creación:
document_properties_modification_date=Data de modificación:
# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
# will be replaced by the creation/modification date, and time, of the PDF file.
document_properties_date_string={{date}}, {{time}}
document_properties_producer=Productor del PDF:
document_properties_version=Versión del PDF:
document_properties_page_count=Númberu de páxines:
document_properties_page_size=Tamañu de páxina:
document_properties_page_size_unit_inches=in
document_properties_page_size_unit_millimeters=mm
document_properties_page_size_orientation_portrait=vertical
document_properties_page_size_orientation_landscape=horizontal
document_properties_page_size_name_a3=A3
document_properties_page_size_name_a4=A4
# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
# the size, respectively their unit of measurement and orientation, of the (current) page.
document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}})
# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})
# LOCALIZATION NOTE (document_properties_linearized): The linearization status of
# the document; usually called "Fast Web View" in English locales of Adobe software.
document_properties_linearized=Vista web rápida:
document_properties_linearized_yes=
document_properties_linearized_no=Non
document_properties_close=Zarrar
# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
# a numerical per cent value.
print_progress_percent={{progress}}%
print_progress_close=Encaboxar
# Tooltips and alt text for side panel toolbar buttons
# (the _label strings are alt text for the buttons, the .title strings are
# tooltips)
toggle_sidebar.title=Alternar la barra llateral
attachments.title=Amosar los axuntos
attachments_label=Axuntos
layers_label=Capes
thumbs.title=Amosar les miniatures
thumbs_label=Miniatures
findbar_label=Atopar
additional_layers=Capes adicionales
# LOCALIZATION NOTE (page_landmark): "{{page}}" will be replaced by the page number.
page_landmark=Páxina {{page}}
# Thumbnails panel item (tooltip and alt text for images)
# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
# number.
thumb_page_title=Páxina {{page}}
# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
# number.
# Find panel button title and messages
find_previous_label=Anterior
find_next_label=Siguiente
find_entire_word_label=Pallabres completes
find_reached_top=Algamóse'l comienzu de la páxina, síguese dende abaxo
find_reached_bottom=Algamóse la fin del documentu, síguese dende arriba
# LOCALIZATION NOTE (find_match_count): The supported plural forms are
# [one|two|few|many|other], with [other] as the default value.
# "{{current}}" and "{{total}}" will be replaced by a number representing the
# index of the currently active find result, respectively a number representing
# the total number of matches in the document.
find_match_count[one]={{current}} de {{total}} coincidencia
find_match_count[two]={{current}} de {{total}} coincidencies
find_match_count[few]={{current}} de {{total}} coincidencies
find_match_count[many]={{current}} de {{total}} coincidencies
find_match_count[other]={{current}} de {{total}} coincidencies
# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are
# [zero|one|two|few|many|other], with [other] as the default value.
# "{{limit}}" will be replaced by a numerical value.
find_match_count_limit[zero]=Más de {{limit}} coincidencies
find_match_count_limit[one]=Más de {{limit}} coincidencia
find_match_count_limit[two]=Más de {{limit}} coincidencies
find_match_count_limit[few]=Más de {{limit}} coincidencies
find_match_count_limit[many]=Más de {{limit}} coincidencies
find_match_count_limit[other]=Más de {{limit}} coincidencies
# Predefined zoom values
page_scale_auto=Zoom automáticu
page_scale_actual=Tamañu real
# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
# numerical scale value.
page_scale_percent={{scale}}%
loading_error=Asocedió un fallu mentanto se cargaba'l PDF.
# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be
# replaced by the modification date, and time, of the annotation.
annotation_date_string={{date}}, {{time}}
# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
# "{{type}}" will be replaced with an annotation type from a list defined in
# the PDF spec (32000-1:2008 Table 169 Annotation types).
# Some common types are e.g.: "Check", "Text", "Comment", "Note"
password_ok=Aceptar
password_cancel=Encaboxar
# LOCALIZATION NOTE (unsupported_feature_signatures): Should contain the same
# exact string as in the `chrome.properties` file.

257
l10n/az/viewer.ftl Normal file
View File

@ -0,0 +1,257 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
## Main toolbar buttons (tooltips and alt text for images)
pdfjs-previous-button =
.title = Əvvəlki səhifə
pdfjs-previous-button-label = Əvvəlkini tap
pdfjs-next-button =
.title = Növbəti səhifə
pdfjs-next-button-label = İrəli
# .title: Tooltip for the pageNumber input.
pdfjs-page-input =
.title = Səhifə
# Variables:
# $pagesCount (Number) - the total number of pages in the document
# This string follows an input field with the number of the page currently displayed.
pdfjs-of-pages = / { $pagesCount }
# Variables:
# $pageNumber (Number) - the currently visible page
# $pagesCount (Number) - the total number of pages in the document
pdfjs-page-of-pages = ({ $pageNumber } / { $pagesCount })
pdfjs-zoom-out-button =
.title = Uzaqlaş
pdfjs-zoom-out-button-label = Uzaqlaş
pdfjs-zoom-in-button =
.title = Yaxınlaş
pdfjs-zoom-in-button-label = Yaxınlaş
pdfjs-zoom-select =
.title = Yaxınlaşdırma
pdfjs-presentation-mode-button =
.title = Təqdimat Rejiminə Keç
pdfjs-presentation-mode-button-label = Təqdimat Rejimi
pdfjs-open-file-button =
.title = Fayl Aç
pdfjs-open-file-button-label = Aç
pdfjs-print-button =
.title = Yazdır
pdfjs-print-button-label = Yazdır
## Secondary toolbar and context menu
pdfjs-tools-button =
.title = Alətlər
pdfjs-tools-button-label = Alətlər
pdfjs-first-page-button =
.title = İlk Səhifəyə get
pdfjs-first-page-button-label = İlk Səhifəyə get
pdfjs-last-page-button =
.title = Son Səhifəyə get
pdfjs-last-page-button-label = Son Səhifəyə get
pdfjs-page-rotate-cw-button =
.title = Saat İstiqamətində Fırlat
pdfjs-page-rotate-cw-button-label = Saat İstiqamətində Fırlat
pdfjs-page-rotate-ccw-button =
.title = Saat İstiqamətinin Əksinə Fırlat
pdfjs-page-rotate-ccw-button-label = Saat İstiqamətinin Əksinə Fırlat
pdfjs-cursor-text-select-tool-button =
.title = Yazı seçmə alətini aktivləşdir
pdfjs-cursor-text-select-tool-button-label = Yazı seçmə aləti
pdfjs-cursor-hand-tool-button =
.title = Əl alətini aktivləşdir
pdfjs-cursor-hand-tool-button-label = Əl aləti
pdfjs-scroll-vertical-button =
.title = Şaquli sürüşdürmə işlət
pdfjs-scroll-vertical-button-label = Şaquli sürüşdürmə
pdfjs-scroll-horizontal-button =
.title = Üfüqi sürüşdürmə işlət
pdfjs-scroll-horizontal-button-label = Üfüqi sürüşdürmə
pdfjs-scroll-wrapped-button =
.title = Bükülü sürüşdürmə işlət
pdfjs-scroll-wrapped-button-label = Bükülü sürüşdürmə
pdfjs-spread-none-button =
.title = Yan-yana birləşdirilmiş səhifələri işlətmə
pdfjs-spread-none-button-label = Birləşdirmə
pdfjs-spread-odd-button =
.title = Yan-yana birləşdirilmiş səhifələri tək nömrəli səhifələrdən başlat
pdfjs-spread-odd-button-label = Tək nömrəli
pdfjs-spread-even-button =
.title = Yan-yana birləşdirilmiş səhifələri cüt nömrəli səhifələrdən başlat
pdfjs-spread-even-button-label = Cüt nömrəli
## Document properties dialog
pdfjs-document-properties-button =
.title = Sənəd xüsusiyyətləri…
pdfjs-document-properties-button-label = Sənəd xüsusiyyətləri…
pdfjs-document-properties-file-name = Fayl adı:
pdfjs-document-properties-file-size = Fayl ölçüsü:
# Variables:
# $size_kb (Number) - the PDF file size in kilobytes
# $size_b (Number) - the PDF file size in bytes
pdfjs-document-properties-kb = { $size_kb } KB ({ $size_b } bayt)
# Variables:
# $size_mb (Number) - the PDF file size in megabytes
# $size_b (Number) - the PDF file size in bytes
pdfjs-document-properties-mb = { $size_mb } MB ({ $size_b } bayt)
pdfjs-document-properties-title = Başlık:
pdfjs-document-properties-author = Müəllif:
pdfjs-document-properties-subject = Mövzu:
pdfjs-document-properties-keywords = Açar sözlər:
pdfjs-document-properties-creation-date = Yaradılış Tarixi :
pdfjs-document-properties-modification-date = Dəyişdirilmə Tarixi :
# Variables:
# $date (Date) - the creation/modification date of the PDF file
# $time (Time) - the creation/modification time of the PDF file
pdfjs-document-properties-date-string = { $date }, { $time }
pdfjs-document-properties-creator = Yaradan:
pdfjs-document-properties-producer = PDF yaradıcısı:
pdfjs-document-properties-version = PDF versiyası:
pdfjs-document-properties-page-count = Səhifə sayı:
pdfjs-document-properties-page-size = Səhifə Ölçüsü:
pdfjs-document-properties-page-size-unit-inches = inç
pdfjs-document-properties-page-size-unit-millimeters = mm
pdfjs-document-properties-page-size-orientation-portrait = portret
pdfjs-document-properties-page-size-orientation-landscape = albom
pdfjs-document-properties-page-size-name-a-three = A3
pdfjs-document-properties-page-size-name-a-four = A4
pdfjs-document-properties-page-size-name-letter = Məktub
pdfjs-document-properties-page-size-name-legal = Hüquqi
## Variables:
## $width (Number) - the width of the (current) page
## $height (Number) - the height of the (current) page
## $unit (String) - the unit of measurement of the (current) page
## $name (String) - the name of the (current) page
## $orientation (String) - the orientation of the (current) page
pdfjs-document-properties-page-size-dimension-string = { $width } × { $height } { $unit } ({ $orientation })
pdfjs-document-properties-page-size-dimension-name-string = { $width } × { $height } { $unit } ({ $name }, { $orientation })
##
# The linearization status of the document; usually called "Fast Web View" in
# English locales of Adobe software.
pdfjs-document-properties-linearized = Fast Web View:
pdfjs-document-properties-linearized-yes = Bəli
pdfjs-document-properties-linearized-no = Xeyr
pdfjs-document-properties-close-button = Qapat
## Print
pdfjs-print-progress-message = Sənəd çap üçün hazırlanır…
# Variables:
# $progress (Number) - percent value
pdfjs-print-progress-percent = { $progress }%
pdfjs-print-progress-close-button = Ləğv et
pdfjs-printing-not-supported = Xəbərdarlıq: Çap bu səyyah tərəfindən tam olaraq dəstəklənmir.
pdfjs-printing-not-ready = Xəbərdarlıq: PDF çap üçün tam yüklənməyib.
## Tooltips and alt text for side panel toolbar buttons
pdfjs-toggle-sidebar-button =
.title = Yan Paneli Aç/Bağla
pdfjs-toggle-sidebar-notification-button =
.title = Yan paneli çevir (sənəddə icmal/bağlamalar/laylar mövcuddur)
pdfjs-toggle-sidebar-button-label = Yan Paneli Aç/Bağla
pdfjs-document-outline-button =
.title = Sənədin eskizini göstər (bütün bəndləri açmaq/yığmaq üçün iki dəfə klikləyin)
pdfjs-document-outline-button-label = Sənəd strukturu
pdfjs-attachments-button =
.title = Bağlamaları göstər
pdfjs-attachments-button-label = Bağlamalar
pdfjs-layers-button =
.title = Layları göstər (bütün layları ilkin halına sıfırlamaq üçün iki dəfə klikləyin)
pdfjs-layers-button-label = Laylar
pdfjs-thumbs-button =
.title = Kiçik şəkilləri göstər
pdfjs-thumbs-button-label = Kiçik şəkillər
pdfjs-findbar-button =
.title = Sənəddə Tap
pdfjs-findbar-button-label = Tap
pdfjs-additional-layers = Əlavə laylar
## Thumbnails panel item (tooltip and alt text for images)
# Variables:
# $page (Number) - the page number
pdfjs-thumb-page-title =
.title = Səhifə{ $page }
# Variables:
# $page (Number) - the page number
pdfjs-thumb-page-canvas =
.aria-label = { $page } səhifəsinin kiçik vəziyyəti
## Find panel button title and messages
pdfjs-find-input =
.title = Tap
.placeholder = Sənəddə tap…
pdfjs-find-previous-button =
.title = Bir öncəki uyğun gələn sözü tapır
pdfjs-find-previous-button-label = Geri
pdfjs-find-next-button =
.title = Bir sonrakı uyğun gələn sözü tapır
pdfjs-find-next-button-label = İrəli
pdfjs-find-highlight-checkbox = İşarələ
pdfjs-find-match-case-checkbox-label = Böyük/kiçik hərfə həssaslıq
pdfjs-find-entire-word-checkbox-label = Tam sözlər
pdfjs-find-reached-top = Sənədin yuxarısına çatdı, aşağıdan davam edir
pdfjs-find-reached-bottom = Sənədin sonuna çatdı, yuxarıdan davam edir
pdfjs-find-not-found = Uyğunlaşma tapılmadı
## Predefined zoom values
pdfjs-page-scale-width = Səhifə genişliyi
pdfjs-page-scale-fit = Səhifəni sığdır
pdfjs-page-scale-auto = Avtomatik yaxınlaşdır
pdfjs-page-scale-actual = Hazırkı Həcm
# Variables:
# $scale (Number) - percent value for page scale
pdfjs-page-scale-percent = { $scale }%
## PDF page
## Loading indicator messages
pdfjs-loading-error = PDF yüklenərkən bir səhv yarandı.
pdfjs-invalid-file-error = Səhv və ya zədələnmiş olmuş PDF fayl.
pdfjs-missing-file-error = PDF fayl yoxdur.
pdfjs-unexpected-response-error = Gözlənilməz server cavabı.
pdfjs-rendering-error = Səhifə göstərilərkən səhv yarandı.
## Annotations
# Variables:
# $date (Date) - the modification date of the annotation
# $time (Time) - the modification time of the annotation
pdfjs-annotation-date-string = { $date }, { $time }
# .alt: This is used as a tooltip.
# Variables:
# $type (String) - an annotation type from a list defined in the PDF spec
# (32000-1:2008 Table 169 Annotation types).
# Some common types are e.g.: "Check", "Text", "Comment", "Note"
pdfjs-text-annotation-type =
.alt = [{ $type } Annotasiyası]
## Password
pdfjs-password-label = Bu PDF faylı açmaq üçün parolu daxil edin.
pdfjs-password-invalid = Parol səhvdir. Bir daha yoxlayın.
pdfjs-password-ok-button = Tamam
pdfjs-password-cancel-button = Ləğv et
pdfjs-web-fonts-disabled = Web Şriftlər söndürülüb: yerləşdirilmiş PDF şriftlərini istifadə etmək mümkün deyil.
## Editing
## Alt-text dialog
## Editor resizers
## This is used in an aria label to help to understand the role of the resizer.

View File

@ -1,222 +0,0 @@
# Copyright 2012 Mozilla Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Main toolbar buttons (tooltips and alt text for images)
previous.title=Əvvəlki səhifə
previous_label=Əvvəlkini tap
next.title=Növbəti səhifə
next_label=İrəli
# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
page.title=Səhifə
# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
# representing the total number of pages in the document.
of_pages=/ {{pagesCount}}
# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
# will be replaced by a number representing the currently visible page,
# respectively a number representing the total number of pages in the document.
page_of_pages=({{pageNumber}} / {{pagesCount}})
zoom_out.title=Uzaqlaş
zoom_out_label=Uzaqlaş
zoom_in.title=Yaxınlaş
zoom_in_label=Yaxınlaş
zoom.title=Yaxınlaşdırma
presentation_mode.title=Təqdimat Rejiminə Keç
presentation_mode_label=Təqdimat Rejimi
open_file.title=Fayl Aç
open_file_label=
print.title=Yazdır
print_label=Yazdır
# Secondary toolbar and context menu
tools.title=Alətlər
tools_label=Alətlər
first_page.title=İlk Səhifəyə get
first_page_label=İlk Səhifəyə get
last_page.title=Son Səhifəyə get
last_page_label=Son Səhifəyə get
page_rotate_cw.title=Saat İstiqamətində Fırlat
page_rotate_cw_label=Saat İstiqamətində Fırlat
page_rotate_ccw.title=Saat İstiqamətinin Əksinə Fırlat
page_rotate_ccw_label=Saat İstiqamətinin Əksinə Fırlat
cursor_text_select_tool.title=Yazı seçmə alətini aktivləşdir
cursor_text_select_tool_label=Yazı seçmə aləti
cursor_hand_tool.title=Əl alətini aktivləşdir
cursor_hand_tool_label=Əl aləti
scroll_vertical.title=Şaquli sürüşdürmə işlət
scroll_vertical_label=Şaquli sürüşdürmə
scroll_horizontal.title=Üfüqi sürüşdürmə işlət
scroll_horizontal_label=Üfüqi sürüşdürmə
scroll_wrapped.title=Bükülü sürüşdürmə işlət
scroll_wrapped_label=Bükülü sürüşdürmə
spread_none.title=Yan-yana birləşdirilmiş səhifələri işlətmə
spread_none_label=Birləşdirmə
spread_odd.title=Yan-yana birləşdirilmiş səhifələri tək nömrəli səhifələrdən başlat
spread_odd_label=Tək nömrəli
spread_even.title=Yan-yana birləşdirilmiş səhifələri cüt nömrəli səhifələrdən başlat
spread_even_label=Cüt nömrəli
# Document properties dialog box
document_properties.title=Sənəd xüsusiyyətləri…
document_properties_label=Sənəd xüsusiyyətləri…
document_properties_file_name=Fayl adı:
document_properties_file_size=Fayl ölçüsü:
# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
# will be replaced by the PDF file size in kilobytes, respectively in bytes.
document_properties_kb={{size_kb}} KB ({{size_b}} bayt)
# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
# will be replaced by the PDF file size in megabytes, respectively in bytes.
document_properties_mb={{size_mb}} MB ({{size_b}} bayt)
document_properties_title=Başlık:
document_properties_author=Müəllif:
document_properties_subject=Mövzu:
document_properties_keywords=Açar sözlər:
document_properties_creation_date=Yaradılış Tarixi :
document_properties_modification_date=Dəyişdirilmə Tarixi :
# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
# will be replaced by the creation/modification date, and time, of the PDF file.
document_properties_date_string={{date}}, {{time}}
document_properties_creator=Yaradan:
document_properties_producer=PDF yaradıcısı:
document_properties_version=PDF versiyası:
document_properties_page_count=Səhifə sayı:
document_properties_page_size=Səhifə Ölçüsü:
document_properties_page_size_unit_inches=inç
document_properties_page_size_unit_millimeters=mm
document_properties_page_size_orientation_portrait=portret
document_properties_page_size_orientation_landscape=albom
document_properties_page_size_name_a3=A3
document_properties_page_size_name_a4=A4
document_properties_page_size_name_letter=Məktub
document_properties_page_size_name_legal=Hüquqi
# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
# the size, respectively their unit of measurement and orientation, of the (current) page.
document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}})
# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})
# LOCALIZATION NOTE (document_properties_linearized): The linearization status of
# the document; usually called "Fast Web View" in English locales of Adobe software.
document_properties_linearized=Fast Web View:
document_properties_linearized_yes=Bəli
document_properties_linearized_no=Xeyr
document_properties_close=Qapat
print_progress_message=Sənəd çap üçün hazırlanır…
# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
# a numerical per cent value.
print_progress_percent={{progress}}%
print_progress_close=Ləğv et
# Tooltips and alt text for side panel toolbar buttons
# (the _label strings are alt text for the buttons, the .title strings are
# tooltips)
toggle_sidebar.title=Yan Paneli Aç/Bağla
toggle_sidebar_notification2.title=Yan paneli çevir (sənəddə icmal/bağlamalar/laylar mövcuddur)
toggle_sidebar_label=Yan Paneli Aç/Bağla
document_outline.title=Sənədin eskizini göstər (bütün bəndləri açmaq/yığmaq üçün iki dəfə klikləyin)
document_outline_label=Sənəd strukturu
attachments.title=Bağlamaları göstər
attachments_label=Bağlamalar
layers.title=Layları göstər (bütün layları ilkin halına sıfırlamaq üçün iki dəfə klikləyin)
layers_label=Laylar
thumbs.title=Kiçik şəkilləri göstər
thumbs_label=Kiçik şəkillər
findbar.title=Sənəddə Tap
findbar_label=Tap
additional_layers=Əlavə laylar
# Thumbnails panel item (tooltip and alt text for images)
# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
# number.
thumb_page_title=Səhifə{{page}}
# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
# number.
thumb_page_canvas={{page}} səhifəsinin kiçik vəziyyəti
# Find panel button title and messages
find_input.title=Tap
find_input.placeholder=Sənəddə tap…
find_previous.title=Bir öncəki uyğun gələn sözü tapır
find_previous_label=Geri
find_next.title=Bir sonrakı uyğun gələn sözü tapır
find_next_label=İrəli
find_highlight=İşarələ
find_match_case_label=Böyük/kiçik hərfə həssaslıq
find_entire_word_label=Tam sözlər
find_reached_top=Sənədin yuxarısına çatdı, aşağıdan davam edir
find_reached_bottom=Sənədin sonuna çatdı, yuxarıdan davam edir
# LOCALIZATION NOTE (find_match_count): The supported plural forms are
# [one|two|few|many|other], with [other] as the default value.
# "{{current}}" and "{{total}}" will be replaced by a number representing the
# index of the currently active find result, respectively a number representing
# the total number of matches in the document.
find_match_count={[ plural(total) ]}
find_match_count[one]={{current}} / {{total}} uyğunluq
find_match_count[two]={{current}} / {{total}} uyğunluq
find_match_count[few]={{current}} / {{total}} uyğunluq
find_match_count[many]={{current}} / {{total}} uyğunluq
find_match_count[other]={{current}} / {{total}} uyğunluq
# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are
# [zero|one|two|few|many|other], with [other] as the default value.
# "{{limit}}" will be replaced by a numerical value.
find_match_count_limit={[ plural(limit) ]}
find_match_count_limit[zero]={{limit}}-dan çox uyğunluq
find_match_count_limit[one]={{limit}}-dən çox uyğunluq
find_match_count_limit[two]={{limit}}-dən çox uyğunluq
find_match_count_limit[few]={{limit}} uyğunluqdan daha çox
find_match_count_limit[many]={{limit}} uyğunluqdan daha çox
find_match_count_limit[other]={{limit}} uyğunluqdan daha çox
find_not_found=Uyğunlaşma tapılmadı
# Predefined zoom values
page_scale_width=Səhifə genişliyi
page_scale_fit=Səhifəni sığdır
page_scale_auto=Avtomatik yaxınlaşdır
page_scale_actual=Hazırkı Həcm
# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
# numerical scale value.
page_scale_percent={{scale}}%
loading_error=PDF yüklenərkən bir səhv yarandı.
invalid_file_error=Səhv və ya zədələnmiş olmuş PDF fayl.
missing_file_error=PDF fayl yoxdur.
unexpected_response_error=Gözlənilməz server cavabı.
rendering_error=Səhifə göstərilərkən səhv yarandı.
# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be
# replaced by the modification date, and time, of the annotation.
annotation_date_string={{date}}, {{time}}
# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
# "{{type}}" will be replaced with an annotation type from a list defined in
# the PDF spec (32000-1:2008 Table 169 Annotation types).
# Some common types are e.g.: "Check", "Text", "Comment", "Note"
text_annotation_type.alt=[{{type}} Annotasiyası]
password_label=Bu PDF faylı açmaq üçün parolu daxil edin.
password_invalid=Parol səhvdir. Bir daha yoxlayın.
password_ok=Tamam
password_cancel=Ləğv et
printing_not_supported=Xəbərdarlıq: Çap bu səyyah tərəfindən tam olaraq dəstəklənmir.
printing_not_ready=Xəbərdarlıq: PDF çap üçün tam yüklənməyib.
web_fonts_disabled=Web Şriftlər söndürülüb: yerləşdirilmiş PDF şriftlərini istifadə etmək mümkün deyil.

391
l10n/be/viewer.ftl Normal file
View File

@ -0,0 +1,391 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
## Main toolbar buttons (tooltips and alt text for images)
pdfjs-previous-button =
.title = Папярэдняя старонка
pdfjs-previous-button-label = Папярэдняя
pdfjs-next-button =
.title = Наступная старонка
pdfjs-next-button-label = Наступная
# .title: Tooltip for the pageNumber input.
pdfjs-page-input =
.title = Старонка
# Variables:
# $pagesCount (Number) - the total number of pages in the document
# This string follows an input field with the number of the page currently displayed.
pdfjs-of-pages = з { $pagesCount }
# Variables:
# $pageNumber (Number) - the currently visible page
# $pagesCount (Number) - the total number of pages in the document
pdfjs-page-of-pages = ({ $pageNumber } з { $pagesCount })
pdfjs-zoom-out-button =
.title = Паменшыць
pdfjs-zoom-out-button-label = Паменшыць
pdfjs-zoom-in-button =
.title = Павялічыць
pdfjs-zoom-in-button-label = Павялічыць
pdfjs-zoom-select =
.title = Павялічэнне тэксту
pdfjs-presentation-mode-button =
.title = Пераключыцца ў рэжым паказу
pdfjs-presentation-mode-button-label = Рэжым паказу
pdfjs-open-file-button =
.title = Адкрыць файл
pdfjs-open-file-button-label = Адкрыць
pdfjs-print-button =
.title = Друкаваць
pdfjs-print-button-label = Друкаваць
pdfjs-save-button =
.title = Захаваць
pdfjs-save-button-label = Захаваць
# Used in Firefox for Android as a tooltip for the download button (“download” is a verb).
pdfjs-download-button =
.title = Сцягнуць
# Used in Firefox for Android as a label for the download button (“download” is a verb).
# Length of the translation matters since we are in a mobile context, with limited screen estate.
pdfjs-download-button-label = Сцягнуць
pdfjs-bookmark-button =
.title = Дзейная старонка (паглядзець URL-адрас з дзейнай старонкі)
pdfjs-bookmark-button-label = Цяперашняя старонка
# Used in Firefox for Android.
pdfjs-open-in-app-button =
.title = Адкрыць у праграме
# Used in Firefox for Android.
# Length of the translation matters since we are in a mobile context, with limited screen estate.
pdfjs-open-in-app-button-label = Адкрыць у праграме
## Secondary toolbar and context menu
pdfjs-tools-button =
.title = Прылады
pdfjs-tools-button-label = Прылады
pdfjs-first-page-button =
.title = Перайсці на першую старонку
pdfjs-first-page-button-label = Перайсці на першую старонку
pdfjs-last-page-button =
.title = Перайсці на апошнюю старонку
pdfjs-last-page-button-label = Перайсці на апошнюю старонку
pdfjs-page-rotate-cw-button =
.title = Павярнуць па сонцу
pdfjs-page-rotate-cw-button-label = Павярнуць па сонцу
pdfjs-page-rotate-ccw-button =
.title = Павярнуць супраць сонца
pdfjs-page-rotate-ccw-button-label = Павярнуць супраць сонца
pdfjs-cursor-text-select-tool-button =
.title = Уключыць прыладу выбару тэксту
pdfjs-cursor-text-select-tool-button-label = Прылада выбару тэксту
pdfjs-cursor-hand-tool-button =
.title = Уключыць ручную прыладу
pdfjs-cursor-hand-tool-button-label = Ручная прылада
pdfjs-scroll-page-button =
.title = Выкарыстоўваць пракрутку старонкi
pdfjs-scroll-page-button-label = Пракрутка старонкi
pdfjs-scroll-vertical-button =
.title = Ужываць вертыкальную пракрутку
pdfjs-scroll-vertical-button-label = Вертыкальная пракрутка
pdfjs-scroll-horizontal-button =
.title = Ужываць гарызантальную пракрутку
pdfjs-scroll-horizontal-button-label = Гарызантальная пракрутка
pdfjs-scroll-wrapped-button =
.title = Ужываць маштабавальную пракрутку
pdfjs-scroll-wrapped-button-label = Маштабавальная пракрутка
pdfjs-spread-none-button =
.title = Не выкарыстоўваць разгорнутыя старонкі
pdfjs-spread-none-button-label = Без разгорнутых старонак
pdfjs-spread-odd-button =
.title = Разгорнутыя старонкі пачынаючы з няцотных нумароў
pdfjs-spread-odd-button-label = Няцотныя старонкі злева
pdfjs-spread-even-button =
.title = Разгорнутыя старонкі пачынаючы з цотных нумароў
pdfjs-spread-even-button-label = Цотныя старонкі злева
## Document properties dialog
pdfjs-document-properties-button =
.title = Уласцівасці дакумента…
pdfjs-document-properties-button-label = Уласцівасці дакумента…
pdfjs-document-properties-file-name = Назва файла:
pdfjs-document-properties-file-size = Памер файла:
# Variables:
# $size_kb (Number) - the PDF file size in kilobytes
# $size_b (Number) - the PDF file size in bytes
pdfjs-document-properties-kb = { $size_kb } КБ ({ $size_b } байт)
# Variables:
# $size_mb (Number) - the PDF file size in megabytes
# $size_b (Number) - the PDF file size in bytes
pdfjs-document-properties-mb = { $size_mb } МБ ({ $size_b } байт)
pdfjs-document-properties-title = Загаловак:
pdfjs-document-properties-author = Аўтар:
pdfjs-document-properties-subject = Тэма:
pdfjs-document-properties-keywords = Ключавыя словы:
pdfjs-document-properties-creation-date = Дата стварэння:
pdfjs-document-properties-modification-date = Дата змянення:
# Variables:
# $date (Date) - the creation/modification date of the PDF file
# $time (Time) - the creation/modification time of the PDF file
pdfjs-document-properties-date-string = { $date }, { $time }
pdfjs-document-properties-creator = Стваральнік:
pdfjs-document-properties-producer = Вырабнік PDF:
pdfjs-document-properties-version = Версія PDF:
pdfjs-document-properties-page-count = Колькасць старонак:
pdfjs-document-properties-page-size = Памер старонкі:
pdfjs-document-properties-page-size-unit-inches = цаляў
pdfjs-document-properties-page-size-unit-millimeters = мм
pdfjs-document-properties-page-size-orientation-portrait = кніжная
pdfjs-document-properties-page-size-orientation-landscape = альбомная
pdfjs-document-properties-page-size-name-a-three = A3
pdfjs-document-properties-page-size-name-a-four = A4
pdfjs-document-properties-page-size-name-letter = Letter
pdfjs-document-properties-page-size-name-legal = Legal
## Variables:
## $width (Number) - the width of the (current) page
## $height (Number) - the height of the (current) page
## $unit (String) - the unit of measurement of the (current) page
## $name (String) - the name of the (current) page
## $orientation (String) - the orientation of the (current) page
pdfjs-document-properties-page-size-dimension-string = { $width } × { $height } { $unit } ({ $orientation })
pdfjs-document-properties-page-size-dimension-name-string = { $width } × { $height } { $unit } ({ $name }, { $orientation })
##
# The linearization status of the document; usually called "Fast Web View" in
# English locales of Adobe software.
pdfjs-document-properties-linearized = Хуткі прагляд у Інтэрнэце:
pdfjs-document-properties-linearized-yes = Так
pdfjs-document-properties-linearized-no = Не
pdfjs-document-properties-close-button = Закрыць
## Print
pdfjs-print-progress-message = Падрыхтоўка дакумента да друку…
# Variables:
# $progress (Number) - percent value
pdfjs-print-progress-percent = { $progress }%
pdfjs-print-progress-close-button = Скасаваць
pdfjs-printing-not-supported = Папярэджанне: друк не падтрымліваецца цалкам гэтым браўзерам.
pdfjs-printing-not-ready = Увага: PDF не сцягнуты цалкам для друкавання.
## Tooltips and alt text for side panel toolbar buttons
pdfjs-toggle-sidebar-button =
.title = Паказаць/схаваць бакавую панэль
pdfjs-toggle-sidebar-notification-button =
.title = Паказаць/схаваць бакавую панэль (дакумент мае змест/укладанні/пласты)
pdfjs-toggle-sidebar-button-label = Паказаць/схаваць бакавую панэль
pdfjs-document-outline-button =
.title = Паказаць структуру дакумента (двайная пстрычка, каб разгарнуць /згарнуць усе элементы)
pdfjs-document-outline-button-label = Структура дакумента
pdfjs-attachments-button =
.title = Паказаць далучэнні
pdfjs-attachments-button-label = Далучэнні
pdfjs-layers-button =
.title = Паказаць пласты (націсніце двойчы, каб скінуць усе пласты да прадвызначанага стану)
pdfjs-layers-button-label = Пласты
pdfjs-thumbs-button =
.title = Паказ мініяцюр
pdfjs-thumbs-button-label = Мініяцюры
pdfjs-current-outline-item-button =
.title = Знайсці бягучы элемент структуры
pdfjs-current-outline-item-button-label = Бягучы элемент структуры
pdfjs-findbar-button =
.title = Пошук у дакуменце
pdfjs-findbar-button-label = Знайсці
pdfjs-additional-layers = Дадатковыя пласты
## Thumbnails panel item (tooltip and alt text for images)
# Variables:
# $page (Number) - the page number
pdfjs-thumb-page-title =
.title = Старонка { $page }
# Variables:
# $page (Number) - the page number
pdfjs-thumb-page-canvas =
.aria-label = Мініяцюра старонкі { $page }
## Find panel button title and messages
pdfjs-find-input =
.title = Шукаць
.placeholder = Шукаць у дакуменце…
pdfjs-find-previous-button =
.title = Знайсці папярэдні выпадак выразу
pdfjs-find-previous-button-label = Папярэдні
pdfjs-find-next-button =
.title = Знайсці наступны выпадак выразу
pdfjs-find-next-button-label = Наступны
pdfjs-find-highlight-checkbox = Падфарбаваць усе
pdfjs-find-match-case-checkbox-label = Адрозніваць вялікія/малыя літары
pdfjs-find-match-diacritics-checkbox-label = З улікам дыякрытык
pdfjs-find-entire-word-checkbox-label = Словы цалкам
pdfjs-find-reached-top = Дасягнуты пачатак дакумента, працяг з канца
pdfjs-find-reached-bottom = Дасягнуты канец дакумента, працяг з пачатку
# Variables:
# $current (Number) - the index of the currently active find result
# $total (Number) - the total number of matches in the document
pdfjs-find-match-count =
{ $total ->
[one] { $current } з { $total } супадзенняў
[few] { $current } з { $total } супадзенняў
*[many] { $current } з { $total } супадзенняў
}
# Variables:
# $limit (Number) - the maximum number of matches
pdfjs-find-match-count-limit =
{ $limit ->
[one] Больш за { $limit } супадзенне
[few] Больш за { $limit } супадзенні
*[many] Больш за { $limit } супадзенняў
}
pdfjs-find-not-found = Выраз не знойдзены
## Predefined zoom values
pdfjs-page-scale-width = Шырыня старонкі
pdfjs-page-scale-fit = Уцісненне старонкі
pdfjs-page-scale-auto = Аўтаматычнае павелічэнне
pdfjs-page-scale-actual = Сапраўдны памер
# Variables:
# $scale (Number) - percent value for page scale
pdfjs-page-scale-percent = { $scale }%
## PDF page
# Variables:
# $page (Number) - the page number
pdfjs-page-landmark =
.aria-label = Старонка { $page }
## Loading indicator messages
pdfjs-loading-error = Здарылася памылка ў часе загрузкі PDF.
pdfjs-invalid-file-error = Няспраўны або пашкоджаны файл PDF.
pdfjs-missing-file-error = Адсутны файл PDF.
pdfjs-unexpected-response-error = Нечаканы адказ сервера.
pdfjs-rendering-error = Здарылася памылка падчас адлюстравання старонкі.
## Annotations
# Variables:
# $date (Date) - the modification date of the annotation
# $time (Time) - the modification time of the annotation
pdfjs-annotation-date-string = { $date }, { $time }
# .alt: This is used as a tooltip.
# Variables:
# $type (String) - an annotation type from a list defined in the PDF spec
# (32000-1:2008 Table 169 Annotation types).
# Some common types are e.g.: "Check", "Text", "Comment", "Note"
pdfjs-text-annotation-type =
.alt = [{ $type } Annotation]
## Password
pdfjs-password-label = Увядзіце пароль, каб адкрыць гэты файл PDF.
pdfjs-password-invalid = Нядзейсны пароль. Паспрабуйце зноў.
pdfjs-password-ok-button = Добра
pdfjs-password-cancel-button = Скасаваць
pdfjs-web-fonts-disabled = Шрыфты Сеціва забаронены: немагчыма ўжываць укладзеныя шрыфты PDF.
## Editing
pdfjs-editor-free-text-button =
.title = Тэкст
pdfjs-editor-free-text-button-label = Тэкст
pdfjs-editor-ink-button =
.title = Маляваць
pdfjs-editor-ink-button-label = Маляваць
pdfjs-editor-stamp-button =
.title = Дадаць або змяніць выявы
pdfjs-editor-stamp-button-label = Дадаць або змяніць выявы
pdfjs-editor-highlight-button =
.title = Вылучэнне
pdfjs-editor-highlight-button-label = Вылучэнне
## Remove button for the various kind of editor.
pdfjs-editor-remove-ink-button =
.title = Выдаліць малюнак
pdfjs-editor-remove-freetext-button =
.title = Выдаліць тэкст
pdfjs-editor-remove-stamp-button =
.title = Выдаліць выяву
pdfjs-editor-remove-highlight-button =
.title = Выдаліць падфарбоўку
##
# Editor Parameters
pdfjs-editor-free-text-color-input = Колер
pdfjs-editor-free-text-size-input = Памер
pdfjs-editor-ink-color-input = Колер
pdfjs-editor-ink-thickness-input = Таўшчыня
pdfjs-editor-ink-opacity-input = Непразрыстасць
pdfjs-editor-stamp-add-image-button =
.title = Дадаць выяву
pdfjs-editor-stamp-add-image-button-label = Дадаць выяву
# This refers to the thickness of the line used for free highlighting (not bound to text)
pdfjs-editor-free-highlight-thickness-input = Таўшчыня
pdfjs-editor-free-highlight-thickness-title =
.title = Змяняць таўшчыню пры вылучэнні іншых элементаў, акрамя тэксту
pdfjs-free-text =
.aria-label = Тэкставы рэдактар
pdfjs-free-text-default-content = Пачніце набор тэксту…
pdfjs-ink =
.aria-label = Графічны рэдактар
pdfjs-ink-canvas =
.aria-label = Выява, створаная карыстальнікам
## Alt-text dialog
# Alternative text (alt text) helps when people can't see the image.
pdfjs-editor-alt-text-button-label = Альтэрнатыўны тэкст
pdfjs-editor-alt-text-edit-button-label = Змяніць альтэрнатыўны тэкст
pdfjs-editor-alt-text-dialog-label = Выберыце варыянт
pdfjs-editor-alt-text-dialog-description = Альтэрнатыўны тэкст дапамагае, калі людзі не бачаць выяву або калі яна не загружаецца.
pdfjs-editor-alt-text-add-description-label = Дадаць апісанне
pdfjs-editor-alt-text-add-description-description = Старайцеся скласці 1-2 сказы, якія апісваюць прадмет, абстаноўку або дзеянні.
pdfjs-editor-alt-text-mark-decorative-label = Пазначыць як дэкаратыўны
pdfjs-editor-alt-text-mark-decorative-description = Выкарыстоўваецца для дэкаратыўных выяваў, такіх як рамкі або вадзяныя знакі.
pdfjs-editor-alt-text-cancel-button = Скасаваць
pdfjs-editor-alt-text-save-button = Захаваць
pdfjs-editor-alt-text-decorative-tooltip = Пазначаны як дэкаратыўны
# .placeholder: This is a placeholder for the alt text input area
pdfjs-editor-alt-text-textarea =
.placeholder = Напрыклад, «Малады чалавек садзіцца за стол есці»
## Editor resizers
## This is used in an aria label to help to understand the role of the resizer.
pdfjs-editor-resizer-label-top-left = Верхні левы кут — змяніць памер
pdfjs-editor-resizer-label-top-middle = Уверсе пасярэдзіне — змяніць памер
pdfjs-editor-resizer-label-top-right = Верхні правы кут — змяніць памер
pdfjs-editor-resizer-label-middle-right = Пасярэдзіне справа — змяніць памер
pdfjs-editor-resizer-label-bottom-right = Правы ніжні кут — змяніць памер
pdfjs-editor-resizer-label-bottom-middle = Пасярэдзіне ўнізе — змяніць памер
pdfjs-editor-resizer-label-bottom-left = Левы ніжні кут — змяніць памер
pdfjs-editor-resizer-label-middle-left = Пасярэдзіне злева — змяніць памер
## Color picker
# This means "Color used to highlight text"
pdfjs-editor-highlight-colorpicker-label = Колер падфарбоўкі
pdfjs-editor-colorpicker-button =
.title = Змяніць колер
pdfjs-editor-colorpicker-dropdown =
.aria-label = Выбар колеру
pdfjs-editor-colorpicker-yellow =
.title = Жоўты
pdfjs-editor-colorpicker-green =
.title = Зялёны
pdfjs-editor-colorpicker-blue =
.title = Блакітны
pdfjs-editor-colorpicker-pink =
.title = Ружовы
pdfjs-editor-colorpicker-red =
.title = Чырвоны

View File

@ -1,270 +0,0 @@
# Copyright 2012 Mozilla Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Main toolbar buttons (tooltips and alt text for images)
previous.title=Папярэдняя старонка
previous_label=Папярэдняя
next.title=Наступная старонка
next_label=Наступная
# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
page.title=Старонка
# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
# representing the total number of pages in the document.
of_pages=з {{pagesCount}}
# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
# will be replaced by a number representing the currently visible page,
# respectively a number representing the total number of pages in the document.
page_of_pages=({{pageNumber}} з {{pagesCount}})
zoom_out.title=Паменшыць
zoom_out_label=Паменшыць
zoom_in.title=Павялічыць
zoom_in_label=Павялічыць
zoom.title=Павялічэнне тэксту
presentation_mode.title=Пераключыцца ў рэжым паказу
presentation_mode_label=Рэжым паказу
open_file.title=Адкрыць файл
open_file_label=Адкрыць
print.title=Друкаваць
print_label=Друкаваць
save.title=Захаваць
save_label=Захаваць
# LOCALIZATION NOTE (download_button.title): used in Firefox for Android as a tooltip for the download button (“download” is a verb).
download_button.title=Сцягнуць
# LOCALIZATION NOTE (download_button_label): used in Firefox for Android as a label for the download button (“download” is a verb).
# Length of the translation matters since we are in a mobile context, with limited screen estate.
download_button_label=Сцягнуць
bookmark1.title=Дзейная старонка (паглядзець URL-адрас з дзейнай старонкі)
bookmark1_label=Цяперашняя старонка
# LOCALIZATION NOTE (open_in_app.title): This string is used in Firefox for Android.
open_in_app.title=Адкрыць у праграме
# LOCALIZATION NOTE (open_in_app_label): This string is used in Firefox for Android. Length of the translation matters since we are in a mobile context, with limited screen estate.
open_in_app_label=Адкрыць у праграме
# Secondary toolbar and context menu
tools.title=Прылады
tools_label=Прылады
first_page.title=Перайсці на першую старонку
first_page_label=Перайсці на першую старонку
last_page.title=Перайсці на апошнюю старонку
last_page_label=Перайсці на апошнюю старонку
page_rotate_cw.title=Павярнуць па сонцу
page_rotate_cw_label=Павярнуць па сонцу
page_rotate_ccw.title=Павярнуць супраць сонца
page_rotate_ccw_label=Павярнуць супраць сонца
cursor_text_select_tool.title=Уключыць прыладу выбару тэксту
cursor_text_select_tool_label=Прылада выбару тэксту
cursor_hand_tool.title=Уключыць ручную прыладу
cursor_hand_tool_label=Ручная прылада
scroll_page.title=Выкарыстоўваць пракрутку старонкi
scroll_page_label=Пракрутка старонкi
scroll_vertical.title=Ужываць вертыкальную пракрутку
scroll_vertical_label=Вертыкальная пракрутка
scroll_horizontal.title=Ужываць гарызантальную пракрутку
scroll_horizontal_label=Гарызантальная пракрутка
scroll_wrapped.title=Ужываць маштабавальную пракрутку
scroll_wrapped_label=Маштабавальная пракрутка
spread_none.title=Не выкарыстоўваць разгорнутыя старонкі
spread_none_label=Без разгорнутых старонак
spread_odd.title=Разгорнутыя старонкі пачынаючы з няцотных нумароў
spread_odd_label=Няцотныя старонкі злева
spread_even.title=Разгорнутыя старонкі пачынаючы з цотных нумароў
spread_even_label=Цотныя старонкі злева
# Document properties dialog box
document_properties.title=Уласцівасці дакумента…
document_properties_label=Уласцівасці дакумента…
document_properties_file_name=Назва файла:
document_properties_file_size=Памер файла:
# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
# will be replaced by the PDF file size in kilobytes, respectively in bytes.
document_properties_kb={{size_kb}} КБ ({{size_b}} байт)
# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
# will be replaced by the PDF file size in megabytes, respectively in bytes.
document_properties_mb={{size_mb}} МБ ({{size_b}} байт)
document_properties_title=Загаловак:
document_properties_author=Аўтар:
document_properties_subject=Тэма:
document_properties_keywords=Ключавыя словы:
document_properties_creation_date=Дата стварэння:
document_properties_modification_date=Дата змянення:
# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
# will be replaced by the creation/modification date, and time, of the PDF file.
document_properties_date_string={{date}}, {{time}}
document_properties_creator=Стваральнік:
document_properties_producer=Вырабнік PDF:
document_properties_version=Версія PDF:
document_properties_page_count=Колькасць старонак:
document_properties_page_size=Памер старонкі:
document_properties_page_size_unit_inches=цаляў
document_properties_page_size_unit_millimeters=мм
document_properties_page_size_orientation_portrait=кніжная
document_properties_page_size_orientation_landscape=альбомная
document_properties_page_size_name_a3=A3
document_properties_page_size_name_a4=A4
document_properties_page_size_name_letter=Letter
document_properties_page_size_name_legal=Legal
# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
# the size, respectively their unit of measurement and orientation, of the (current) page.
document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}})
# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})
# LOCALIZATION NOTE (document_properties_linearized): The linearization status of
# the document; usually called "Fast Web View" in English locales of Adobe software.
document_properties_linearized=Хуткі прагляд у Інтэрнэце:
document_properties_linearized_yes=Так
document_properties_linearized_no=Не
document_properties_close=Закрыць
print_progress_message=Падрыхтоўка дакумента да друку…
# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
# a numerical per cent value.
print_progress_percent={{progress}}%
print_progress_close=Скасаваць
# Tooltips and alt text for side panel toolbar buttons
# (the _label strings are alt text for the buttons, the .title strings are
# tooltips)
toggle_sidebar.title=Паказаць/схаваць бакавую панэль
toggle_sidebar_notification2.title=Паказаць/схаваць бакавую панэль (дакумент мае змест/укладанні/пласты)
toggle_sidebar_label=Паказаць/схаваць бакавую панэль
document_outline.title=Паказаць структуру дакумента (двайная пстрычка, каб разгарнуць /згарнуць усе элементы)
document_outline_label=Структура дакумента
attachments.title=Паказаць далучэнні
attachments_label=Далучэнні
layers.title=Паказаць пласты (націсніце двойчы, каб скінуць усе пласты да прадвызначанага стану)
layers_label=Пласты
thumbs.title=Паказ мініяцюр
thumbs_label=Мініяцюры
current_outline_item.title=Знайсці бягучы элемент структуры
current_outline_item_label=Бягучы элемент структуры
findbar.title=Пошук у дакуменце
findbar_label=Знайсці
additional_layers=Дадатковыя пласты
# LOCALIZATION NOTE (page_landmark): "{{page}}" will be replaced by the page number.
page_landmark=Старонка {{page}}
# Thumbnails panel item (tooltip and alt text for images)
# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
# number.
thumb_page_title=Старонка {{page}}
# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
# number.
thumb_page_canvas=Мініяцюра старонкі {{page}}
# Find panel button title and messages
find_input.title=Шукаць
find_input.placeholder=Шукаць у дакуменце…
find_previous.title=Знайсці папярэдні выпадак выразу
find_previous_label=Папярэдні
find_next.title=Знайсці наступны выпадак выразу
find_next_label=Наступны
find_highlight=Падфарбаваць усе
find_match_case_label=Адрозніваць вялікія/малыя літары
find_match_diacritics_label=З улікам дыякрытык
find_entire_word_label=Словы цалкам
find_reached_top=Дасягнуты пачатак дакумента, працяг з канца
find_reached_bottom=Дасягнуты канец дакумента, працяг з пачатку
# LOCALIZATION NOTE (find_match_count): The supported plural forms are
# [one|two|few|many|other], with [other] as the default value.
# "{{current}}" and "{{total}}" will be replaced by a number representing the
# index of the currently active find result, respectively a number representing
# the total number of matches in the document.
find_match_count={[ plural(total) ]}
find_match_count[one]={{current}} з {{total}} супадзення
find_match_count[two]={{current}} з {{total}} супадзенняў
find_match_count[few]={{current}} з {{total}} супадзенняў
find_match_count[many]={{current}} з {{total}} супадзенняў
find_match_count[other]={{current}} з {{total}} супадзенняў
# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are
# [zero|one|two|few|many|other], with [other] as the default value.
# "{{limit}}" will be replaced by a numerical value.
find_match_count_limit={[ plural(limit) ]}
find_match_count_limit[zero]=Больш за {{limit}} супадзенняў
find_match_count_limit[one]=Больш за {{limit}} супадзенне
find_match_count_limit[two]=Больш за {{limit}} супадзенняў
find_match_count_limit[few]=Больш за {{limit}} супадзенняў
find_match_count_limit[many]=Больш за {{limit}} супадзенняў
find_match_count_limit[other]=Больш за {{limit}} супадзенняў
find_not_found=Выраз не знойдзены
# Predefined zoom values
page_scale_width=Шырыня старонкі
page_scale_fit=Уцісненне старонкі
page_scale_auto=Аўтаматычнае павелічэнне
page_scale_actual=Сапраўдны памер
# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
# numerical scale value.
page_scale_percent={{scale}}%
# Loading indicator messages
loading_error=Здарылася памылка ў часе загрузкі PDF.
invalid_file_error=Няспраўны або пашкоджаны файл PDF.
missing_file_error=Адсутны файл PDF.
unexpected_response_error=Нечаканы адказ сервера.
rendering_error=Здарылася памылка падчас адлюстравання старонкі.
# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be
# replaced by the modification date, and time, of the annotation.
annotation_date_string={{date}}, {{time}}
# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
# "{{type}}" will be replaced with an annotation type from a list defined in
# the PDF spec (32000-1:2008 Table 169 Annotation types).
# Some common types are e.g.: "Check", "Text", "Comment", "Note"
text_annotation_type.alt=[{{type}} Annotation]
password_label=Увядзіце пароль, каб адкрыць гэты файл PDF.
password_invalid=Нядзейсны пароль. Паспрабуйце зноў.
password_ok=Добра
password_cancel=Скасаваць
printing_not_supported=Папярэджанне: друк не падтрымліваецца цалкам гэтым браўзерам.
printing_not_ready=Увага: PDF не сцягнуты цалкам для друкавання.
web_fonts_disabled=Шрыфты Сеціва забаронены: немагчыма ўжываць укладзеныя шрыфты PDF.
# Editor
editor_free_text2.title=Тэкст
editor_free_text2_label=Тэкст
editor_ink2.title=Маляваць
editor_ink2_label=Маляваць
editor_stamp.title=Дадаць выяву
editor_stamp_label=Дадаць выяву
editor_stamp1.title=Дадаць або змяніць выявы
editor_stamp1_label=Дадаць або змяніць выявы
free_text2_default_content=Пачніце набор тэксту…
# Editor Parameters
editor_free_text_color=Колер
editor_free_text_size=Памер
editor_ink_color=Колер
editor_ink_thickness=Таўшчыня
editor_ink_opacity=Непразрыстасць
editor_stamp_add_image_label=Дадаць выяву
editor_stamp_add_image.title=Дадаць выяву
# Editor aria
editor_free_text2_aria_label=Тэкставы рэдактар
editor_ink2_aria_label=Графічны рэдактар
editor_ink_canvas_aria_label=Выява, створаная карыстальнікам

384
l10n/bg/viewer.ftl Normal file
View File

@ -0,0 +1,384 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
## Main toolbar buttons (tooltips and alt text for images)
pdfjs-previous-button =
.title = Предишна страница
pdfjs-previous-button-label = Предишна
pdfjs-next-button =
.title = Следваща страница
pdfjs-next-button-label = Следваща
# .title: Tooltip for the pageNumber input.
pdfjs-page-input =
.title = Страница
# Variables:
# $pagesCount (Number) - the total number of pages in the document
# This string follows an input field with the number of the page currently displayed.
pdfjs-of-pages = от { $pagesCount }
# Variables:
# $pageNumber (Number) - the currently visible page
# $pagesCount (Number) - the total number of pages in the document
pdfjs-page-of-pages = ({ $pageNumber } от { $pagesCount })
pdfjs-zoom-out-button =
.title = Намаляване
pdfjs-zoom-out-button-label = Намаляване
pdfjs-zoom-in-button =
.title = Увеличаване
pdfjs-zoom-in-button-label = Увеличаване
pdfjs-zoom-select =
.title = Мащабиране
pdfjs-presentation-mode-button =
.title = Превключване към режим на представяне
pdfjs-presentation-mode-button-label = Режим на представяне
pdfjs-open-file-button =
.title = Отваряне на файл
pdfjs-open-file-button-label = Отваряне
pdfjs-print-button =
.title = Отпечатване
pdfjs-print-button-label = Отпечатване
pdfjs-save-button =
.title = Запазване
pdfjs-save-button-label = Запазване
# Used in Firefox for Android as a tooltip for the download button (“download” is a verb).
pdfjs-download-button =
.title = Изтегляне
# Used in Firefox for Android as a label for the download button (“download” is a verb).
# Length of the translation matters since we are in a mobile context, with limited screen estate.
pdfjs-download-button-label = Изтегляне
pdfjs-bookmark-button =
.title = Текуща страница (преглед на адреса на страницата)
pdfjs-bookmark-button-label = Текуща страница
# Used in Firefox for Android.
pdfjs-open-in-app-button =
.title = Отваряне в приложение
# Used in Firefox for Android.
# Length of the translation matters since we are in a mobile context, with limited screen estate.
pdfjs-open-in-app-button-label = Отваряне в приложение
## Secondary toolbar and context menu
pdfjs-tools-button =
.title = Инструменти
pdfjs-tools-button-label = Инструменти
pdfjs-first-page-button =
.title = Към първата страница
pdfjs-first-page-button-label = Към първата страница
pdfjs-last-page-button =
.title = Към последната страница
pdfjs-last-page-button-label = Към последната страница
pdfjs-page-rotate-cw-button =
.title = Завъртане по час. стрелка
pdfjs-page-rotate-cw-button-label = Завъртане по часовниковата стрелка
pdfjs-page-rotate-ccw-button =
.title = Завъртане обратно на час. стрелка
pdfjs-page-rotate-ccw-button-label = Завъртане обратно на часовниковата стрелка
pdfjs-cursor-text-select-tool-button =
.title = Включване на инструмента за избор на текст
pdfjs-cursor-text-select-tool-button-label = Инструмент за избор на текст
pdfjs-cursor-hand-tool-button =
.title = Включване на инструмента ръка
pdfjs-cursor-hand-tool-button-label = Инструмент ръка
pdfjs-scroll-page-button =
.title = Използване на плъзгане на страници
pdfjs-scroll-page-button-label = Плъзгане на страници
pdfjs-scroll-vertical-button =
.title = Използване на вертикално плъзгане
pdfjs-scroll-vertical-button-label = Вертикално плъзгане
pdfjs-scroll-horizontal-button =
.title = Използване на хоризонтално
pdfjs-scroll-horizontal-button-label = Хоризонтално плъзгане
pdfjs-scroll-wrapped-button =
.title = Използване на мащабируемо плъзгане
pdfjs-scroll-wrapped-button-label = Мащабируемо плъзгане
pdfjs-spread-none-button =
.title = Режимът на сдвояване е изключен
pdfjs-spread-none-button-label = Без сдвояване
pdfjs-spread-odd-button =
.title = Сдвояване, започвайки от нечетните страници
pdfjs-spread-odd-button-label = Нечетните отляво
pdfjs-spread-even-button =
.title = Сдвояване, започвайки от четните страници
pdfjs-spread-even-button-label = Четните отляво
## Document properties dialog
pdfjs-document-properties-button =
.title = Свойства на документа…
pdfjs-document-properties-button-label = Свойства на документа…
pdfjs-document-properties-file-name = Име на файл:
pdfjs-document-properties-file-size = Големина на файл:
# Variables:
# $size_kb (Number) - the PDF file size in kilobytes
# $size_b (Number) - the PDF file size in bytes
pdfjs-document-properties-kb = { $size_kb } КБ ({ $size_b } байта)
# Variables:
# $size_mb (Number) - the PDF file size in megabytes
# $size_b (Number) - the PDF file size in bytes
pdfjs-document-properties-mb = { $size_mb } МБ ({ $size_b } байта)
pdfjs-document-properties-title = Заглавие:
pdfjs-document-properties-author = Автор:
pdfjs-document-properties-subject = Тема:
pdfjs-document-properties-keywords = Ключови думи:
pdfjs-document-properties-creation-date = Дата на създаване:
pdfjs-document-properties-modification-date = Дата на промяна:
# Variables:
# $date (Date) - the creation/modification date of the PDF file
# $time (Time) - the creation/modification time of the PDF file
pdfjs-document-properties-date-string = { $date }, { $time }
pdfjs-document-properties-creator = Създател:
pdfjs-document-properties-producer = PDF произведен от:
pdfjs-document-properties-version = Издание на PDF:
pdfjs-document-properties-page-count = Брой страници:
pdfjs-document-properties-page-size = Размер на страницата:
pdfjs-document-properties-page-size-unit-inches = инч
pdfjs-document-properties-page-size-unit-millimeters = мм
pdfjs-document-properties-page-size-orientation-portrait = портрет
pdfjs-document-properties-page-size-orientation-landscape = пейзаж
pdfjs-document-properties-page-size-name-a-three = A3
pdfjs-document-properties-page-size-name-a-four = A4
pdfjs-document-properties-page-size-name-letter = Letter
pdfjs-document-properties-page-size-name-legal = Правни въпроси
## Variables:
## $width (Number) - the width of the (current) page
## $height (Number) - the height of the (current) page
## $unit (String) - the unit of measurement of the (current) page
## $name (String) - the name of the (current) page
## $orientation (String) - the orientation of the (current) page
pdfjs-document-properties-page-size-dimension-string = { $width } × { $height } { $unit } ({ $orientation })
pdfjs-document-properties-page-size-dimension-name-string = { $width } × { $height } { $unit } ({ $name }, { $orientation })
##
# The linearization status of the document; usually called "Fast Web View" in
# English locales of Adobe software.
pdfjs-document-properties-linearized = Бърз преглед:
pdfjs-document-properties-linearized-yes = Да
pdfjs-document-properties-linearized-no = Не
pdfjs-document-properties-close-button = Затваряне
## Print
pdfjs-print-progress-message = Подготвяне на документа за отпечатване…
# Variables:
# $progress (Number) - percent value
pdfjs-print-progress-percent = { $progress }%
pdfjs-print-progress-close-button = Отказ
pdfjs-printing-not-supported = Внимание: Този четец няма пълна поддръжка на отпечатване.
pdfjs-printing-not-ready = Внимание: Този PDF файл не е напълно зареден за печат.
## Tooltips and alt text for side panel toolbar buttons
pdfjs-toggle-sidebar-button =
.title = Превключване на страничната лента
pdfjs-toggle-sidebar-notification-button =
.title = Превключване на страничната лента (документът има структура/прикачени файлове/слоеве)
pdfjs-toggle-sidebar-button-label = Превключване на страничната лента
pdfjs-document-outline-button =
.title = Показване на структурата на документа (двукратно щракване за свиване/разгъване на всичко)
pdfjs-document-outline-button-label = Структура на документа
pdfjs-attachments-button =
.title = Показване на притурките
pdfjs-attachments-button-label = Притурки
pdfjs-layers-button =
.title = Показване на слоевете (двукратно щракване за възстановяване на всички слоеве към състоянието по подразбиране)
pdfjs-layers-button-label = Слоеве
pdfjs-thumbs-button =
.title = Показване на миниатюрите
pdfjs-thumbs-button-label = Миниатюри
pdfjs-current-outline-item-button =
.title = Намиране на текущия елемент от структурата
pdfjs-current-outline-item-button-label = Текущ елемент от структурата
pdfjs-findbar-button =
.title = Намиране в документа
pdfjs-findbar-button-label = Търсене
pdfjs-additional-layers = Допълнителни слоеве
## Thumbnails panel item (tooltip and alt text for images)
# Variables:
# $page (Number) - the page number
pdfjs-thumb-page-title =
.title = Страница { $page }
# Variables:
# $page (Number) - the page number
pdfjs-thumb-page-canvas =
.aria-label = Миниатюра на страница { $page }
## Find panel button title and messages
pdfjs-find-input =
.title = Търсене
.placeholder = Търсене в документа…
pdfjs-find-previous-button =
.title = Намиране на предишно съвпадение на фразата
pdfjs-find-previous-button-label = Предишна
pdfjs-find-next-button =
.title = Намиране на следващо съвпадение на фразата
pdfjs-find-next-button-label = Следваща
pdfjs-find-highlight-checkbox = Открояване на всички
pdfjs-find-match-case-checkbox-label = Съвпадение на регистъра
pdfjs-find-match-diacritics-checkbox-label = Без производни букви
pdfjs-find-entire-word-checkbox-label = Цели думи
pdfjs-find-reached-top = Достигнато е началото на документа, продължаване от края
pdfjs-find-reached-bottom = Достигнат е краят на документа, продължаване от началото
# Variables:
# $current (Number) - the index of the currently active find result
# $total (Number) - the total number of matches in the document
pdfjs-find-match-count =
{ $total ->
[one] { $current } от { $total } съвпадение
*[other] { $current } от { $total } съвпадения
}
# Variables:
# $limit (Number) - the maximum number of matches
pdfjs-find-match-count-limit =
{ $limit ->
[one] Повече от { $limit } съвпадение
*[other] Повече от { $limit } съвпадения
}
pdfjs-find-not-found = Фразата не е намерена
## Predefined zoom values
pdfjs-page-scale-width = Ширина на страницата
pdfjs-page-scale-fit = Вместване в страницата
pdfjs-page-scale-auto = Автоматично мащабиране
pdfjs-page-scale-actual = Действителен размер
# Variables:
# $scale (Number) - percent value for page scale
pdfjs-page-scale-percent = { $scale }%
## PDF page
# Variables:
# $page (Number) - the page number
pdfjs-page-landmark =
.aria-label = Страница { $page }
## Loading indicator messages
pdfjs-loading-error = Получи се грешка при зареждане на PDF-а.
pdfjs-invalid-file-error = Невалиден или повреден PDF файл.
pdfjs-missing-file-error = Липсващ PDF файл.
pdfjs-unexpected-response-error = Неочакван отговор от сървъра.
pdfjs-rendering-error = Грешка при изчертаване на страницата.
## Annotations
# Variables:
# $date (Date) - the modification date of the annotation
# $time (Time) - the modification time of the annotation
pdfjs-annotation-date-string = { $date }, { $time }
# .alt: This is used as a tooltip.
# Variables:
# $type (String) - an annotation type from a list defined in the PDF spec
# (32000-1:2008 Table 169 Annotation types).
# Some common types are e.g.: "Check", "Text", "Comment", "Note"
pdfjs-text-annotation-type =
.alt = [Анотация { $type }]
## Password
pdfjs-password-label = Въведете парола за отваряне на този PDF файл.
pdfjs-password-invalid = Невалидна парола. Моля, опитайте отново.
pdfjs-password-ok-button = Добре
pdfjs-password-cancel-button = Отказ
pdfjs-web-fonts-disabled = Уеб-шрифтовете са забранени: разрешаване на използването на вградените PDF шрифтове.
## Editing
pdfjs-editor-free-text-button =
.title = Текст
pdfjs-editor-free-text-button-label = Текст
pdfjs-editor-ink-button =
.title = Рисуване
pdfjs-editor-ink-button-label = Рисуване
pdfjs-editor-stamp-button =
.title = Добавяне или променяне на изображения
pdfjs-editor-stamp-button-label = Добавяне или променяне на изображения
pdfjs-editor-remove-button =
.title = Премахване
## Remove button for the various kind of editor.
pdfjs-editor-remove-ink-button =
.title = Премахване на рисунката
pdfjs-editor-remove-freetext-button =
.title = Премахване на текста
pdfjs-editor-remove-stamp-button =
.title = Пермахване на изображението
pdfjs-editor-remove-highlight-button =
.title = Премахване на открояването
##
# Editor Parameters
pdfjs-editor-free-text-color-input = Цвят
pdfjs-editor-free-text-size-input = Размер
pdfjs-editor-ink-color-input = Цвят
pdfjs-editor-ink-thickness-input = Дебелина
pdfjs-editor-ink-opacity-input = Прозрачност
pdfjs-editor-stamp-add-image-button =
.title = Добавяне на изображение
pdfjs-editor-stamp-add-image-button-label = Добавяне на изображение
pdfjs-free-text =
.aria-label = Текстов редактор
pdfjs-free-text-default-content = Започнете да пишете…
pdfjs-ink =
.aria-label = Промяна на рисунка
pdfjs-ink-canvas =
.aria-label = Изображение, създадено от потребител
## Alt-text dialog
# Alternative text (alt text) helps when people can't see the image.
pdfjs-editor-alt-text-button-label = Алтернативен текст
pdfjs-editor-alt-text-edit-button-label = Промяна на алтернативния текст
pdfjs-editor-alt-text-dialog-label = Изберете от възможностите
pdfjs-editor-alt-text-dialog-description = Алтернативният текст помага на потребителите, когато не могат да видят изображението или то не се зарежда.
pdfjs-editor-alt-text-add-description-label = Добавяне на описание
pdfjs-editor-alt-text-add-description-description = Стремете се към 1-2 изречения, описващи предмета, настройката или действията.
pdfjs-editor-alt-text-mark-decorative-label = Отбелязване като декоративно
pdfjs-editor-alt-text-mark-decorative-description = Използва се за орнаменти или декоративни изображения, като контури и водни знаци.
pdfjs-editor-alt-text-cancel-button = Отказ
pdfjs-editor-alt-text-save-button = Запазване
pdfjs-editor-alt-text-decorative-tooltip = Отбелязване като декоративно
# .placeholder: This is a placeholder for the alt text input area
pdfjs-editor-alt-text-textarea =
.placeholder = Например, „Млад мъж седи на маса и се храни“
## Editor resizers
## This is used in an aria label to help to understand the role of the resizer.
pdfjs-editor-resizer-label-top-left = Горен ляв ъгъл — преоразмеряване
pdfjs-editor-resizer-label-top-middle = Горе в средата — преоразмеряване
pdfjs-editor-resizer-label-top-right = Горен десен ъгъл — преоразмеряване
pdfjs-editor-resizer-label-middle-right = Дясно в средата — преоразмеряване
pdfjs-editor-resizer-label-bottom-right = Долен десен ъгъл — преоразмеряване
pdfjs-editor-resizer-label-bottom-middle = Долу в средата — преоразмеряване
pdfjs-editor-resizer-label-bottom-left = Долен ляв ъгъл — преоразмеряване
pdfjs-editor-resizer-label-middle-left = Ляво в средата — преоразмеряване
## Color picker
# This means "Color used to highlight text"
pdfjs-editor-highlight-colorpicker-label = Цвят на открояване
pdfjs-editor-colorpicker-button =
.title = Промяна на цвят
pdfjs-editor-colorpicker-dropdown =
.aria-label = Избор на цвят
pdfjs-editor-colorpicker-yellow =
.title = Жълто
pdfjs-editor-colorpicker-green =
.title = Зелено
pdfjs-editor-colorpicker-blue =
.title = Синьо
pdfjs-editor-colorpicker-pink =
.title = Розово
pdfjs-editor-colorpicker-red =
.title = Червено

View File

@ -1,214 +0,0 @@
# Copyright 2012 Mozilla Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Main toolbar buttons (tooltips and alt text for images)
previous.title=Предишна страница
previous_label=Предишна
next.title=Следваща страница
next_label=Следваща
# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
page.title=Страница
# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
# representing the total number of pages in the document.
of_pages=от {{pagesCount}}
# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
# will be replaced by a number representing the currently visible page,
# respectively a number representing the total number of pages in the document.
page_of_pages=({{pageNumber}} от {{pagesCount}})
zoom_out.title=Намаляване
zoom_out_label=Намаляване
zoom_in.title=Увеличаване
zoom_in_label=Увеличаване
zoom.title=Мащабиране
presentation_mode.title=Превключване към режим на представяне
presentation_mode_label=Режим на представяне
open_file.title=Отваряне на файл
open_file_label=Отваряне
print.title=Отпечатване
print_label=Отпечатване
# Secondary toolbar and context menu
tools.title=Инструменти
tools_label=Инструменти
first_page.title=Към първата страница
first_page_label=Към първата страница
last_page.title=Към последната страница
last_page_label=Към последната страница
page_rotate_cw.title=Завъртане по час. стрелка
page_rotate_cw_label=Завъртане по часовниковата стрелка
page_rotate_ccw.title=Завъртане обратно на час. стрелка
page_rotate_ccw_label=Завъртане обратно на часовниковата стрелка
cursor_text_select_tool.title=Включване на инструмента за избор на текст
cursor_text_select_tool_label=Инструмент за избор на текст
cursor_hand_tool.title=Включване на инструмента ръка
cursor_hand_tool_label=Инструмент ръка
scroll_vertical.title=Използване на вертикално плъзгане
scroll_vertical_label=Вертикално плъзгане
scroll_horizontal.title=Използване на хоризонтално
scroll_horizontal_label=Хоризонтално плъзгане
scroll_wrapped.title=Използване на мащабируемо плъзгане
scroll_wrapped_label=Мащабируемо плъзгане
spread_none.title=Режимът на сдвояване е изключен
spread_none_label=Без сдвояване
spread_odd.title=Сдвояване, започвайки от нечетните страници
spread_odd_label=Нечетните отляво
spread_even.title=Сдвояване, започвайки от четните страници
spread_even_label=Четните отляво
# Document properties dialog box
document_properties.title=Свойства на документа…
document_properties_label=Свойства на документа…
document_properties_file_name=Име на файл:
document_properties_file_size=Големина на файл:
# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
# will be replaced by the PDF file size in kilobytes, respectively in bytes.
document_properties_kb={{size_kb}} КБ ({{size_b}} байта)
# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
# will be replaced by the PDF file size in megabytes, respectively in bytes.
document_properties_mb={{size_mb}} МБ ({{size_b}} байта)
document_properties_title=Заглавие:
document_properties_author=Автор:
document_properties_subject=Тема:
document_properties_keywords=Ключови думи:
document_properties_creation_date=Дата на създаване:
document_properties_modification_date=Дата на промяна:
# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
# will be replaced by the creation/modification date, and time, of the PDF file.
document_properties_date_string={{date}}, {{time}}
document_properties_creator=Създател:
document_properties_producer=PDF произведен от:
document_properties_version=Издание на PDF:
document_properties_page_count=Брой страници:
document_properties_page_size=Размер на страницата:
document_properties_page_size_unit_inches=инч
document_properties_page_size_unit_millimeters=мм
document_properties_page_size_orientation_portrait=портрет
document_properties_page_size_orientation_landscape=пейзаж
document_properties_page_size_name_a3=A3
document_properties_page_size_name_a4=A4
document_properties_page_size_name_letter=Letter
document_properties_page_size_name_legal=Правни въпроси
# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
# the size, respectively their unit of measurement and orientation, of the (current) page.
document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}})
# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})
# LOCALIZATION NOTE (document_properties_linearized): The linearization status of
# the document; usually called "Fast Web View" in English locales of Adobe software.
document_properties_linearized=Бърз преглед:
document_properties_linearized_yes=Да
document_properties_linearized_no=Не
document_properties_close=Затваряне
print_progress_message=Подготвяне на документа за отпечатване…
# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
# a numerical per cent value.
print_progress_percent={{progress}}%
print_progress_close=Отказ
# Tooltips and alt text for side panel toolbar buttons
# (the _label strings are alt text for the buttons, the .title strings are
# tooltips)
toggle_sidebar.title=Превключване на страничната лента
toggle_sidebar_label=Превключване на страничната лента
document_outline.title=Показване на структурата на документа (двукратно щракване за свиване/разгъване на всичко)
document_outline_label=Структура на документа
attachments.title=Показване на притурките
attachments_label=Притурки
thumbs.title=Показване на миниатюрите
thumbs_label=Миниатюри
findbar.title=Намиране в документа
findbar_label=Търсене
# Thumbnails panel item (tooltip and alt text for images)
# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
# number.
thumb_page_title=Страница {{page}}
# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
# number.
thumb_page_canvas=Миниатюра на страница {{page}}
# Find panel button title and messages
find_input.title=Търсене
find_input.placeholder=Търсене в документа…
find_previous.title=Намиране на предишно съвпадение на фразата
find_previous_label=Предишна
find_next.title=Намиране на следващо съвпадение на фразата
find_next_label=Следваща
find_highlight=Открояване на всички
find_match_case_label=Съвпадение на регистъра
find_entire_word_label=Цели думи
find_reached_top=Достигнато е началото на документа, продължаване от края
find_reached_bottom=Достигнат е краят на документа, продължаване от началото
# LOCALIZATION NOTE (find_match_count): The supported plural forms are
# [one|two|few|many|other], with [other] as the default value.
# "{{current}}" and "{{total}}" will be replaced by a number representing the
# index of the currently active find result, respectively a number representing
# the total number of matches in the document.
find_match_count={[ plural(total) ]}
find_match_count[one]={{current}} от {{total}} съвпадение
find_match_count[two]={{current}} от {{total}} съвпадения
find_match_count[few]={{current}} от {{total}} съвпадения
find_match_count[many]={{current}} от {{total}} съвпадения
find_match_count[other]={{current}} от {{total}} съвпадения
# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are
# [zero|one|two|few|many|other], with [other] as the default value.
# "{{limit}}" will be replaced by a numerical value.
find_match_count_limit={[ plural(limit) ]}
find_match_count_limit[zero]=Повече от {{limit}} съвпадения
find_match_count_limit[one]=Повече от {{limit}} съвпадение
find_match_count_limit[two]=Повече от {{limit}} съвпадения
find_match_count_limit[few]=Повече от {{limit}} съвпадения
find_match_count_limit[many]=Повече от {{limit}} съвпадения
find_match_count_limit[other]=Повече от {{limit}} съвпадения
find_not_found=Фразата не е намерена
# Predefined zoom values
page_scale_width=Ширина на страницата
page_scale_fit=Вместване в страницата
page_scale_auto=Автоматично мащабиране
page_scale_actual=Действителен размер
# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
# numerical scale value.
page_scale_percent={{scale}}%
loading_error=Получи се грешка при зареждане на PDF-а.
invalid_file_error=Невалиден или повреден PDF файл.
missing_file_error=Липсващ PDF файл.
unexpected_response_error=Неочакван отговор от сървъра.
rendering_error=Грешка при изчертаване на страницата.
# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
# "{{type}}" will be replaced with an annotation type from a list defined in
# the PDF spec (32000-1:2008 Table 169 Annotation types).
# Some common types are e.g.: "Check", "Text", "Comment", "Note"
text_annotation_type.alt=[Анотация {{type}}]
password_label=Въведете парола за отваряне на този PDF файл.
password_invalid=Невалидна парола. Моля, опитайте отново.
password_ok=Добре
password_cancel=Отказ
printing_not_supported=Внимание: Този четец няма пълна поддръжка на отпечатване.
printing_not_ready=Внимание: Този PDF файл не е напълно зареден за печат.
web_fonts_disabled=Уеб-шрифтовете са забранени: разрешаване на използването на вградените PDF шрифтове.

247
l10n/bn/viewer.ftl Normal file
View File

@ -0,0 +1,247 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
## Main toolbar buttons (tooltips and alt text for images)
pdfjs-previous-button =
.title = পূর্ববর্তী পাতা
pdfjs-previous-button-label = পূর্ববর্তী
pdfjs-next-button =
.title = পরবর্তী পাতা
pdfjs-next-button-label = পরবর্তী
# .title: Tooltip for the pageNumber input.
pdfjs-page-input =
.title = পাতা
# Variables:
# $pagesCount (Number) - the total number of pages in the document
# This string follows an input field with the number of the page currently displayed.
pdfjs-of-pages = { $pagesCount } এর
# Variables:
# $pageNumber (Number) - the currently visible page
# $pagesCount (Number) - the total number of pages in the document
pdfjs-page-of-pages = ({ $pagesCount } এর { $pageNumber })
pdfjs-zoom-out-button =
.title = ছোট আকারে প্রদর্শন
pdfjs-zoom-out-button-label = ছোট আকারে প্রদর্শন
pdfjs-zoom-in-button =
.title = বড় আকারে প্রদর্শন
pdfjs-zoom-in-button-label = বড় আকারে প্রদর্শন
pdfjs-zoom-select =
.title = বড় আকারে প্রদর্শন
pdfjs-presentation-mode-button =
.title = উপস্থাপনা মোডে স্যুইচ করুন
pdfjs-presentation-mode-button-label = উপস্থাপনা মোড
pdfjs-open-file-button =
.title = ফাইল খুলুন
pdfjs-open-file-button-label = খুলুন
pdfjs-print-button =
.title = মুদ্রণ
pdfjs-print-button-label = মুদ্রণ
## Secondary toolbar and context menu
pdfjs-tools-button =
.title = টুল
pdfjs-tools-button-label = টুল
pdfjs-first-page-button =
.title = প্রথম পাতায় যাও
pdfjs-first-page-button-label = প্রথম পাতায় যাও
pdfjs-last-page-button =
.title = শেষ পাতায় যাও
pdfjs-last-page-button-label = শেষ পাতায় যাও
pdfjs-page-rotate-cw-button =
.title = ঘড়ির কাঁটার দিকে ঘোরাও
pdfjs-page-rotate-cw-button-label = ঘড়ির কাঁটার দিকে ঘোরাও
pdfjs-page-rotate-ccw-button =
.title = ঘড়ির কাঁটার বিপরীতে ঘোরাও
pdfjs-page-rotate-ccw-button-label = ঘড়ির কাঁটার বিপরীতে ঘোরাও
pdfjs-cursor-text-select-tool-button =
.title = লেখা নির্বাচক টুল সক্রিয় করুন
pdfjs-cursor-text-select-tool-button-label = লেখা নির্বাচক টুল
pdfjs-cursor-hand-tool-button =
.title = হ্যান্ড টুল সক্রিয় করুন
pdfjs-cursor-hand-tool-button-label = হ্যান্ড টুল
pdfjs-scroll-vertical-button =
.title = উলম্ব স্ক্রলিং ব্যবহার করুন
pdfjs-scroll-vertical-button-label = উলম্ব স্ক্রলিং
pdfjs-scroll-horizontal-button =
.title = অনুভূমিক স্ক্রলিং ব্যবহার করুন
pdfjs-scroll-horizontal-button-label = অনুভূমিক স্ক্রলিং
pdfjs-scroll-wrapped-button =
.title = Wrapped স্ক্রোলিং ব্যবহার করুন
pdfjs-scroll-wrapped-button-label = Wrapped স্ক্রোলিং
pdfjs-spread-none-button =
.title = পেজ স্প্রেডগুলোতে যোগদান করবেন না
pdfjs-spread-none-button-label = Spreads নেই
pdfjs-spread-odd-button-label = বিজোড় Spreads
pdfjs-spread-even-button-label = জোড় Spreads
## Document properties dialog
pdfjs-document-properties-button =
.title = নথি বৈশিষ্ট্য…
pdfjs-document-properties-button-label = নথি বৈশিষ্ট্য…
pdfjs-document-properties-file-name = ফাইলের নাম:
pdfjs-document-properties-file-size = ফাইলের আকার:
# Variables:
# $size_kb (Number) - the PDF file size in kilobytes
# $size_b (Number) - the PDF file size in bytes
pdfjs-document-properties-kb = { $size_kb } কেবি ({ $size_b } বাইট)
# Variables:
# $size_mb (Number) - the PDF file size in megabytes
# $size_b (Number) - the PDF file size in bytes
pdfjs-document-properties-mb = { $size_mb } এমবি ({ $size_b } বাইট)
pdfjs-document-properties-title = শিরোনাম:
pdfjs-document-properties-author = লেখক:
pdfjs-document-properties-subject = বিষয়:
pdfjs-document-properties-keywords = কীওয়ার্ড:
pdfjs-document-properties-creation-date = তৈরির তারিখ:
pdfjs-document-properties-modification-date = পরিবর্তনের তারিখ:
# Variables:
# $date (Date) - the creation/modification date of the PDF file
# $time (Time) - the creation/modification time of the PDF file
pdfjs-document-properties-date-string = { $date }, { $time }
pdfjs-document-properties-creator = প্রস্তুতকারক:
pdfjs-document-properties-producer = পিডিএফ প্রস্তুতকারক:
pdfjs-document-properties-version = পিডিএফ সংষ্করণ:
pdfjs-document-properties-page-count = মোট পাতা:
pdfjs-document-properties-page-size = পাতার সাইজ:
pdfjs-document-properties-page-size-unit-inches = এর মধ্যে
pdfjs-document-properties-page-size-unit-millimeters = mm
pdfjs-document-properties-page-size-orientation-portrait = উলম্ব
pdfjs-document-properties-page-size-orientation-landscape = অনুভূমিক
pdfjs-document-properties-page-size-name-a-three = A3
pdfjs-document-properties-page-size-name-a-four = A4
pdfjs-document-properties-page-size-name-letter = লেটার
pdfjs-document-properties-page-size-name-legal = লীগাল
## Variables:
## $width (Number) - the width of the (current) page
## $height (Number) - the height of the (current) page
## $unit (String) - the unit of measurement of the (current) page
## $name (String) - the name of the (current) page
## $orientation (String) - the orientation of the (current) page
pdfjs-document-properties-page-size-dimension-string = { $width } × { $height } { $unit } ({ $orientation })
pdfjs-document-properties-page-size-dimension-name-string = { $width } × { $height } { $unit } ({ $name }, { $orientation })
##
# The linearization status of the document; usually called "Fast Web View" in
# English locales of Adobe software.
pdfjs-document-properties-linearized = Fast Web View:
pdfjs-document-properties-linearized-yes = হ্যাঁ
pdfjs-document-properties-linearized-no = না
pdfjs-document-properties-close-button = বন্ধ
## Print
pdfjs-print-progress-message = মুদ্রণের জন্য নথি প্রস্তুত করা হচ্ছে…
# Variables:
# $progress (Number) - percent value
pdfjs-print-progress-percent = { $progress }%
pdfjs-print-progress-close-button = বাতিল
pdfjs-printing-not-supported = সতর্কতা: এই ব্রাউজারে মুদ্রণ সম্পূর্ণভাবে সমর্থিত নয়।
pdfjs-printing-not-ready = সতর্কীকরণ: পিডিএফটি মুদ্রণের জন্য সম্পূর্ণ লোড হয়নি।
## Tooltips and alt text for side panel toolbar buttons
pdfjs-toggle-sidebar-button =
.title = সাইডবার টগল করুন
pdfjs-toggle-sidebar-button-label = সাইডবার টগল করুন
pdfjs-document-outline-button =
.title = নথির আউটলাইন দেখাও (সব আইটেম প্রসারিত/সঙ্কুচিত করতে ডবল ক্লিক করুন)
pdfjs-document-outline-button-label = নথির রূপরেখা
pdfjs-attachments-button =
.title = সংযুক্তি দেখাও
pdfjs-attachments-button-label = সংযুক্তি
pdfjs-thumbs-button =
.title = থাম্বনেইল সমূহ প্রদর্শন করুন
pdfjs-thumbs-button-label = থাম্বনেইল সমূহ
pdfjs-findbar-button =
.title = নথির মধ্যে খুঁজুন
pdfjs-findbar-button-label = খুঁজুন
## Thumbnails panel item (tooltip and alt text for images)
# Variables:
# $page (Number) - the page number
pdfjs-thumb-page-title =
.title = পাতা { $page }
# Variables:
# $page (Number) - the page number
pdfjs-thumb-page-canvas =
.aria-label = { $page } পাতার থাম্বনেইল
## Find panel button title and messages
pdfjs-find-input =
.title = খুঁজুন
.placeholder = নথির মধ্যে খুঁজুন…
pdfjs-find-previous-button =
.title = বাক্যাংশের পূর্ববর্তী উপস্থিতি অনুসন্ধান
pdfjs-find-previous-button-label = পূর্ববর্তী
pdfjs-find-next-button =
.title = বাক্যাংশের পরবর্তী উপস্থিতি অনুসন্ধান
pdfjs-find-next-button-label = পরবর্তী
pdfjs-find-highlight-checkbox = সব হাইলাইট করুন
pdfjs-find-match-case-checkbox-label = অক্ষরের ছাঁদ মেলানো
pdfjs-find-entire-word-checkbox-label = সম্পূর্ণ শব্দ
pdfjs-find-reached-top = পাতার শুরুতে পৌছে গেছে, নীচ থেকে আরম্ভ করা হয়েছে
pdfjs-find-reached-bottom = পাতার শেষে পৌছে গেছে, উপর থেকে আরম্ভ করা হয়েছে
pdfjs-find-not-found = বাক্যাংশ পাওয়া যায়নি
## Predefined zoom values
pdfjs-page-scale-width = পাতার প্রস্থ
pdfjs-page-scale-fit = পাতা ফিট করুন
pdfjs-page-scale-auto = স্বয়ংক্রিয় জুম
pdfjs-page-scale-actual = প্রকৃত আকার
# Variables:
# $scale (Number) - percent value for page scale
pdfjs-page-scale-percent = { $scale }%
## PDF page
## Loading indicator messages
pdfjs-loading-error = পিডিএফ লোড করার সময় ত্রুটি দেখা দিয়েছে।
pdfjs-invalid-file-error = অকার্যকর অথবা ক্ষতিগ্রস্ত পিডিএফ ফাইল।
pdfjs-missing-file-error = নিখোঁজ PDF ফাইল।
pdfjs-unexpected-response-error = অপ্রত্যাশীত সার্ভার প্রতিক্রিয়া।
pdfjs-rendering-error = পাতা উপস্থাপনার সময় ত্রুটি দেখা দিয়েছে।
## Annotations
# Variables:
# $date (Date) - the modification date of the annotation
# $time (Time) - the modification time of the annotation
pdfjs-annotation-date-string = { $date }, { $time }
# .alt: This is used as a tooltip.
# Variables:
# $type (String) - an annotation type from a list defined in the PDF spec
# (32000-1:2008 Table 169 Annotation types).
# Some common types are e.g.: "Check", "Text", "Comment", "Note"
pdfjs-text-annotation-type =
.alt = [{ $type } টীকা]
## Password
pdfjs-password-label = পিডিএফ ফাইলটি ওপেন করতে পাসওয়ার্ড দিন।
pdfjs-password-invalid = ভুল পাসওয়ার্ড। অনুগ্রহ করে আবার চেষ্টা করুন।
pdfjs-password-ok-button = ঠিক আছে
pdfjs-password-cancel-button = বাতিল
pdfjs-web-fonts-disabled = ওয়েব ফন্ট নিষ্ক্রিয়: সংযুক্ত পিডিএফ ফন্ট ব্যবহার করা যাচ্ছে না।
## Editing
## Alt-text dialog
## Editor resizers
## This is used in an aria label to help to understand the role of the resizer.

View File

@ -1,218 +0,0 @@
# Copyright 2012 Mozilla Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Main toolbar buttons (tooltips and alt text for images)
previous.title=পূর্ববর্তী পাতা
previous_label=পূর্ববর্তী
next.title=পরবর্তী পাতা
next_label=পরবর্তী
# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
page.title=পাতা
# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
# representing the total number of pages in the document.
of_pages={{pagesCount}} এর
# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
# will be replaced by a number representing the currently visible page,
# respectively a number representing the total number of pages in the document.
page_of_pages=({{pagesCount}} এর {{pageNumber}})
zoom_out.title=ছোট আকারে প্রদর্শন
zoom_out_label=ছোট আকারে প্রদর্শন
zoom_in.title=বড় আকারে প্রদর্শন
zoom_in_label=বড় আকারে প্রদর্শন
zoom.title=বড় আকারে প্রদর্শন
presentation_mode.title=উপস্থাপনা মোডে স্যুইচ করুন
presentation_mode_label=উপস্থাপনা মোড
open_file.title=ফাইল খুলুন
open_file_label=খুলুন
print.title=মুদ্রণ
print_label=মুদ্রণ
# Secondary toolbar and context menu
tools.title=টুল
tools_label=টুল
first_page.title=প্রথম পাতায় যাও
first_page_label=প্রথম পাতায় যাও
last_page.title=শেষ পাতায় যাও
last_page_label=শেষ পাতায় যাও
page_rotate_cw.title=ঘড়ির কাঁটার দিকে ঘোরাও
page_rotate_cw_label=ঘড়ির কাঁটার দিকে ঘোরাও
page_rotate_ccw.title=ঘড়ির কাঁটার বিপরীতে ঘোরাও
page_rotate_ccw_label=ঘড়ির কাঁটার বিপরীতে ঘোরাও
cursor_text_select_tool.title=লেখা নির্বাচক টুল সক্রিয় করুন
cursor_text_select_tool_label=লেখা নির্বাচক টুল
cursor_hand_tool.title=হ্যান্ড টুল সক্রিয় করুন
cursor_hand_tool_label=হ্যান্ড টুল
scroll_vertical.title=উলম্ব স্ক্রলিং ব্যবহার করুন
scroll_vertical_label=উলম্ব স্ক্রলিং
scroll_horizontal.title=অনুভূমিক স্ক্রলিং ব্যবহার করুন
scroll_horizontal_label=অনুভূমিক স্ক্রলিং
scroll_wrapped.title=Wrapped স্ক্রোলিং ব্যবহার করুন
scroll_wrapped_label=Wrapped স্ক্রোলিং
spread_none.title=পেজ স্প্রেডগুলোতে যোগদান করবেন না
spread_none_label=Spreads নেই
spread_odd_label=বিজোড় Spreads
spread_even_label=জোড় Spreads
# Document properties dialog box
document_properties.title=নথি বৈশিষ্ট্য…
document_properties_label=নথি বৈশিষ্ট্য…
document_properties_file_name=ফাইলের নাম:
document_properties_file_size=ফাইলের আকার:
# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
# will be replaced by the PDF file size in kilobytes, respectively in bytes.
document_properties_kb={{size_kb}} কেবি ({{size_b}} বাইট)
# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
# will be replaced by the PDF file size in megabytes, respectively in bytes.
document_properties_mb={{size_mb}} এমবি ({{size_b}} বাইট)
document_properties_title=শিরোনাম:
document_properties_author=লেখক:
document_properties_subject=বিষয়:
document_properties_keywords=কীওয়ার্ড:
document_properties_creation_date=তৈরির তারিখ:
document_properties_modification_date=পরিবর্তনের তারিখ:
# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
# will be replaced by the creation/modification date, and time, of the PDF file.
document_properties_date_string={{date}}, {{time}}
document_properties_creator=প্রস্তুতকারক:
document_properties_producer=পিডিএফ প্রস্তুতকারক:
document_properties_version=পিডিএফ সংষ্করণ:
document_properties_page_count=মোট পাতা:
document_properties_page_size=পাতার সাইজ:
document_properties_page_size_unit_inches=এর মধ্যে
document_properties_page_size_unit_millimeters=mm
document_properties_page_size_orientation_portrait=উলম্ব
document_properties_page_size_orientation_landscape=অনুভূমিক
document_properties_page_size_name_a3=A3
document_properties_page_size_name_a4=A4
document_properties_page_size_name_letter=লেটার
document_properties_page_size_name_legal=লীগাল
# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
# the size, respectively their unit of measurement and orientation, of the (current) page.
document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}})
# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})
# LOCALIZATION NOTE (document_properties_linearized): The linearization status of
# the document; usually called "Fast Web View" in English locales of Adobe software.
document_properties_linearized=Fast Web View:
document_properties_linearized_yes=হ্যাঁ
document_properties_linearized_no=না
document_properties_close=বন্ধ
print_progress_message=মুদ্রণের জন্য নথি প্রস্তুত করা হচ্ছে…
# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
# a numerical per cent value.
print_progress_percent={{progress}}%
print_progress_close=বাতিল
# Tooltips and alt text for side panel toolbar buttons
# (the _label strings are alt text for the buttons, the .title strings are
# tooltips)
toggle_sidebar.title=সাইডবার টগল করুন
toggle_sidebar_label=সাইডবার টগল করুন
document_outline.title=নথির আউটলাইন দেখাও (সব আইটেম প্রসারিত/সঙ্কুচিত করতে ডবল ক্লিক করুন)
document_outline_label=নথির রূপরেখা
attachments.title=সংযুক্তি দেখাও
attachments_label=সংযুক্তি
thumbs.title=থাম্বনেইল সমূহ প্রদর্শন করুন
thumbs_label=থাম্বনেইল সমূহ
findbar.title=নথির মধ্যে খুঁজুন
findbar_label=খুঁজুন
# LOCALIZATION NOTE (page_landmark): "{{page}}" will be replaced by the page number.
# Thumbnails panel item (tooltip and alt text for images)
# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
# number.
thumb_page_title=পাতা {{page}}
# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
# number.
thumb_page_canvas={{page}} পাতার থাম্বনেইল
# Find panel button title and messages
find_input.title=খুঁজুন
find_input.placeholder=নথির মধ্যে খুঁজুন…
find_previous.title=বাক্যাংশের পূর্ববর্তী উপস্থিতি অনুসন্ধান
find_previous_label=পূর্ববর্তী
find_next.title=বাক্যাংশের পরবর্তী উপস্থিতি অনুসন্ধান
find_next_label=পরবর্তী
find_highlight=সব হাইলাইট করুন
find_match_case_label=অক্ষরের ছাঁদ মেলানো
find_entire_word_label=সম্পূর্ণ শব্দ
find_reached_top=পাতার শুরুতে পৌছে গেছে, নীচ থেকে আরম্ভ করা হয়েছে
find_reached_bottom=পাতার শেষে পৌছে গেছে, উপর থেকে আরম্ভ করা হয়েছে
# LOCALIZATION NOTE (find_match_count): The supported plural forms are
# [one|two|few|many|other], with [other] as the default value.
# "{{current}}" and "{{total}}" will be replaced by a number representing the
# index of the currently active find result, respectively a number representing
# the total number of matches in the document.
find_match_count={[ plural(total) ]}
find_match_count[one]={{total}} এর {{current}} মিল
find_match_count[two]={{total}} এর {{current}} মিল
find_match_count[few]={{total}} এর {{current}} মিল
find_match_count[many]={{total}} এর {{current}} মিল
find_match_count[other]={{total}} এর {{current}} মিল
# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are
# [zero|one|two|few|many|other], with [other] as the default value.
# "{{limit}}" will be replaced by a numerical value.
find_match_count_limit={[ plural(limit) ]}
find_match_count_limit[zero]={{limit}} এর বেশি মিল
find_match_count_limit[one]={{limit}} এর বেশি মিল
find_match_count_limit[two]={{limit}} এর বেশি মিল
find_match_count_limit[few]={{limit}} এর বেশি মিল
find_match_count_limit[many]={{limit}} এর বেশি মিল
find_match_count_limit[other]={{limit}} এর বেশি মিল
find_not_found=বাক্যাংশ পাওয়া যায়নি
# Predefined zoom values
page_scale_width=পাতার প্রস্থ
page_scale_fit=পাতা ফিট করুন
page_scale_auto=স্বয়ংক্রিয় জুম
page_scale_actual=প্রকৃত আকার
# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
# numerical scale value.
page_scale_percent={{scale}}%
# Loading indicator messages
loading_error=পিডিএফ লোড করার সময় ত্রুটি দেখা দিয়েছে।
invalid_file_error=অকার্যকর অথবা ক্ষতিগ্রস্ত পিডিএফ ফাইল।
missing_file_error=নিখোঁজ PDF ফাইল।
unexpected_response_error=অপ্রত্যাশীত সার্ভার প্রতিক্রিয়া।
rendering_error=পাতা উপস্থাপনার সময় ত্রুটি দেখা দিয়েছে।
# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be
# replaced by the modification date, and time, of the annotation.
annotation_date_string={{date}}, {{time}}
# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
# "{{type}}" will be replaced with an annotation type from a list defined in
# the PDF spec (32000-1:2008 Table 169 Annotation types).
# Some common types are e.g.: "Check", "Text", "Comment", "Note"
text_annotation_type.alt=[{{type}} টীকা]
password_label=পিডিএফ ফাইলটি ওপেন করতে পাসওয়ার্ড দিন।
password_invalid=ভুল পাসওয়ার্ড। অনুগ্রহ করে আবার চেষ্টা করুন।
password_ok=ঠিক আছে
password_cancel=বাতিল
printing_not_supported=সতর্কতা: এই ব্রাউজারে মুদ্রণ সম্পূর্ণভাবে সমর্থিত নয়।
printing_not_ready=সতর্কীকরণ: পিডিএফটি মুদ্রণের জন্য সম্পূর্ণ লোড হয়নি।
web_fonts_disabled=ওয়েব ফন্ট নিষ্ক্রিয়: সংযুক্ত পিডিএফ ফন্ট ব্যবহার করা যাচ্ছে না।

247
l10n/bo/viewer.ftl Normal file
View File

@ -0,0 +1,247 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
## Main toolbar buttons (tooltips and alt text for images)
pdfjs-previous-button =
.title = དྲ་ངོས་སྔོན་མ
pdfjs-previous-button-label = སྔོན་མ
pdfjs-next-button =
.title = དྲ་ངོས་རྗེས་མ
pdfjs-next-button-label = རྗེས་མ
# .title: Tooltip for the pageNumber input.
pdfjs-page-input =
.title = ཤོག་ངོས
# Variables:
# $pagesCount (Number) - the total number of pages in the document
# This string follows an input field with the number of the page currently displayed.
pdfjs-of-pages = of { $pagesCount }
# Variables:
# $pageNumber (Number) - the currently visible page
# $pagesCount (Number) - the total number of pages in the document
pdfjs-page-of-pages = ({ $pageNumber } of { $pagesCount })
pdfjs-zoom-out-button =
.title = Zoom Out
pdfjs-zoom-out-button-label = Zoom Out
pdfjs-zoom-in-button =
.title = Zoom In
pdfjs-zoom-in-button-label = Zoom In
pdfjs-zoom-select =
.title = Zoom
pdfjs-presentation-mode-button =
.title = Switch to Presentation Mode
pdfjs-presentation-mode-button-label = Presentation Mode
pdfjs-open-file-button =
.title = Open File
pdfjs-open-file-button-label = Open
pdfjs-print-button =
.title = Print
pdfjs-print-button-label = Print
## Secondary toolbar and context menu
pdfjs-tools-button =
.title = Tools
pdfjs-tools-button-label = Tools
pdfjs-first-page-button =
.title = Go to First Page
pdfjs-first-page-button-label = Go to First Page
pdfjs-last-page-button =
.title = Go to Last Page
pdfjs-last-page-button-label = Go to Last Page
pdfjs-page-rotate-cw-button =
.title = Rotate Clockwise
pdfjs-page-rotate-cw-button-label = Rotate Clockwise
pdfjs-page-rotate-ccw-button =
.title = Rotate Counterclockwise
pdfjs-page-rotate-ccw-button-label = Rotate Counterclockwise
pdfjs-cursor-text-select-tool-button =
.title = Enable Text Selection Tool
pdfjs-cursor-text-select-tool-button-label = Text Selection Tool
pdfjs-cursor-hand-tool-button =
.title = Enable Hand Tool
pdfjs-cursor-hand-tool-button-label = Hand Tool
pdfjs-scroll-vertical-button =
.title = Use Vertical Scrolling
pdfjs-scroll-vertical-button-label = Vertical Scrolling
pdfjs-scroll-horizontal-button =
.title = Use Horizontal Scrolling
pdfjs-scroll-horizontal-button-label = Horizontal Scrolling
pdfjs-scroll-wrapped-button =
.title = Use Wrapped Scrolling
pdfjs-scroll-wrapped-button-label = Wrapped Scrolling
pdfjs-spread-none-button =
.title = Do not join page spreads
pdfjs-spread-none-button-label = No Spreads
pdfjs-spread-odd-button =
.title = Join page spreads starting with odd-numbered pages
pdfjs-spread-odd-button-label = Odd Spreads
pdfjs-spread-even-button =
.title = Join page spreads starting with even-numbered pages
pdfjs-spread-even-button-label = Even Spreads
## Document properties dialog
pdfjs-document-properties-button =
.title = Document Properties…
pdfjs-document-properties-button-label = Document Properties…
pdfjs-document-properties-file-name = File name:
pdfjs-document-properties-file-size = File size:
# Variables:
# $size_kb (Number) - the PDF file size in kilobytes
# $size_b (Number) - the PDF file size in bytes
pdfjs-document-properties-kb = { $size_kb } KB ({ $size_b } bytes)
# Variables:
# $size_mb (Number) - the PDF file size in megabytes
# $size_b (Number) - the PDF file size in bytes
pdfjs-document-properties-mb = { $size_mb } MB ({ $size_b } bytes)
pdfjs-document-properties-title = Title:
pdfjs-document-properties-author = Author:
pdfjs-document-properties-subject = Subject:
pdfjs-document-properties-keywords = Keywords:
pdfjs-document-properties-creation-date = Creation Date:
pdfjs-document-properties-modification-date = Modification Date:
# Variables:
# $date (Date) - the creation/modification date of the PDF file
# $time (Time) - the creation/modification time of the PDF file
pdfjs-document-properties-date-string = { $date }, { $time }
pdfjs-document-properties-creator = Creator:
pdfjs-document-properties-producer = PDF Producer:
pdfjs-document-properties-version = PDF Version:
pdfjs-document-properties-page-count = Page Count:
pdfjs-document-properties-page-size = Page Size:
pdfjs-document-properties-page-size-unit-inches = in
pdfjs-document-properties-page-size-unit-millimeters = mm
pdfjs-document-properties-page-size-orientation-portrait = portrait
pdfjs-document-properties-page-size-orientation-landscape = landscape
pdfjs-document-properties-page-size-name-a-three = A3
pdfjs-document-properties-page-size-name-a-four = A4
pdfjs-document-properties-page-size-name-letter = Letter
pdfjs-document-properties-page-size-name-legal = Legal
## Variables:
## $width (Number) - the width of the (current) page
## $height (Number) - the height of the (current) page
## $unit (String) - the unit of measurement of the (current) page
## $name (String) - the name of the (current) page
## $orientation (String) - the orientation of the (current) page
pdfjs-document-properties-page-size-dimension-string = { $width } × { $height } { $unit } ({ $orientation })
pdfjs-document-properties-page-size-dimension-name-string = { $width } × { $height } { $unit } ({ $name }, { $orientation })
##
# The linearization status of the document; usually called "Fast Web View" in
# English locales of Adobe software.
pdfjs-document-properties-linearized = Fast Web View:
pdfjs-document-properties-linearized-yes = Yes
pdfjs-document-properties-linearized-no = No
pdfjs-document-properties-close-button = Close
## Print
pdfjs-print-progress-message = Preparing document for printing…
# Variables:
# $progress (Number) - percent value
pdfjs-print-progress-percent = { $progress }%
pdfjs-print-progress-close-button = Cancel
pdfjs-printing-not-supported = Warning: Printing is not fully supported by this browser.
pdfjs-printing-not-ready = Warning: The PDF is not fully loaded for printing.
## Tooltips and alt text for side panel toolbar buttons
pdfjs-toggle-sidebar-button =
.title = Toggle Sidebar
pdfjs-toggle-sidebar-button-label = Toggle Sidebar
pdfjs-document-outline-button =
.title = Show Document Outline (double-click to expand/collapse all items)
pdfjs-document-outline-button-label = Document Outline
pdfjs-attachments-button =
.title = Show Attachments
pdfjs-attachments-button-label = Attachments
pdfjs-thumbs-button =
.title = Show Thumbnails
pdfjs-thumbs-button-label = Thumbnails
pdfjs-findbar-button =
.title = Find in Document
pdfjs-findbar-button-label = Find
## Thumbnails panel item (tooltip and alt text for images)
# Variables:
# $page (Number) - the page number
pdfjs-thumb-page-title =
.title = Page { $page }
# Variables:
# $page (Number) - the page number
pdfjs-thumb-page-canvas =
.aria-label = Thumbnail of Page { $page }
## Find panel button title and messages
pdfjs-find-input =
.title = Find
.placeholder = Find in document…
pdfjs-find-previous-button =
.title = Find the previous occurrence of the phrase
pdfjs-find-previous-button-label = Previous
pdfjs-find-next-button =
.title = Find the next occurrence of the phrase
pdfjs-find-next-button-label = Next
pdfjs-find-highlight-checkbox = Highlight all
pdfjs-find-match-case-checkbox-label = Match case
pdfjs-find-entire-word-checkbox-label = Whole words
pdfjs-find-reached-top = Reached top of document, continued from bottom
pdfjs-find-reached-bottom = Reached end of document, continued from top
pdfjs-find-not-found = Phrase not found
## Predefined zoom values
pdfjs-page-scale-width = Page Width
pdfjs-page-scale-fit = Page Fit
pdfjs-page-scale-auto = Automatic Zoom
pdfjs-page-scale-actual = Actual Size
# Variables:
# $scale (Number) - percent value for page scale
pdfjs-page-scale-percent = { $scale }%
## PDF page
## Loading indicator messages
pdfjs-loading-error = An error occurred while loading the PDF.
pdfjs-invalid-file-error = Invalid or corrupted PDF file.
pdfjs-missing-file-error = Missing PDF file.
pdfjs-unexpected-response-error = Unexpected server response.
pdfjs-rendering-error = An error occurred while rendering the page.
## Annotations
# .alt: This is used as a tooltip.
# Variables:
# $type (String) - an annotation type from a list defined in the PDF spec
# (32000-1:2008 Table 169 Annotation types).
# Some common types are e.g.: "Check", "Text", "Comment", "Note"
pdfjs-text-annotation-type =
.alt = [{ $type } Annotation]
## Password
pdfjs-password-label = Enter the password to open this PDF file.
pdfjs-password-invalid = Invalid password. Please try again.
pdfjs-password-ok-button = OK
pdfjs-password-cancel-button = Cancel
pdfjs-web-fonts-disabled = Web fonts are disabled: unable to use embedded PDF fonts.
## Editing
## Alt-text dialog
## Editor resizers
## This is used in an aria label to help to understand the role of the resizer.

Some files were not shown because too many files have changed in this diff Show More