Compare commits

..

No commits in common. "master" and "v5.3.31" have entirely different histories.

1002 changed files with 33575 additions and 712619 deletions

27
.gitattributes vendored
View File

@ -1,24 +1,23 @@
# Force Unix line endings for most file formats (except binary files)
*.config text eol=lf
*.css text eol=lf
*.example text eol=lf
*.ftl text eol=lf
*.html text eol=lf
*.js text eol=lf
*.json text eol=lf
*.link text eol=lf
*.jsm text eol=lf
*.css text eol=lf
*.html text eol=lf
*.md text eol=lf
*.mjs text eol=lf
*.mts text eol=lf
*.njk text eol=lf
*.py text eol=lf
*.svg text eol=lf
*.ts text eol=lf
*.txt text eol=lf
*.ftl text eol=lf
*.yml text eol=lf
*.json text eol=lf
*.config text eol=lf
*.inc text eol=lf
*.manifest text eol=lf
*.rdf text eol=lf
*.jade text eol=lf
*.coffee text eol=lf
# PDF files shall not modify CRLF line endings
*.pdf -crlf
# Linguist language overrides
*.js linguist-language=JavaScript
*.jsm linguist-language=JavaScript
*.inc linguist-language=XML

View File

@ -8,6 +8,8 @@ The issue tracking system is designed to record a single technical problem. A bu
If you are developing a custom solution, first check the examples at https://github.com/mozilla/pdf.js#learning and search existing issues. If this does not help, please prepare a short well-documented example that demonstrates the problem and make it accessible online on your website, JS Bin, GitHub, etc. before opening a new issue or contacting us in the Matrix room -- keep in mind that just code snippets won't help us troubleshoot the problem.
Note that the translations for PDF.js in the `l10n` folder are imported from the Nightly channel of Mozilla Firefox, such that we don't have to maintain them ourselves. This means that we will not accept pull requests that add new languages and/or modify existing translations, unless the corresponding changes have been made in Mozilla Firefox first.
See also:
- https://github.com/mozilla/pdf.js/wiki/Frequently-Asked-Questions
- https://github.com/mozilla/pdf.js/wiki/Contributing

View File

@ -6,5 +6,3 @@ updates:
interval: "weekly"
labels:
- "dependencies"
cooldown:
default-days: 7

View File

@ -1,7 +0,0 @@
# The requirements below can be regenerated with the following one-liner:
# `python3 -m venv venv; source venv/bin/activate; pip install -q moz-fluent-linter; pip freeze; deactivate; rm -rf venv`
fluent.syntax==0.19.0
moz-fluent-linter==0.4.10
PyYAML==6.0.3
six==1.17.0
typing_extensions==4.16.0

View File

@ -1,3 +0,0 @@
# The requirements below can be regenerated with the following one-liner:
# `python3 -m venv venv; source venv/bin/activate; pip install -q fonttools; pip freeze; deactivate; rm -rf venv`
fonttools==4.63.0

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

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

View File

@ -7,59 +7,28 @@ jobs:
test:
name: Test
runs-on: ubuntu-latest
environment: code-coverage
strategy:
fail-fast: false
matrix:
node-version: [22, 24, 26]
node-version: [20, 22, 24]
steps:
- name: Checkout repository
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Restore cached PDF files
uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: test/pdfs/*.pdf
key: cached-pdf-files-${{ hashFiles('test/pdfs/*.pdf') }}
restore-keys: |
cached-pdf-files-
enableCrossOsArchive: true
- name: Run external tests
run: npx gulp externaltest
- name: Run CLI unit tests with code coverage
run: npx gulp unittestcli --coverage --coverage-output build/coverage/unitcli
- name: Save cached PDF files
uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: test/pdfs/*.pdf
key: cached-pdf-files-${{ hashFiles('test/pdfs/*.pdf') }}
enableCrossOsArchive: true
- name: Upload results to Codecov
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
files: ./build/coverage/unitcli/lcov.info
flags: unittestcli
name: codecov-umbrella
disable_search: true
disable_telem: true
verbose: true
- name: Run CLI unit tests
run: npx gulp unittestcli

View File

@ -18,19 +18,18 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
- name: Initialize CodeQL
uses: github/codeql-action/init@99df26d4f13ea111d4ec1a7dddef6063f76b97e9 # v4.37.0
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
queries: security-and-quality
- name: Autobuild CodeQL
uses: github/codeql-action/autobuild@99df26d4f13ea111d4ec1a7dddef6063f76b97e9 # v4.37.0
uses: github/codeql-action/autobuild@v3
- name: Perform CodeQL analysis
uses: github/codeql-action/analyze@99df26d4f13ea111d4ec1a7dddef6063f76b97e9 # v4.37.0
uses: github/codeql-action/analyze@v3

View File

@ -1,101 +0,0 @@
name: Coverage (Browser tests)
on:
push:
paths:
- 'gulpfile.mjs'
- 'external/**'
- 'package-lock.json'
- 'src/**'
- 'test/images/**'
- 'test/pdfs/**'
- 'test/resources/**'
- 'test/*.css'
- 'test/driver.js'
- 'test/test.mjs'
- 'test/test_manifest.json'
- 'test/test_slave.html'
- 'web/**'
- '.github/workflows/coverage_browser_tests.yml'
branches:
- master
pull_request:
paths:
- 'gulpfile.mjs'
- 'external/**'
- 'package-lock.json'
- 'src/**'
- 'test/images/**'
- 'test/pdfs/**'
- 'test/resources/**'
- 'test/*.css'
- 'test/driver.js'
- 'test/test.mjs'
- 'test/test_manifest.json'
- 'test/test_slave.html'
- 'web/**'
- '.github/workflows/coverage_browser_tests.yml'
branches:
- master
workflow_dispatch:
permissions:
contents: read
jobs:
test:
name: ${{ matrix.os }} / firefox
strategy:
fail-fast: false
matrix:
node-version: [lts/*]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
environment: code-coverage
steps:
- name: Checkout repository
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
fetch-depth: 0
persist-credentials: false
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Restore cached PDF files
uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: test/pdfs/*.pdf
key: cached-pdf-files-${{ hashFiles('test/pdfs/*.pdf') }}
restore-keys: |
cached-pdf-files-
enableCrossOsArchive: true
- name: Run browser tests with code coverage
run: npx gulp botbrowsertest --headless -j$(nproc) --coverage --coverage-output build/coverage/browser --noChrome
- name: Save cached PDF files
uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: test/pdfs/*.pdf
key: cached-pdf-files-${{ hashFiles('test/pdfs/*.pdf') }}
enableCrossOsArchive: true
- name: Upload results to Codecov
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
files: ./build/coverage/browser/lcov.info
flags: browsertest
name: codecov-umbrella
disable_search: true
disable_telem: true
verbose: true

View File

@ -4,7 +4,6 @@ on:
paths:
- 'l10n/en-US/**.ftl'
- '.github/fluent_linter_config.yml'
- '.github/fluent_linter_requirements.txt'
- '.github/workflows/fluent_linter.yml'
branches:
- master
@ -12,7 +11,6 @@ on:
paths:
- 'l10n/en-US/**.ftl'
- '.github/fluent_linter_config.yml'
- '.github/fluent_linter_requirements.txt'
- '.github/workflows/fluent_linter.yml'
branches:
- master
@ -27,19 +25,18 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
uses: actions/checkout@v4
- name: Use Python 3.14
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
- name: Use Python 3.13
uses: actions/setup-python@v5
with:
python-version: '3.14'
python-version: '3.13'
cache: 'pip'
cache-dependency-path: '.github/fluent_linter_requirements.txt'
- name: Install requirements
run: pip install -r .github/fluent_linter_requirements.txt
- 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
run: |
moz-fluent-lint ./l10n/en-US --config .github/fluent_linter_config.yml

View File

@ -3,24 +3,18 @@ on:
push:
paths:
- 'gulpfile.mjs'
- 'external/**'
- 'package-lock.json'
- 'src/**'
- 'test/test.mjs'
- 'test/font/**'
- '.github/font_tests_requirements.txt'
- '.github/workflows/font_tests.yml'
branches:
- master
pull_request:
paths:
- 'gulpfile.mjs'
- 'external/**'
- 'package-lock.json'
- 'src/**'
- 'test/test.mjs'
- 'test/font/**'
- '.github/font_tests_requirements.txt'
- '.github/workflows/font_tests.yml'
branches:
- master
@ -30,60 +24,38 @@ permissions:
jobs:
test:
name: ${{ matrix.os }} / ${{ matrix.browser }}
name: Test
strategy:
fail-fast: false
matrix:
node-version: [lts/*]
os: [windows-latest, ubuntu-latest]
browser: [firefox, chrome]
include:
- browser: firefox
skip: --noChrome
- browser: chrome
skip: --noFirefox
runs-on: ${{ matrix.os }}
environment: code-coverage
steps:
- name: Checkout repository
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Use Python 3.14
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
- name: Use Python 3.13
uses: actions/setup-python@v5
with:
python-version: '3.14'
python-version: '3.13'
cache: 'pip'
cache-dependency-path: '.github/font_tests_requirements.txt'
- name: Install requirements
run: pip install -r .github/font_tests_requirements.txt
- name: Install Fonttools
run: pip install fonttools
- name: Run font tests with code coverage
run: npx gulp fonttest --headless --coverage --coverage-output build/coverage/font ${{ matrix.skip }}
- name: Upload results to Codecov
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
files: ./build/coverage/font/lcov.info
flags: fonttest
name: codecov-umbrella
disable_search: true
disable_telem: true
verbose: true
- name: Run font tests
run: npx gulp fonttest --headless

View File

@ -1,108 +0,0 @@
name: Integration tests
on:
push:
paths:
- 'gulpfile.mjs'
- 'external/**'
- 'package-lock.json'
- 'src/**'
- 'test/test.mjs'
- 'test/integration/**'
- 'web/**'
- '.github/workflows/integration_tests.yml'
branches:
- master
pull_request:
paths:
- 'gulpfile.mjs'
- 'external/**'
- 'package-lock.json'
- 'src/**'
- 'test/test.mjs'
- 'test/integration/**'
- 'web/**'
- '.github/workflows/integration_tests.yml'
branches:
- master
workflow_dispatch:
permissions:
contents: read
jobs:
test:
name: ${{ matrix.os }} / ${{ matrix.browser }}
strategy:
fail-fast: false
matrix:
node-version: [lts/*]
os: [windows-latest, ubuntu-latest]
browser: [firefox, chrome]
include:
- browser: firefox
skip: --noChrome
- browser: chrome
skip: --noFirefox
runs-on: ${{ matrix.os }}
environment: code-coverage
steps:
- name: Checkout repository
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
fetch-depth: 0
persist-credentials: false
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Restore cached PDF files
uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: test/pdfs/*.pdf
key: cached-pdf-files-${{ hashFiles('test/pdfs/*.pdf') }}
restore-keys: |
cached-pdf-files-
enableCrossOsArchive: true
# Note that the integration tests can't run in headless mode until bug
# 1878643 (tracked in #20918), and possibly others, have been fixed
# upstream, so we can't run with the `--headless` flag and thus have to
# configure a standard resolution for the headful browser windows.
- name: Update resolution (Windows)
if: ${{ matrix.os == 'windows-latest' }}
run: Set-DisplayResolution -Width 1920 -Height 1080 -Force
- name: Run integration tests with code coverage (Windows)
if: ${{ matrix.os == 'windows-latest' }}
run: npx gulp integrationtest --coverage --coverage-output build/coverage/integration ${{ matrix.skip }}
- name: Run integration tests with code coverage (Linux)
if: ${{ matrix.os == 'ubuntu-latest' }}
run: xvfb-run -a --server-args="-screen 0, 1920x1080x24" npx gulp integrationtest --coverage --coverage-output build/coverage/integration ${{ matrix.skip }}
- name: Save cached PDF files
uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: test/pdfs/*.pdf
key: cached-pdf-files-${{ hashFiles('test/pdfs/*.pdf') }}
enableCrossOsArchive: true
- name: Upload results to Codecov
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
files: ./build/coverage/integration/lcov.info
flags: integrationtest
name: codecov-umbrella
disable_search: true
disable_telem: true
verbose: true

View File

@ -15,16 +15,14 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install dependencies
run: npm ci
@ -32,5 +30,5 @@ jobs:
- name: Run lint
run: npx gulp lint
- name: Run lint-mozcentral
run: npx gulp lint-mozcentral
- name: Run lint-chromium
run: npx gulp lint-chromium

View File

@ -1,77 +0,0 @@
name: Notify PDF sync
on:
push:
branches: [master]
paths:
- "test/pdfs/*.pdf"
- "test/pdfs/*.pdf.link"
permissions:
contents: read
jobs:
notify:
runs-on: ubuntu-latest
environment: sync_pdfs
steps:
- name: Checkout repository
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
fetch-depth: 1
persist-credentials: false
- name: Check for added PDF files
id: check
run: |
git fetch --no-tags --depth=1 origin ${{ github.event.before }}
mapfile -t added < <(
git diff --diff-filter=A --name-only \
${{ github.event.before }} \
${{ github.sha }} \
-- \
':(glob)test/pdfs/*.pdf' \
':(glob)test/pdfs/*.pdf.link'
)
if [ "${#added[@]}" -gt 0 ]; then
echo "has_added=true" >> "$GITHUB_OUTPUT"
printf 'files_json=%s\n' "$(printf '%s\n' "${added[@]}" | jq -Rsc 'split("\n")[:-1]')" >> "$GITHUB_OUTPUT"
else
echo "has_added=false" >> "$GITHUB_OUTPUT"
echo 'files_json=[]' >> "$GITHUB_OUTPUT"
fi
- name: Generate app token
if: steps.check.outputs.has_added == 'true'
id: app-token
uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
with:
client-id: ${{ secrets.CLIENT_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
owner: mozilla
repositories: pdf.js.pdfs
- name: Trigger sync
if: steps.check.outputs.has_added == 'true'
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
FILES_JSON: ${{ steps.check.outputs.files_json }}
run: |
payload=$(jq -nc \
--arg before "${{ github.event.before }}" \
--arg after "${{ github.sha }}" \
--argjson files "$FILES_JSON" \
'{
event_type: "pdf-added",
client_payload: {
before: $before,
after: $after,
files: $files
}
}')
gh api repos/mozilla/pdf.js.pdfs/dispatches \
--method POST \
--input - <<< "$payload"

View File

@ -1,33 +0,0 @@
name: Prefs 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@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
fetch-depth: 0
persist-credentials: false
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Run prefs tests
run: npx gulp prefstest

View File

@ -1,185 +0,0 @@
name: Publish per-test coverage index
# Builds the per-test coverage index (which ref test exercises which source
# line/function) and publishes it to the gh-pages branch of mozilla/pdf.js.refs,
# where it's served at:
# https://mozilla.github.io/pdf.js.refs/per-test-index.json
# The index can then be queried with `npx gulp coverage_search`.
#
# This only runs when something is merged into master (push event); the build is
# heavy (a full browser test run), so it's deliberately kept off pull requests.
on:
push:
paths:
- 'gulpfile.mjs'
- 'external/**'
- 'package-lock.json'
- 'src/**'
- 'test/images/**'
- 'test/pdfs/**'
- 'test/resources/**'
- 'test/*.css'
- 'test/driver.js'
- 'test/test.mjs'
- 'test/test_manifest.json'
- 'test/test_slave.html'
- 'web/**'
- '.github/workflows/publish_coverage_index.yml'
branches:
- master
workflow_dispatch:
concurrency:
group: publish-coverage-index-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
publish:
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
environment: sync_pdfs
strategy:
matrix:
node-version: [lts/*]
steps:
- name: Checkout repository
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
fetch-depth: 1
persist-credentials: false
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Restore cached PDF files
uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: test/pdfs/*.pdf
key: cached-pdf-files-${{ hashFiles('test/pdfs/*.pdf') }}
restore-keys: |
cached-pdf-files-
enableCrossOsArchive: true
- name: Build the per-test coverage index
run: npx gulp botbrowsertest --headless -j$(nproc) --coverage-per-test --coverage-output build/coverage/browser --noChrome
- name: Save cached PDF files
uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: test/pdfs/*.pdf
key: cached-pdf-files-${{ hashFiles('test/pdfs/*.pdf') }}
enableCrossOsArchive: true
- name: Check current master
id: current-master
run: |
set -euo pipefail
git fetch --no-tags --depth=1 origin master:refs/remotes/origin/master
current_master="$(git rev-parse refs/remotes/origin/master)"
if [ "$GITHUB_SHA" = "$current_master" ]; then
echo "current=true" >> "$GITHUB_OUTPUT"
else
echo "::notice::Skipping publish because ${GITHUB_SHA} is no longer origin/master (${current_master})"
echo "current=false" >> "$GITHUB_OUTPUT"
fi
- name: Generate app token for pdf.js.refs
if: steps.current-master.outputs.current == 'true'
id: refs-token
uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
with:
client-id: ${{ secrets.CLIENT_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
owner: mozilla
repositories: pdf.js.refs
# Least privilege: the token only needs to push to gh-pages.
permission-contents: write
- name: Publish per-test coverage index
if: steps.current-master.outputs.current == 'true'
env:
GH_TOKEN: ${{ steps.refs-token.outputs.token }}
INDEX_FILE: build/coverage/browser/per-test-index.json
run: |
set -euo pipefail
if [ ! -f "$INDEX_FILE" ]; then
# A successful per-test run always writes the index; test.mjs only
# skips it when no per-test coverage was collected at all, so a
# missing file here means a broken build, not "nothing to publish".
echo "::error::Per-test coverage index not found at $INDEX_FILE"
exit 1
fi
repo_url="https://github.com/mozilla/pdf.js.refs.git"
# Authenticate with a short-lived header rather than embedding the
# token in the remote URL, so it never persists in .git/config.
auth_header="Authorization: basic $(printf 'x-access-token:%s' "$GH_TOKEN" | base64 | tr -d '\n')"
git_refs() { git -c http.extraheader="$auth_header" "$@"; }
stage_index() {
cp "$GITHUB_WORKSPACE/$INDEX_FILE" per-test-index.json
git add per-test-index.json
}
commit_index() {
git \
-c user.name="github-actions[bot]" \
-c user.email="41898282+github-actions[bot]@users.noreply.github.com" \
commit -q -m "Update per-test coverage index for ${GITHUB_SHA}"
}
work="$(mktemp -d)"
# Does gh-pages already exist? Probe explicitly so a transient network
# error isn't mistaken for "first run" (the orphan path below discards
# whatever else the branch holds).
ls_status=0
git_refs ls-remote --exit-code --heads "$repo_url" gh-pages >/dev/null 2>&1 || ls_status=$?
case "$ls_status" in
0)
# Reuse gh-pages, keeping any other files it holds.
git_refs clone --depth=1 --branch gh-pages "$repo_url" "$work"
cd "$work"
;;
2)
# First run: start a fresh orphan branch without cloning history.
git init -q "$work"
cd "$work"
git remote add origin "$repo_url"
git checkout -q --orphan gh-pages
;;
*)
echo "::error::Could not query gh-pages on pdf.js.refs (git ls-remote exit ${ls_status})"
exit 1
;;
esac
stage_index
if git diff --cached --quiet; then
echo "No changes to publish"
exit 0
fi
commit_index
# Retry against a concurrent update to gh-pages: re-sync onto the new
# tip, re-apply our index (latest build wins), and push again.
for attempt in 1 2 3; do
if git_refs push origin gh-pages; then
exit 0
fi
if [ "$attempt" -eq 3 ]; then
echo "::error::Failed to push the per-test coverage index after ${attempt} attempts"
exit 1
fi
echo "gh-pages advanced during the run; re-syncing and retrying (attempt ${attempt})"
git_refs fetch --depth=1 origin gh-pages
git reset --hard FETCH_HEAD
stage_index
if git diff --cached --quiet; then
echo "No changes after re-sync"
exit 0
fi
commit_index
done

View File

@ -17,16 +17,14 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
@ -36,4 +34,6 @@ jobs:
run: npx gulp dist
- name: Publish the `pdfjs-dist` library to NPM
run: npm publish ./build/dist
run: npm publish ./build/dist --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

View File

@ -6,12 +6,6 @@ on:
permissions:
contents: read
# Allow only one concurrent deployment, without cancelling in-progress runs, so
# that an in-flight Pages deployment is allowed to finish before the next starts.
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
name: Build
@ -23,16 +17,14 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install dependencies
run: npm ci
@ -57,7 +49,7 @@ jobs:
INPUT_PATH: build/gh-pages
- name: Upload the website
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
uses: actions/upload-artifact@v4
with:
name: github-pages
path: ${{ runner.temp }}/website.tar
@ -74,4 +66,4 @@ jobs:
steps:
- name: Deploy the website
uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5.0.0
uses: actions/deploy-pages@v4

View File

@ -15,16 +15,14 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install dependencies
run: npm ci

View File

@ -1,95 +0,0 @@
name: Unit tests
on:
push:
paths:
- 'gulpfile.mjs'
- 'external/**'
- 'package-lock.json'
- 'src/**'
- 'test/test.mjs'
- 'test/unit/**'
- 'web/**'
- '.github/workflows/unit_tests.yml'
branches:
- master
pull_request:
paths:
- 'gulpfile.mjs'
- 'external/**'
- 'package-lock.json'
- 'src/**'
- 'test/test.mjs'
- 'test/unit/**'
- 'web/**'
- '.github/workflows/unit_tests.yml'
branches:
- master
workflow_dispatch:
permissions:
contents: read
jobs:
test:
name: ${{ matrix.os }} / ${{ matrix.browser }}
strategy:
fail-fast: false
matrix:
node-version: [lts/*]
os: [windows-latest, ubuntu-latest]
browser: [firefox, chrome]
include:
- browser: firefox
skip: --noChrome
- browser: chrome
skip: --noFirefox
runs-on: ${{ matrix.os }}
environment: code-coverage
steps:
- name: Checkout repository
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
fetch-depth: 0
persist-credentials: false
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Restore cached PDF files
uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: test/pdfs/*.pdf
key: cached-pdf-files-${{ hashFiles('test/pdfs/*.pdf') }}
restore-keys: |
cached-pdf-files-
enableCrossOsArchive: true
- name: Run unit tests with code coverage
run: npx gulp unittest --headless --coverage --coverage-output build/coverage/unit ${{ matrix.skip }}
- name: Save cached PDF files
uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: test/pdfs/*.pdf
key: cached-pdf-files-${{ hashFiles('test/pdfs/*.pdf') }}
enableCrossOsArchive: true
- name: Upload results to Codecov
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
files: ./build/coverage/unit/lcov.info
flags: unittest
name: codecov-umbrella
disable_search: true
disable_telem: true
verbose: true

View File

@ -1,61 +0,0 @@
name: Update locales
on:
schedule:
- cron: "0 0 * * 5" # Every Friday at midnight UTC
workflow_dispatch: # Allow manual triggering
permissions:
contents: read
jobs:
update-locales:
name: Update locales
runs-on: ubuntu-latest
environment: sync_l10n
steps:
- name: Generate app token
id: app-token
uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
with:
client-id: ${{ secrets.CLIENT_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
- name: Checkout repository
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
token: ${{ steps.app-token.outputs.token }}
persist-credentials: false
- name: Use Node.js LTS
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: lts/*
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Import translations from mozilla-central
run: npx gulp importl10n
- name: Create Pull Request
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
run: |
if [ -z "$(git status --porcelain l10n/)" ]; then
echo "No locale changes to commit."
exit 0
fi
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git remote set-url origin "https://x-access-token:${GH_TOKEN}@github.com/${{ github.repository }}"
git switch -C update-locales
git add l10n/
git commit -m "l10n: Update locale files"
git push --force origin update-locales
gh pr create \
--title "l10n: Update locale files" \
--body "Automated weekly update of locale files from mozilla-central." \
--label l10n || true

1
.gitignore vendored
View File

@ -7,4 +7,3 @@ Makefile
node_modules/
examples/node/svgdump/
examples/node/pdf2png/*.png
.vscode/

View File

@ -1,9 +0,0 @@
{
"mcpServers": {
"firefox-devtools": {
"type": "stdio",
"command": "npx",
"args": ["@padenot/firefox-devtools-mcp"]
}
}
}

View File

@ -13,6 +13,3 @@ test/tmp/
test/pdfs/
web/locale/
*~/
.claude/
.codex/
.cursor/

View File

@ -9,17 +9,10 @@
"overrides": [
{
"files": ["tsconfig.json", ".prettierrc"],
"options": {
"parser": "json"
}
files: ["tsconfig.json"],
options: {
parser: "json",
},
},
{
"files": ["**/*.html"],
"options": {
"parser": "html",
"printWidth": 160
}
}
]
}

9
.puppeteerrc Normal file
View File

@ -0,0 +1,9 @@
{
"chrome": {
"skipDownload": false
},
"firefox": {
"skipDownload": false,
"version": "nightly"
}
}

View File

@ -1,13 +0,0 @@
{
"chrome": {
"skipDownload": true,
"version": "stable"
},
"chrome-headless-shell": {
"skipDownload": true
},
"firefox": {
"skipDownload": true,
"version": "nightly"
}
}

View File

@ -13,10 +13,13 @@
"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"]
},
"length-zero-no-unit": [true, {
"ignore": ["custom-properties"]
ignore: ["custom-properties"]
}],
"selector-pseudo-element-colon-notation": "double",
"shorthand-property-no-redundant-values": true
}
"shorthand-property-no-redundant-values": true,
},
}

204
AGENTS.md
View File

@ -1,204 +0,0 @@
## Overview
PDF.js is a Portable Document Format (PDF) viewer built with JavaScript, HTML5 Canvas, and CSS. It's a Mozilla project that provides a general-purpose, web standards-based platform for parsing and rendering PDFs without requiring native code or plugins.
## Common Commands
### Development Server
```bash
npx gulp server
```
Then open http://localhost:8888/web/viewer.html to view the PDF viewer. Test PDFs are available at http://localhost:8888/test/pdfs/?frame
### Building
Build for modern browsers:
```bash
npx gulp generic
```
This generates `pdf.js` and `pdf.worker.js` in `build/generic/build/`.
Build for distribution (creates pdfjs-dist package):
```bash
npx gulp dist
npx gulp dist-install # Build and install locally
```
### Testing
Run all tests:
```bash
npx gulp test
```
Run unit tests only:
```bash
npx gulp unittest
```
Run integration tests (browser-based tests using Puppeteer):
```bash
npx gulp integrationtest
```
Run font tests:
```bash
npx gulp fonttest
```
Run a single test file by modifying test/test_manifest.json or using test runner options.
### Linting and Formatting
Lint JavaScript:
```bash
npx gulp lint
```
Format code (uses Prettier and ESLint):
```bash
npx eslint --fix <file>
```
### Type Checking
Run TypeScript type checking:
```bash
npx gulp typestest
```
## Architecture
### High-Level Structure
PDF.js has a multi-layer architecture that separates concerns between PDF parsing, rendering, and UI:
#### 1. Core Layer (`src/core/`)
The core layer handles PDF parsing and interpretation. Key responsibilities:
- **PDF parsing**: Parsing PDF structure, cross-reference tables, streams
- **Font handling**: CFF, TrueType, Type1 font parsing and conversion (`font.js`, `fonts.js`, `cff_*.js`, `type1_*.js`)
- **Image decoding**: JPEG, JBIG2, JPX/JPEG2000 decoders
- **Operators**: Processing PDF drawing operators (`operator_list.js`, `evaluator.js`)
- **XFA Forms**: XML Forms Architecture support (`src/core/xfa/`)
- **Color spaces**: ICC profiles, device color spaces (`colorspace.js`, `icc_colorspace.js`)
- Runs in a Web Worker for performance isolation
Entry point: `src/pdf.worker.js`
#### 2. Display Layer (`src/display/`)
The display layer provides the API for rendering PDFs to canvas and managing documents. Key components:
- **API**: Main public API (`api.js`) - `PDFDocumentProxy`, `PDFPageProxy`, `getDocument()`
- **Canvas rendering**: Renders PDF operations to HTML5 canvas (`canvas.js`)
- **Text layer**: Extracts and positions text for selection/search (`text_layer.js`)
- **Annotation layer**: Renders and handles PDF annotations (`annotation_layer.js`)
- **Editor layer**: Supports PDF editing (annotations, highlights, stamps) (`editor/`)
- **Metadata**: Parses XMP metadata (`metadata.js`)
- **Streams**: Handles PDF data fetching (fetch, network, node) (`fetch_stream.js`, `network.js`, `node_stream.js`)
Entry point: `src/pdf.js`
#### 3. Scripting Layer (`src/scripting_api/`)
Implements JavaScript execution for interactive PDFs (form calculations, validations, button actions).
- Sandboxed execution environment
- Implements Acrobat JavaScript API objects (App, Doc, Field, etc.)
Entry points: `src/pdf.scripting.js`, `src/pdf.sandbox.js`
#### 4. Web Viewer (`web/`)
The complete PDF viewer application with UI. Key components:
- **Main app**: Application orchestration (`app.js`)
- **Viewer**: Page rendering and layout (`pdf_viewer.js`, `pdf_page_view.js`)
- **Toolbar**: Zoom, page navigation, print, download controls
- **Sidebar**: Thumbnails, outlines, attachments (`pdf_sidebar.js`, `pdf_thumbnail_view.js`, `pdf_outline_viewer.js`)
- **Find controller**: Text search functionality (`pdf_find_controller.js`)
- **Annotation editors**: UI for creating/editing annotations (`annotation_editor_layer_builder.js`)
- **Presentation mode**: Full-screen presentation (`pdf_presentation_mode.js`)
Entry point: `web/viewer.html` + `web/viewer.mjs`
#### 5. Shared Utilities (`src/shared/`)
Common utilities used across layers:
- **Message handling**: Worker communication (`message_handler.js`)
- **Utilities**: Common functions and constants (`util.js`)
- **Image utilities**: Image processing helpers (`image_utils.js`)
### Worker Communication
PDF.js uses a Web Worker architecture:
- Main thread (`display` layer) communicates with worker thread (`core` layer) via `MessageHandler`
- Keeps PDF parsing off the main thread for better performance
- Messages include: page rendering requests, text content extraction, metadata queries
### Build System
- Uses **Gulp** for build orchestration (`gulpfile.mjs`)
- **Webpack** bundles modules into browser-compatible formats
- **Babel** transpiles for browser compatibility (configurable targets in gulpfile)
- Preprocessor replaces build-time constants (e.g., `typeof PDFJSDev !== "undefined"` checks)
- Multiple build targets: generic, components, minified, legacy (older browser support)
### External Dependencies
Located in `external/`:
- **bcmaps**: Binary CMaps for CJK fonts
- **standard_fonts**: Core 14 PDF fonts metrics
- **cmapscompress**: Tools for compressing CMaps
- **openjpeg**: JPEG2000 decoder (WASM)
- **quickjs**: JavaScript engine for sandboxed execution
### Translations
Translations in `l10n/` are imported from Mozilla Firefox Nightly. Only the file l10n/en-US/viewer.ftl can be updated.
## Development Notes
### Adding New Features
When adding features that span multiple layers:
1. Start with the `core` layer if parsing/interpretation changes are needed
2. Update the `display` layer API if new capabilities need exposure
3. Modify the `web` viewer if UI changes are required
4. Ensure worker communication handles new message types
### Preprocessor Directives
Code uses preprocessor checks for build-time conditionals:
```javascript
if (typeof PDFJSDev !== "undefined" && PDFJSDev.test("GENERIC")) {
// Generic build-specific code
}
```
Common flags: `GENERIC`, `MOZCENTRAL`, `CHROME`, `MINIFIED`, `TESTING`, `LIB`, `SKIP_BABEL`, `IMAGE_DECODERS`
### Testing
- Unit tests use Jasmine framework (`test/unit/`)
- Integration tests use Puppeteer for browser automation (`test/integration/`)
- Test PDFs downloaded from manifest (`test/test_manifest.json`)
- Reference images for visual regression testing (`test/ref/`)
### Code Style
- Uses ESLint with custom configuration (`eslint.config.mjs`)
- Prettier for formatting
- Stylelint for CSS
- No semicolons required (ASI enabled)
- Single quotes for strings
### Pull Request Process
- Keep PRs focused on a single issue
- Provide a test PDF if the issue is PDF-specific
- Ensure tests pass (`npx gulp test`)
- Run linting (`npx gulp lint`)
- Follow existing code patterns
- Don't modify translations directly (they come from Firefox)
### Performance Considerations
- Core parsing runs in a Web Worker - keep main thread work minimal
- Canvas rendering can be expensive - use appropriate scale factors
- Text layer generation is separate from rendering - can be deferred
- Annotation layer is optional - only enable when needed

View File

@ -1 +0,0 @@
@AGENTS.md

View File

@ -1,4 +1,4 @@
# PDF.js [![CI](https://github.com/mozilla/pdf.js/actions/workflows/ci.yml/badge.svg?query=branch%3Amaster)](https://github.com/mozilla/pdf.js/actions/workflows/ci.yml?query=branch%3Amaster) [![codecov](https://codecov.io/gh/mozilla/pdf.js/branch/master/graph/badge.svg)](https://codecov.io/gh/mozilla/pdf.js)
# PDF.js [![CI](https://github.com/mozilla/pdf.js/actions/workflows/ci.yml/badge.svg?query=branch%3Amaster)](https://github.com/mozilla/pdf.js/actions/workflows/ci.yml?query=branch%3Amaster)
[PDF.js](https://mozilla.github.io/pdf.js/) is a Portable Document Format (PDF) viewer that is built with HTML5.
@ -44,10 +44,6 @@ PDF.js is built into version 19+ of Firefox.
Chrome, go to `Tools > Extension` and load the (unpackaged) extension from the
directory `build/chromium`.
### PDF debugger
Browse the internal structure of a PDF document with https://mozilla.github.io/pdf.js/internal-viewer/web/debugger.html
## Getting the Code
To get a local copy of the current code, clone it using git:
@ -91,88 +87,6 @@ This will generate `pdf.js` and `pdf.worker.js` in the `build/generic/build/` di
Both scripts are needed but only `pdf.js` needs to be included since `pdf.worker.js` will
be loaded by `pdf.js`. The PDF.js files are large and should be minified for production.
## Code coverage
We track how much of the code is exercised by the test suite on
[Codecov](https://codecov.io/gh/mozilla/pdf.js) (see the badge at the top of this
file).
### How it is collected
When coverage is enabled, the build instruments the bundled code with
[`babel-plugin-istanbul`](https://github.com/istanbuljs/babel-plugin-istanbul),
which adds counters that record every line, branch and function that runs:
+ For browser-based tests (unit, integration and reference tests) the
instrumented code runs in the browser, fills a global `window.__coverage__`
object, and the test runner collects it from each browser session, merges the
results, and writes the report.
+ For the Node-based unit tests (`unittestcli`) the raw data is written to
`build/tmp/unittestcli-coverage.json` and turned into a report afterwards.
### Collecting coverage locally
Add the `--coverage` flag to any of the test tasks, for example:
$ npx gulp unittest --coverage # browser unit tests
$ npx gulp unittestcli --coverage # Node unit tests
$ npx gulp integrationtest --coverage # Puppeteer integration tests
$ npx gulp botbrowsertest --coverage # reference tests
The following options control the output:
| Option | Description | Default |
| --- | --- | --- |
| `--coverage` | Enable coverage collection. | off |
| `--coverage-output <dir>` | Directory where the report is written. | `build/coverage` |
| `--coverage-formats <list>` | Comma-separated list of formats: `info`, `html`, `json`, `text`, `cobertura`, `clover`. | `info` |
| `--coverage-per-test` | Also build a per-test index (see below). | off |
By default the report is written to `build/coverage` in the `info` format, i.e.
an [LCOV](https://github.com/linux-test-project/lcov) `lcov.info` file (the same
format that is uploaded to Codecov). Use `--coverage-formats html` to get a
browsable HTML report instead, or pass several formats at once, e.g.
`--coverage-formats info,html`.
### Finding which tests cover a given line
`coverage_search` lists the ref tests that exercised a specific source line or
function. It uses the per-test index (`per-test-index.json`) that is rebuilt on
every push to `master` and published to the
[`pdf.js.refs`](https://github.com/mozilla/pdf.js.refs/tree/gh-pages)
repository. The index is downloaded on demand, cached locally, and only
re-downloaded when it has changed, so no local coverage build is required:
$ npx gulp coverage_search --code="canvas.js::205"
$ npx gulp coverage_search --code="canvas.js::drawImageAtIntegerCoords"
To run — or regenerate the reference images for — only the ref tests that touch
a given line or function, pass the same `--code` option to a browser test or
`makeref` task:
$ npx gulp browsertest --code="canvas.js::205"
$ npx gulp makeref --code="canvas.js::205"
Pass `--no-download` to reuse the locally cached index without contacting the
network. The index can also be built and queried locally (the CI job that
publishes it builds it the same way):
$ npx gulp botbrowsertest --coverage-per-test
$ npx gulp coverage_search --code="canvas.js::205" \
--index=build/coverage/per-test-index.json --no-download
### Continuous integration
On every push and pull request three GitHub Actions workflows collect coverage
and upload it to Codecov, each tagged with its own Codecov *flag* so the test
types can be told apart:
| Workflow | Task | Codecov flag |
| --- | --- | --- |
| `unit_tests.yml` | `unittest` | `unittest` |
| `integration_tests.yml` | `integrationtest` | `integrationtest` |
| `coverage_browser_tests.yml` | `botbrowsertest` | `browsertest` |
## Using PDF.js in a web application
To use PDF.js in a web application you can choose to use a pre-built version of the library

View File

@ -1,3 +0,0 @@
flag_management:
default_rules:
carryforward: true

View File

@ -18,13 +18,13 @@ This tutorial shows how PDF.js can be used as a library in a web browser.
The object structure of PDF.js loosely follows the structure of an actual PDF. At the top level there is a document object. From the document, more information and individual pages can be fetched. To get the document:
```js
pdfjsLib.getDocument({ url: "helloworld.pdf" })
pdfjsLib.getDocument('helloworld.pdf')
```
Remember though that PDF.js uses promises, and the above will return a `PDFDocumentLoadingTask` instance that has a `promise` property which is resolved with the document object.
```js
var loadingTask = pdfjsLib.getDocument({ url: "helloworld.pdf" });
var loadingTask = pdfjsLib.getDocument('helloworld.pdf');
loadingTask.promise.then(function(pdf) {
// you can now use *pdf* here
});
@ -48,8 +48,8 @@ var viewport = page.getViewport({ scale: scale, });
// Support HiDPI-screens.
var outputScale = window.devicePixelRatio || 1;
var canvas = document.getElementById("the-canvas");
var context = canvas.getContext("2d");
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);

View File

@ -1,13 +1,11 @@
import globals from "globals";
import import_ from "eslint-plugin-import-x";
import import_ from "eslint-plugin-import";
import jasmine from "eslint-plugin-jasmine";
import json from "@eslint/json";
import json from "eslint-plugin-json";
import noUnsanitized from "eslint-plugin-no-unsanitized";
import perfectionist from "eslint-plugin-perfectionist";
import preferMathClamp from "./external/eslint_plugins/prefer-math-clamp.mjs";
import prettierRecommended from "eslint-plugin-prettier/recommended";
import regexpPlugin from "eslint-plugin-regexp";
import unicorn from "eslint-plugin-unicorn";
const jsFiles = folder => {
@ -28,18 +26,15 @@ const chromiumExtensionServiceWorkerFiles = [
export default [
{
ignores: [
"package-lock.json",
"**/build/",
"**/l10n/",
"**/docs/",
"**/node_modules/",
"external/bcmaps/",
"external/brotli/",
"external/builder/fixtures/",
"external/builder/fixtures_babel/",
"external/openjpeg/",
"external/qcms/",
"external/jbig2/",
"external/quickjs/",
"test/stats/results/",
"test/tmp/",
@ -47,7 +42,6 @@ export default [
"web/locale/",
"web/wasm/",
"**/*~/",
".{claude,codex,cursor}/",
],
},
@ -57,16 +51,7 @@ export default [
prettierRecommended,
{
files: jsFiles("."),
plugins: regexpPlugin.configs["flat/recommended"].plugins,
rules: {
...regexpPlugin.configs["flat/recommended"].rules,
"regexp/no-legacy-features": "off",
},
},
{
files: ["**/*.json", "**/.*.json"],
language: "json/json",
files: ["**/*.json"],
...json.configs.recommended,
},
{
@ -80,24 +65,18 @@ export default [
files: jsFiles("."),
plugins: {
import: import_.flatConfigs.recommended.plugins["import-x"],
import: import_.flatConfigs.recommended.plugins.import,
json,
"no-unsanitized": noUnsanitized,
perfectionist,
"prefer-math-clamp": preferMathClamp,
unicorn,
},
settings: {
"import-x/resolver-next": [import_.createNodeResolver()],
},
languageOptions: {
globals: {
...globals.worker,
PDFJSDev: "readonly",
__raw_import__: "readonly",
__eager_import__: "readonly",
},
ecmaVersion: 2025,
@ -135,13 +114,8 @@ export default [
"pdfjs-lib",
"pdfjs-web",
"web",
"@csstools/postcss-light-dark-function",
"fluent-bundle",
"fluent-dom",
"postcss-dir-pseudo-class",
"postcss-nesting",
"postcss-values-parser",
"stylelint",
// See https://github.com/firebase/firebase-admin-node/discussions/1359.
"eslint-plugin-perfectionist",
],
@ -162,7 +136,6 @@ export default [
"unicorn/no-unnecessary-array-flat-depth": "error",
"unicorn/no-unnecessary-array-splice-count": "error",
"unicorn/no-unnecessary-slice-end": "error",
"unicorn/no-useless-collection-argument": "error",
"unicorn/no-useless-promise-resolve-reject": "error",
"unicorn/no-useless-spread": "error",
"unicorn/prefer-array-find": "error",
@ -171,18 +144,11 @@ export default [
"unicorn/prefer-array-index-of": "error",
"unicorn/prefer-array-some": "error",
"unicorn/prefer-at": "error",
"unicorn/prefer-class-fields": "error",
"unicorn/prefer-classlist-toggle": "error",
"unicorn/prefer-date-now": "error",
"unicorn/prefer-dom-node-append": "error",
"unicorn/prefer-dom-node-remove": "error",
"unicorn/prefer-import-meta-properties": "error",
"unicorn/prefer-includes": "error",
"unicorn/logical-assignment-operators": [
"error",
"always",
{ enforceForIfStatements: true },
],
"unicorn/prefer-logical-operator-over-ternary": "error",
"unicorn/prefer-modern-dom-apis": "error",
"unicorn/prefer-modern-math-apis": "error",
@ -195,8 +161,6 @@ export default [
"unicorn/prefer-ternary": ["error", "only-single-line"],
"unicorn/throw-new-error": "error",
"prefer-math-clamp/prefer-math-clamp": "error",
// Possible errors
"for-direction": "error",
"getter-return": "error",
@ -280,10 +244,8 @@ export default [
"no-useless-concat": "error",
"no-useless-escape": "error",
"no-useless-return": "error",
"prefer-object-has-own": "error",
"prefer-promise-reject-errors": "error",
"prefer-spread": "error",
radix: "error",
"wrap-iife": ["error", "any"],
yoda: ["error", "never", { exceptRange: true }],
@ -318,11 +280,6 @@ export default [
"BinaryExpression[operator='instanceof'][right.name='Object']",
message: "Use `typeof` rather than `instanceof Object`.",
},
{
selector: "MemberExpression[property.name='hasOwnProperty']",
message:
"Use `Object.hasOwn` rather than `Object.prototype.hasOwnProperty`.",
},
{
selector: "CallExpression[callee.name='assert'][arguments.length!=2]",
message: "`assert()` must always be invoked with two arguments.",

View File

@ -1,4 +1,4 @@
<!doctype html>
<!DOCTYPE html>
<!--
Copyright 2014 Mozilla Foundation
@ -16,9 +16,9 @@ limitations under the License.
-->
<html dir="ltr" mozdisallowselectionprint>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
<meta name="google" content="notranslate" />
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="google" content="notranslate">
<title>PDF.js page viewer using built components</title>
<style>
@ -29,7 +29,7 @@ limitations under the License.
}
</style>
<link rel="stylesheet" href="../../node_modules/pdfjs-dist/web/pdf_viewer.css" />
<link rel="stylesheet" href="../../node_modules/pdfjs-dist/web/pdf_viewer.css">
<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>

View File

@ -1,4 +1,4 @@
<!doctype html>
<!DOCTYPE html>
<!--
Copyright 2014 Mozilla Foundation
@ -16,9 +16,9 @@ limitations under the License.
-->
<html dir="ltr" mozdisallowselectionprint>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
<meta name="google" content="notranslate" />
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="google" content="notranslate">
<title>PDF.js viewer using built components</title>
<style>
@ -35,7 +35,7 @@ limitations under the License.
}
</style>
<link rel="stylesheet" href="../../node_modules/pdfjs-dist/web/pdf_viewer.css" />
<link rel="stylesheet" href="../../node_modules/pdfjs-dist/web/pdf_viewer.css">
<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>

View File

@ -40,8 +40,6 @@ const SANDBOX_BUNDLE_SRC = new URL(
window.location
);
const WASM_URL = "../../node_modules/pdfjs-dist/build/wasm/";
const container = document.getElementById("viewerContainer");
const eventBus = new pdfjsViewer.EventBus();
@ -61,7 +59,6 @@ const pdfFindController = new pdfjsViewer.PDFFindController({
const pdfScriptingManager = new pdfjsViewer.PDFScriptingManager({
eventBus,
sandboxBundleSrc: SANDBOX_BUNDLE_SRC,
wasmUrl: WASM_URL,
});
const pdfViewer = new pdfjsViewer.PDFViewer({

View File

@ -1,4 +1,4 @@
<!doctype html>
<!DOCTYPE html>
<!--
Copyright 2014 Mozilla Foundation
@ -16,9 +16,9 @@ limitations under the License.
-->
<html dir="ltr" mozdisallowselectionprint>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
<meta name="google" content="notranslate" />
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="google" content="notranslate">
<title>PDF.js Single Page Viewer using built components</title>
<style>
@ -35,7 +35,7 @@ limitations under the License.
}
</style>
<link rel="stylesheet" href="../../node_modules/pdfjs-dist/web/pdf_viewer.css" />
<link rel="stylesheet" href="../../node_modules/pdfjs-dist/web/pdf_viewer.css">
<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>

View File

@ -40,8 +40,6 @@ const SANDBOX_BUNDLE_SRC = new URL(
window.location
);
const WASM_URL = "../../node_modules/pdfjs-dist/build/wasm/";
const container = document.getElementById("viewerContainer");
const eventBus = new pdfjsViewer.EventBus();
@ -61,7 +59,6 @@ const pdfFindController = new pdfjsViewer.PDFFindController({
const pdfScriptingManager = new pdfjsViewer.PDFScriptingManager({
eventBus,
sandboxBundleSrc: SANDBOX_BUNDLE_SRC,
wasmUrl: WASM_URL,
});
const pdfSinglePageViewer = new pdfjsViewer.PDFSinglePageViewer({

View File

@ -1,4 +1,4 @@
<!doctype html>
<!DOCTYPE html>
<!--
Copyright 2018 Mozilla Foundation
@ -16,9 +16,9 @@ limitations under the License.
-->
<html dir="ltr" mozdisallowselectionprint>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
<meta name="google" content="notranslate" />
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="google" content="notranslate">
<title>PDF.js standalone JpegImage parser</title>
<style>

View File

@ -29,7 +29,7 @@ const response = await fetch(JPEG_IMAGE);
if (!response.ok) {
throw new Error(response.statusText);
}
const typedArrayImage = await response.bytes();
const typedArrayImage = new Uint8Array(await response.arrayBuffer());
// Parse the image data using `JpegImage`.
//

View File

@ -1,13 +1,14 @@
<!doctype html>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta charset="UTF-8">
<title>'Hello, world!' example</title>
</head>
<body>
<h1>'Hello, world!' example</h1>
<canvas id="the-canvas" style="border: 1px solid black; direction: ltr"></canvas>
<canvas id="the-canvas" style="border: 1px solid black; direction: ltr;"></canvas>
<script src="../../node_modules/pdfjs-dist/build/pdf.mjs" type="module"></script>
@ -16,17 +17,18 @@
// If absolute URL from the remote server is provided, configure the CORS
// header on that server.
//
const url = "./helloworld.pdf";
const url = './helloworld.pdf';
//
// The workerSrc property shall be specified.
//
pdfjsLib.GlobalWorkerOptions.workerSrc = "../../node_modules/pdfjs-dist/build/pdf.worker.mjs";
pdfjsLib.GlobalWorkerOptions.workerSrc =
'../../node_modules/pdfjs-dist/build/pdf.worker.mjs';
//
// Asynchronous download PDF
//
const loadingTask = pdfjsLib.getDocument({ url });
const loadingTask = pdfjsLib.getDocument(url);
const pdf = await loadingTask.promise;
//
// Fetch the first page
@ -48,7 +50,9 @@
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
@ -61,11 +65,12 @@
page.render(renderContext);
</script>
<hr />
<hr>
<h2>JavaScript code:</h2>
<pre id="code"></pre>
<script>
document.getElementById("code").textContent = document.getElementById("script").text;
document.getElementById('code').textContent =
document.getElementById('script').text;
</script>
</body>
</html>

View File

@ -1,13 +1,14 @@
<!doctype html>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta charset="UTF-8">
<title>'Hello, world!' base64 example</title>
</head>
<body>
<h1>'Hello, world!' example</h1>
<canvas id="the-canvas" style="border: 1px solid black; direction: ltr"></canvas>
<canvas id="the-canvas" style="border: 1px solid black; direction: ltr;"></canvas>
<script src="../../node_modules/pdfjs-dist/build/pdf.mjs" type="module"></script>
@ -16,47 +17,49 @@
// (See also https://developer.mozilla.org/en-US/docs/Web/API/WindowBase64/
// Base64_encoding_and_decoding.)
var pdfData = atob(
"JVBERi0xLjcKCjEgMCBvYmogICUgZW50cnkgcG9pbnQKPDwKICAvVHlwZSAvQ2F0YWxvZwog" +
"IC9QYWdlcyAyIDAgUgo+PgplbmRvYmoKCjIgMCBvYmoKPDwKICAvVHlwZSAvUGFnZXMKICAv" +
"TWVkaWFCb3ggWyAwIDAgMjAwIDIwMCBdCiAgL0NvdW50IDEKICAvS2lkcyBbIDMgMCBSIF0K" +
"Pj4KZW5kb2JqCgozIDAgb2JqCjw8CiAgL1R5cGUgL1BhZ2UKICAvUGFyZW50IDIgMCBSCiAg" +
"L1Jlc291cmNlcyA8PAogICAgL0ZvbnQgPDwKICAgICAgL0YxIDQgMCBSIAogICAgPj4KICA+" +
"PgogIC9Db250ZW50cyA1IDAgUgo+PgplbmRvYmoKCjQgMCBvYmoKPDwKICAvVHlwZSAvRm9u" +
"dAogIC9TdWJ0eXBlIC9UeXBlMQogIC9CYXNlRm9udCAvVGltZXMtUm9tYW4KPj4KZW5kb2Jq" +
"Cgo1IDAgb2JqICAlIHBhZ2UgY29udGVudAo8PAogIC9MZW5ndGggNDQKPj4Kc3RyZWFtCkJU" +
"CjcwIDUwIFRECi9GMSAxMiBUZgooSGVsbG8sIHdvcmxkISkgVGoKRVQKZW5kc3RyZWFtCmVu" +
"ZG9iagoKeHJlZgowIDYKMDAwMDAwMDAwMCA2NTUzNSBmIAowMDAwMDAwMDEwIDAwMDAwIG4g" +
"CjAwMDAwMDAwNzkgMDAwMDAgbiAKMDAwMDAwMDE3MyAwMDAwMCBuIAowMDAwMDAwMzAxIDAw" +
"MDAwIG4gCjAwMDAwMDAzODAgMDAwMDAgbiAKdHJhaWxlcgo8PAogIC9TaXplIDYKICAvUm9v" +
"dCAxIDAgUgo+PgpzdGFydHhyZWYKNDkyCiUlRU9G"
);
'JVBERi0xLjcKCjEgMCBvYmogICUgZW50cnkgcG9pbnQKPDwKICAvVHlwZSAvQ2F0YWxvZwog' +
'IC9QYWdlcyAyIDAgUgo+PgplbmRvYmoKCjIgMCBvYmoKPDwKICAvVHlwZSAvUGFnZXMKICAv' +
'TWVkaWFCb3ggWyAwIDAgMjAwIDIwMCBdCiAgL0NvdW50IDEKICAvS2lkcyBbIDMgMCBSIF0K' +
'Pj4KZW5kb2JqCgozIDAgb2JqCjw8CiAgL1R5cGUgL1BhZ2UKICAvUGFyZW50IDIgMCBSCiAg' +
'L1Jlc291cmNlcyA8PAogICAgL0ZvbnQgPDwKICAgICAgL0YxIDQgMCBSIAogICAgPj4KICA+' +
'PgogIC9Db250ZW50cyA1IDAgUgo+PgplbmRvYmoKCjQgMCBvYmoKPDwKICAvVHlwZSAvRm9u' +
'dAogIC9TdWJ0eXBlIC9UeXBlMQogIC9CYXNlRm9udCAvVGltZXMtUm9tYW4KPj4KZW5kb2Jq' +
'Cgo1IDAgb2JqICAlIHBhZ2UgY29udGVudAo8PAogIC9MZW5ndGggNDQKPj4Kc3RyZWFtCkJU' +
'CjcwIDUwIFRECi9GMSAxMiBUZgooSGVsbG8sIHdvcmxkISkgVGoKRVQKZW5kc3RyZWFtCmVu' +
'ZG9iagoKeHJlZgowIDYKMDAwMDAwMDAwMCA2NTUzNSBmIAowMDAwMDAwMDEwIDAwMDAwIG4g' +
'CjAwMDAwMDAwNzkgMDAwMDAgbiAKMDAwMDAwMDE3MyAwMDAwMCBuIAowMDAwMDAwMzAxIDAw' +
'MDAwIG4gCjAwMDAwMDAzODAgMDAwMDAgbiAKdHJhaWxlcgo8PAogIC9TaXplIDYKICAvUm9v' +
'dCAxIDAgUgo+PgpzdGFydHhyZWYKNDkyCiUlRU9G');
//
// The workerSrc property shall be specified.
//
pdfjsLib.GlobalWorkerOptions.workerSrc = "../../node_modules/pdfjs-dist/build/pdf.worker.mjs";
pdfjsLib.GlobalWorkerOptions.workerSrc =
'../../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 });
var loadingTask = pdfjsLib.getDocument({ data: pdfData, });
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 });
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");
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";
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 = {
@ -67,11 +70,12 @@
page.render(renderContext);
</script>
<hr />
<hr>
<h2>JavaScript code:</h2>
<pre id="code"></pre>
<script>
document.getElementById("code").textContent = document.getElementById("script").text;
document.getElementById('code').textContent =
document.getElementById('script').text;
</script>
</body>
</html>

View File

@ -1,10 +1,11 @@
<!doctype html>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta charset="UTF-8">
<title>Previous/Next example</title>
</head>
<body>
<h1>'Previous/Next' example</h1>
<div>
@ -15,7 +16,7 @@
</div>
<div>
<canvas id="the-canvas" style="border: 1px solid black; direction: ltr"></canvas>
<canvas id="the-canvas" style="border: 1px solid black; direction: ltr;"></canvas>
</div>
<script src="../../node_modules/pdfjs-dist/build/pdf.mjs" type="module"></script>
@ -25,22 +26,23 @@
// If absolute URL from the remote server is provided, configure the CORS
// header on that server.
//
var url = "../../web/compressed.tracemonkey-pldi-09.pdf";
var url = '../../web/compressed.tracemonkey-pldi-09.pdf';
//
// In cases when the pdf.worker.js is located at the different folder than the
// PDF.js's one, or the PDF.js is executed via eval(), the workerSrc property
// shall be specified.
//
pdfjsLib.GlobalWorkerOptions.workerSrc = "../../node_modules/pdfjs-dist/build/pdf.worker.mjs";
pdfjsLib.GlobalWorkerOptions.workerSrc =
'../../node_modules/pdfjs-dist/build/pdf.worker.mjs';
var pdfDoc = null,
pageNum = 1,
pageRendering = false,
pageNumPending = null,
scale = 0.8,
canvas = document.getElementById("the-canvas"),
ctx = canvas.getContext("2d");
canvas = document.getElementById('the-canvas'),
ctx = canvas.getContext('2d');
/**
* Get page info from document, resize canvas accordingly, and render page.
@ -50,7 +52,7 @@
pageRendering = true;
// Using promise to fetch the page
pdfDoc.getPage(num).then(function(page) {
var viewport = page.getViewport({ scale: scale });
var viewport = page.getViewport({ scale: scale, });
// Support HiDPI-screens.
var outputScale = window.devicePixelRatio || 1;
@ -59,7 +61,9 @@
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 = {
@ -81,7 +85,7 @@
});
// Update page counters
document.getElementById("page_num").textContent = num;
document.getElementById('page_num').textContent = num;
}
/**
@ -106,7 +110,7 @@
pageNum--;
queueRenderPage(pageNum);
}
document.getElementById("prev").addEventListener("click", onPrevPage);
document.getElementById('prev').addEventListener('click', onPrevPage);
/**
* Displays next page.
@ -118,17 +122,18 @@
pageNum++;
queueRenderPage(pageNum);
}
document.getElementById("next").addEventListener("click", onNextPage);
document.getElementById('next').addEventListener('click', onNextPage);
/**
* Asynchronously downloads PDF.
*/
var loadingTask = pdfjsLib.getDocument({ url });
var loadingTask = pdfjsLib.getDocument(url);
pdfDoc = await loadingTask.promise;
document.getElementById("page_count").textContent = pdfDoc.numPages;
document.getElementById('page_count').textContent = pdfDoc.numPages;
// Initial/first page rendering
renderPage(pageNum);
</script>
</body>
</html>

View File

@ -1,4 +1,4 @@
<!doctype html>
<!DOCTYPE html>
<!--
Copyright 2016 Mozilla Foundation
@ -16,13 +16,13 @@ limitations under the License.
-->
<html dir="ltr">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title>PDF.js viewer</title>
<link rel="stylesheet" href="../../node_modules/pdfjs-dist/web/pdf_viewer.css" />
<link rel="stylesheet" type="text/css" href="viewer.css" />
<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.mjs" type="module"></script>
<script src="../../node_modules/pdfjs-dist/web/pdf_viewer.mjs" type="module"></script>
@ -46,7 +46,7 @@ limitations under the License.
<button class="toolbarButton pageUp" title="Previous Page" id="previous" type="button"></button>
<button class="toolbarButton pageDown" title="Next Page" id="next" type="button"></button>
<input type="number" id="pageNumber" class="toolbarField pageNumber" value="1" size="4" min="1" />
<input type="number" id="pageNumber" class="toolbarField pageNumber" value="1" size="4" min="1">
<button class="toolbarButton zoomOut" title="Zoom Out" id="zoomOut" type="button"></button>
<button class="toolbarButton zoomIn" title="Zoom In" id="zoomIn" type="button"></button>

View File

@ -46,13 +46,19 @@ const PDFViewerApplication = {
* @returns {Promise} - Returns the promise, which is resolved when document
* is opened.
*/
async open(params) {
open(params) {
if (this.pdfLoadingTask) {
// We need to destroy already opened document.
await this.close();
// We need to destroy already opened document
return this.close().then(
function () {
// ... and repeat the open() call.
return this.open(params);
}.bind(this)
);
}
const { url } = params;
const url = params.url;
const self = this;
this.setTitleUsingUrl(url);
// Loading document.
@ -64,22 +70,24 @@ const PDFViewerApplication = {
});
this.pdfLoadingTask = loadingTask;
loadingTask.onProgress = evt => this.progress(evt.percent);
loadingTask.onProgress = function (progressData) {
self.progress(progressData.loaded / progressData.total);
};
return loadingTask.promise.then(
pdfDocument => {
function (pdfDocument) {
// Document loaded, specifying document for the viewer.
this.pdfDocument = pdfDocument;
this.pdfViewer.setDocument(pdfDocument);
this.pdfLinkService.setDocument(pdfDocument);
this.pdfHistory.initialize({
self.pdfDocument = pdfDocument;
self.pdfViewer.setDocument(pdfDocument);
self.pdfLinkService.setDocument(pdfDocument);
self.pdfHistory.initialize({
fingerprint: pdfDocument.fingerprints[0],
});
this.loadingBar.hide();
this.setTitleUsingMetadata(pdfDocument);
self.loadingBar.hide();
self.setTitleUsingMetadata(pdfDocument);
},
reason => {
function (reason) {
let key = "pdfjs-loading-error";
if (reason instanceof pdfjsLib.InvalidPDFException) {
key = "pdfjs-invalid-file-error";
@ -88,10 +96,10 @@ const PDFViewerApplication = {
? "pdfjs-missing-file-error"
: "pdfjs-unexpected-response-error";
}
this.l10n.get(key).then(msg => {
this.error(msg, { message: reason.message });
self.l10n.get(key).then(msg => {
self.error(msg, { message: reason?.message });
});
this.loadingBar.hide();
self.loadingBar.hide();
}
);
},
@ -101,9 +109,9 @@ const PDFViewerApplication = {
* @returns {Promise} - Returns the promise, which is resolved when all
* destruction is completed.
*/
async close() {
close() {
if (!this.pdfLoadingTask) {
return;
return Promise.resolve();
}
const promise = this.pdfLoadingTask.destroy();
@ -120,7 +128,7 @@ const PDFViewerApplication = {
}
}
await promise;
return promise;
},
get loadingBar() {
@ -144,21 +152,32 @@ const PDFViewerApplication = {
this.setTitle(title);
},
async setTitleUsingMetadata(pdfDocument) {
const { info, metadata } = await pdfDocument.getMetadata();
this.documentInfo = info;
this.metadata = metadata;
setTitleUsingMetadata(pdfDocument) {
const self = this;
pdfDocument.getMetadata().then(function (data) {
const info = data.info,
metadata = data.metadata;
self.documentInfo = info;
self.metadata = metadata;
// Provides some basic debug information
console.log(
`PDF ${pdfDocument.fingerprints[0]} [${info.PDFFormatVersion} ` +
`${(metadata?.get("pdf:producer") || info.Producer || "-").trim()} / ` +
`${(metadata?.get("xmp:creatortool") || info.Creator || "-").trim()}` +
`] (PDF.js: ${pdfjsLib.version || "?"} [${pdfjsLib.build || "?"}])`
"PDF " +
pdfDocument.fingerprints[0] +
" [" +
info.PDFFormatVersion +
" " +
(info.Producer || "-").trim() +
" / " +
(info.Creator || "-").trim() +
"]" +
" (PDF.js: " +
(pdfjsLib.version || "-") +
")"
);
let pdfTitle;
if (metadata?.has("dc:title")) {
if (metadata && metadata.has("dc:title")) {
const title = metadata.get("dc:title");
// Ghostscript sometimes returns 'Untitled', so prevent setting the
// title to 'Untitled.
@ -166,11 +185,15 @@ const PDFViewerApplication = {
pdfTitle = title;
}
}
pdfTitle ||= info?.Title;
if (!pdfTitle && info && info.Title) {
pdfTitle = info.Title;
}
if (pdfTitle) {
this.setTitle(pdfTitle + " - " + document.title);
self.setTitle(pdfTitle + " - " + document.title);
}
});
},
setTitle: function pdfViewSetTitle(title) {
@ -200,7 +223,8 @@ const PDFViewerApplication = {
console.error(`${message}\n\n${moreInfoText.join("\n")}`);
},
progress(percent) {
progress: function pdfViewProgress(level) {
const percent = Math.round(level * 100);
// Updating the bar if value increases.
if (percent > this.loadingBar.percent || isNaN(percent)) {
this.loadingBar.percent = percent;

View File

@ -14,7 +14,7 @@ const pdfPath =
// Will be using promises to load document, pages and misc data instead of
// callback.
const loadingTask = getDocument({ url: pdfPath });
const loadingTask = getDocument(pdfPath);
loadingTask.promise
.then(function (doc) {
const numPages = doc.numPages;

View File

@ -1,13 +1,14 @@
<!doctype html>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta charset="UTF-8">
<title>Text-only PDF.js example</title>
<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>
<div id="pageContainer" style="display: inline-block; border: solid 1px black"></div>
<div id="pageContainer" style="display: inline-block; border: solid 1px black;">
</div>
</body>
</html>

View File

@ -1,7 +1,7 @@
<!doctype html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta charset="UTF-8">
<title>webpack example</title>
<script src="../../build/webpack/main.bundle.js"></script>
</head>

View File

@ -45,7 +45,7 @@ function watchObjectOrEmbed(elem) {
// <embed src> <object data>
var srcAttribute = "src" in elem ? "src" : "data";
var path = elem[srcAttribute];
if (!mimeType && !/\.pdf(?:$|[?#])/i.test(path)) {
if (!mimeType && !/\.pdf($|[?#])/i.test(path)) {
return;
}

View File

@ -16,7 +16,7 @@ limitations under the License.
-->
<html>
<head>
<meta charset="utf-8" />
<meta charset="utf-8">
<title>PDF.js viewer options</title>
<style>
body {
@ -42,7 +42,7 @@ limitations under the License.
<template id="checkbox-template">
<div class="settings-row checkbox">
<label>
<input type="checkbox" />
<input type="checkbox">
<span></span>
</label>
</div>

View File

@ -168,7 +168,7 @@ function renderEnumPref(shortDescription, prefName) {
var select = wrapper.querySelector("select");
select.onchange = function () {
var pref = {};
pref[prefName] = parseInt(this.value, 10);
pref[prefName] = parseInt(this.value);
storageArea.set(pref);
};
wrapper.querySelector("span").textContent = shortDescription;
@ -192,7 +192,7 @@ function renderDefaultZoomValue(shortDescription) {
document.getElementById("settings-boxes").append(wrapper);
function renderPreference(value) {
value ||= "auto";
value = value || "auto";
select.value = value;
var customOption = select.querySelector("option.custom-zoom");
if (select.selectedIndex === -1 && value) {

View File

@ -69,7 +69,7 @@ async function registerPdfRedirectRule() {
},
};
// Rules in order of priority (highest priority rule first).
// Rules in order of prority (highest priority rule first).
// The required "id" fields will be auto-generated later.
const addRules = [
{

View File

@ -0,0 +1,238 @@
{
"type": "object",
"properties": {
"viewerCssTheme": {
"title": "Theme",
"description": "The theme to use.\n0 = Use system theme.\n1 = Light theme.\n2 = Dark theme.",
"type": "integer",
"enum": [0, 1, 2],
"default": 2
},
"showPreviousViewOnLoad": {
"description": "DEPRECATED. Set viewOnLoad to 1 to disable showing the last page/position on load.",
"type": "boolean",
"default": true
},
"viewOnLoad": {
"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],
"default": 0
},
"defaultZoomDelay": {
"title": "Default zoom delay",
"description": "Delay (in ms) to wait before redrawing the canvas.",
"type": "integer",
"default": 400
},
"defaultZoomValue": {
"title": "Default zoom level",
"description": "Default zoom level of the viewer. Accepted values: 'auto', 'page-actual', 'page-width', 'page-height', 'page-fit', or a zoom level in percents.",
"type": "string",
"pattern": "|auto|page-actual|page-width|page-height|page-fit|[0-9]+\\.?[0-9]*(,[0-9]+\\.?[0-9]*){0,2}",
"default": ""
},
"sidebarViewOnLoad": {
"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],
"default": -1
},
"enableHandToolOnLoad": {
"description": "DEPRECATED. Set cursorToolOnLoad to 1 to enable the hand tool by default.",
"type": "boolean",
"default": false
},
"enableHWA": {
"title": "Enable hardware acceleration",
"description": "Whether to enable hardware acceleration.",
"type": "boolean",
"default": true
},
"enableAltText": {
"type": "boolean",
"default": false
},
"enableGuessAltText": {
"type": "boolean",
"default": true
},
"enableAltTextModelDownload": {
"type": "boolean",
"default": true
},
"enableNewAltTextWhenAddingImage": {
"type": "boolean",
"default": true
},
"altTextLearnMoreUrl": {
"type": "string",
"default": ""
},
"enableSignatureEditor": {
"type": "boolean",
"default": false
},
"enableUpdatedAddImage": {
"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],
"default": 0
},
"pdfBugEnabled": {
"title": "Enable debugging tools",
"description": "Whether to enable debugging tools.",
"type": "boolean",
"default": false
},
"enableScripting": {
"title": "Enable active content (JavaScript) in PDFs",
"type": "boolean",
"description": "Whether to allow execution of active content (JavaScript) by PDF files.",
"default": false
},
"enableHighlightFloatingButton": {
"type": "boolean",
"default": false
},
"highlightEditorColors": {
"type": "string",
"default": "yellow=#FFFF98,green=#53FFBC,blue=#80EBFF,pink=#FFCBE6,red=#FF4F5F"
},
"disableRange": {
"title": "Disable range requests",
"description": "Whether to disable range requests (not recommended).",
"type": "boolean",
"default": false
},
"disableStream": {
"title": "Disable streaming for requests",
"description": "Whether to disable streaming for requests (not recommended).",
"type": "boolean",
"default": false
},
"disableAutoFetch": {
"type": "boolean",
"default": false
},
"disableFontFace": {
"title": "Disable @font-face",
"description": "Whether to disable @font-face and fall back to canvas rendering (this is more resource-intensive).",
"type": "boolean",
"default": false
},
"disableTextLayer": {
"description": "DEPRECATED. Set textLayerMode to 0 to disable the text selection layer by default.",
"type": "boolean",
"default": false
},
"textLayerMode": {
"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],
"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],
"default": 0
},
"disablePageLabels": {
"type": "boolean",
"default": false
},
"disablePageMode": {
"description": "DEPRECATED.",
"type": "boolean",
"default": false
},
"disableTelemetry": {
"title": "Disable telemetry",
"type": "boolean",
"description": "Whether to prevent the extension from reporting the extension and browser version to the extension developers.",
"default": false
},
"annotationMode": {
"type": "integer",
"enum": [0, 1, 2, 3],
"default": 2
},
"annotationEditorMode": {
"type": "integer",
"enum": [-1, 0, 3, 15],
"default": 0
},
"capCanvasAreaFactor": {
"type": "integer",
"default": 200
},
"enablePermissions": {
"type": "boolean",
"default": false
},
"enableXfa": {
"type": "boolean",
"default": true
},
"historyUpdateUrl": {
"type": "boolean",
"default": false
},
"ignoreDestinationZoom": {
"title": "Ignore the zoom argument in destinations",
"description": "When enabled it will maintain the currently active zoom level, rather than letting the PDF document modify it, when navigating to internal destinations.",
"type": "boolean",
"default": false
},
"enablePrintAutoRotate": {
"title": "Automatically rotate printed pages",
"description": "When enabled, landscape pages are rotated when printed.",
"type": "boolean",
"default": true
},
"scrollModeOnLoad": {
"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],
"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],
"default": -1
},
"forcePageColors": {
"description": "When enabled, the pdf rendering will use the high contrast mode colors",
"type": "boolean",
"default": false
},
"pageColorsBackground": {
"description": "The color is a string as defined in CSS. Its goal is to help improve readability in high contrast mode",
"type": "string",
"default": "Canvas"
},
"pageColorsForeground": {
"description": "The color is a string as defined in CSS. Its goal is to help improve readability in high contrast mode",
"type": "string",
"default": "CanvasText"
},
"enableAutoLinking": {
"description": "Enable creation of hyperlinks from text that look like URLs.",
"type": "boolean",
"default": true
}
}
}

View File

@ -96,7 +96,7 @@ limitations under the License.
chrome.storage.local.get(localStorage, items => {
Object.assign(localStorage, items);
var lastTime = parseInt(localStorage.telemetryLastTime, 10) || 0;
var lastTime = parseInt(localStorage.telemetryLastTime) || 0;
var wasUpdated = didUpdateSinceLastCheck();
if (!wasUpdated && Date.now() - lastTime < MINIMUM_TIME_BETWEEN_PING) {
return;
@ -150,7 +150,7 @@ limitations under the License.
*/
function didUpdateSinceLastCheck() {
var chromeVersion = /Chrome\/(\d+)\./.exec(navigator.userAgent);
chromeVersion &&= chromeVersion[1];
chromeVersion = chromeVersion && chromeVersion[1];
if (!chromeVersion || localStorage.telemetryLastVersion === chromeVersion) {
return false;
}

View File

@ -1,19 +0,0 @@
Copyright (c) 2009, 2010, 2013-2016 by the Brotli Authors.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

View File

@ -1,8 +0,0 @@
## Release
In order to get the file `decoder.js`:
* `gulp release-brotli --hash` followed by the git hash of the revision.
## Licensing
[brotli](https://github.com/google/brotli/) is under [MIT License](https://github.com/google/brotli/blob/master/LICENSE)

File diff suppressed because one or more lines are too long

View File

@ -190,19 +190,6 @@ function babelPluginPDFJSPreprocessor(babel, ctx) {
},
];
path.replaceWith(t.importExpression(source));
} else if (t.isIdentifier(node.callee, { name: "__eager_import__" })) {
if (node.arguments.length !== 1) {
throw new Error("Invalid `__eager_import__` usage.");
}
// Replace it with a standard `import`-call and inline the module.
const source = node.arguments[0];
source.leadingComments = [
{
type: "CommentBlock",
value: "webpackMode: 'eager'",
},
];
path.replaceWith(t.importExpression(source));
}
},
"BlockStatement|StaticBlock": {
@ -305,30 +292,6 @@ function babelPluginPDFJSPreprocessor(babel, ctx) {
};
}
function babelPluginStripSrcPath() {
return {
name: "babel-plugin-strip-src-path",
visitor: {
"ImportDeclaration|ExportNamedDeclaration|ExportAllDeclaration":
function ({ node }) {
if (node.source?.value.includes("/src/")) {
node.source.value = node.source.value.replace("/src/", "/");
}
},
},
};
}
function babelPluginAddHeaderComment(babel, { header }) {
return {
visitor: {
Program(path) {
path.addComment("leading", header);
},
},
};
}
function preprocessPDFJSCode(ctx, content) {
return transformSync(content, {
configFile: false,
@ -336,9 +299,4 @@ function preprocessPDFJSCode(ctx, content) {
}).code;
}
export {
babelPluginAddHeaderComment,
babelPluginPDFJSPreprocessor,
babelPluginStripSrcPath,
preprocessPDFJSCode,
};
export { babelPluginPDFJSPreprocessor, preprocessPDFJSCode };

View File

@ -39,22 +39,15 @@ function preprocess(inFilename, outFilename, defines) {
}
function expandCssImports(content, baseUrl) {
if (defines.GECKOVIEW) {
// In Geckoview, we don't need some styles.
const startComment = "/* Ignored in GECKOVIEW: begin */";
const endComment = "/* Ignored in GECKOVIEW: end */";
const beginIndex = content.indexOf(startComment);
const endIndex = content.indexOf(endComment);
if (beginIndex >= 0 && endIndex > beginIndex) {
content =
content.substring(0, beginIndex) +
content.substring(endIndex + endComment.length);
}
}
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);
@ -113,9 +106,16 @@ function preprocess(inFilename, outFilename, defines) {
const realPath = fs.realpathSync(inFilename);
const dir = path.dirname(realPath);
try {
const fullpath = file.startsWith("$ROOT/")
? path.join(__dirname, "../..", file.substring("$ROOT/".length))
: path.join(dir, file);
let fullpath;
if (file.indexOf("$ROOT/") === 0) {
fullpath = path.join(
__dirname,
"../..",
file.substring("$ROOT/".length)
);
} else {
fullpath = path.join(dir, file);
}
preprocess(fullpath, writeLine, defines);
} catch (e) {
if (e.code === "ENOENT") {
@ -125,7 +125,7 @@ function preprocess(inFilename, outFilename, defines) {
}
}
function expand(line) {
line = line.replaceAll(/__\w+__/g, function (variable) {
line = line.replaceAll(/__[\w]+__/g, function (variable) {
variable = variable.substring(2, variable.length - 2);
if (variable in defines) {
return defines[variable];
@ -151,8 +151,7 @@ function preprocess(inFilename, outFilename, defines) {
let state = STATE_NONE;
const stack = [];
const control =
// eslint-disable-next-line regexp/no-super-linear-backtracking
/^(?:\/\/|\s*\/\*|\s*<!--)\s*#(if|elif|else|endif|expand|include|error)\b(?:\s+(.*?)(?:\*\/|-->)?$)?/;
/^(?:\/\/|\s*\/\*|<!--)\s*#(if|elif|else|endif|expand|include|error)\b(?:\s+(.*?)(?:\*\/|-->)?$)?/;
while ((line = readLine()) !== null) {
++lineNumber;
@ -214,7 +213,7 @@ function preprocess(inFilename, outFilename, defines) {
) {
writeLine(
line
.replaceAll(/^\/\/|^\s*<!--/g, " ")
.replaceAll(/^\/\/|^<!--/g, " ")
.replaceAll(/(^\s*)\/\*/g, "$1 ")
.replaceAll(/\*\/$|-->$/g, "")
);

View File

@ -1,40 +0,0 @@
/* Copyright 2026 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.
*/
const COVERAGE_FORMAT_TO_REPORTER = {
info: "lcovonly",
html: "html",
json: "json",
text: "text",
cobertura: "cobertura",
clover: "clover",
};
function parseCoverageFormats(str) {
const formats = new Set();
for (const fmt of (str ?? "").split(",")) {
const name = fmt.trim();
if (name && COVERAGE_FORMAT_TO_REPORTER[name]) {
formats.add(name);
} else if (name) {
console.warn(
`### Unknown coverage format "${name}", valid values: ${Object.keys(COVERAGE_FORMAT_TO_REPORTER).join(", ")}`
);
}
}
return formats.size > 0 ? formats : new Set(["info"]);
}
export { COVERAGE_FORMAT_TO_REPORTER, parseCoverageFormats };

View File

@ -1,241 +0,0 @@
/* Copyright 2026 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 fs from "fs";
import { parseArgs } from "node:util";
import path from "path";
const __dirname = import.meta.dirname;
const PROJECT_ROOT = path.join(__dirname, "../..");
// The per-test coverage index (which ref test exercises which source
// line/function) is rebuilt on every push to master and published to the
// gh-pages branch of the pdf.js.refs repository.
const PER_TEST_INDEX_URL =
"https://raw.githubusercontent.com/mozilla/pdf.js.refs/gh-pages/per-test-index.json";
let values;
try {
({ values } = parseArgs({
args: process.argv.slice(2),
options: {
code: { type: "string" },
index: { type: "string", default: "build/per-test-index.json" },
"no-download": { type: "boolean", default: false },
help: { type: "boolean", short: "h", default: false },
},
}));
} catch (error) {
// parseArgs is strict, so an unknown/renamed option (e.g. the removed
// --coverage-dir) would otherwise abort with an uncaught stack trace.
console.error(`Error: ${error.message}`);
console.error("Run with --help to see the available options.");
process.exit(1);
}
if (values.help || !values.code) {
console.log(
"Usage: coverage_search.mjs --code=<file>::<line|function> [--index=<path>] [--no-download]\n\n" +
" --code Source file and line number or function name to search for.\n" +
" Examples:\n" +
" --code=canvas.js::205\n" +
" --code=canvas.js::drawImageAtIntegerCoords\n" +
" --index Where to cache or read the per-test index.\n" +
" [build/per-test-index.json]\n" +
" --no-download Don't contact the network; use the cached index as-is.\n\n" +
"Prints to stdout the IDs of tests whose coverage includes the given line or\n" +
"function (one ID per line).\n\n" +
"The index is downloaded from the pdf.js.refs repository and cached locally;\n" +
"it is only re-downloaded when the published file has changed.\n" +
`Source: ${PER_TEST_INDEX_URL}`
);
process.exit(values.help ? 0 : 1);
}
const sep = values.code.indexOf("::");
if (sep === -1) {
console.error(
"Error: --code must be in format 'file.js::line_or_function', e.g. canvas.js::205"
);
process.exit(1);
}
const fileName = values.code.slice(0, sep);
const location = values.code.slice(sep + 2);
const isLine = /^\d+$/.test(location);
const lineNum = isLine ? parseInt(location, 10) : null;
const funcName = isLine ? null : location;
const indexPath = path.isAbsolute(values.index)
? values.index
: path.join(PROJECT_ROOT, values.index);
// The ETag of the cached copy is stored alongside it, so the next run can ask
// the server (via If-None-Match) to only re-send the file when it has changed.
const etagPath = `${indexPath}.etag`;
// Refreshes the locally cached index from the published copy, downloading it
// only when it has changed since the last run. When the network is unavailable
// a previously cached copy is reused if present.
async function refreshIndex() {
if (values["no-download"]) {
return; // Freshness check disabled; the read below validates existence.
}
const hasCached = fs.existsSync(indexPath);
// On any download failure, fall back to a previously cached copy when one
// exists; otherwise there's nothing to search, so fail.
const fallbackOrFail = reason => {
if (hasCached) {
console.error(
`Warning: couldn't refresh per-test index (${reason}); using the cached copy.`
);
return;
}
console.error(`Error: couldn't download per-test index (${reason}).`);
process.exit(1);
};
const headers = new Headers();
if (hasCached && fs.existsSync(etagPath)) {
const etag = fs.readFileSync(etagPath, "utf8").trim();
// Only forward a syntactically valid HTTP ETag (RFC 7232), so the cached
// file's contents can't be used to inject arbitrary data into the request.
if (/^(?:W\/)?"[\x21\x23-\x7e]*"$/.test(etag)) {
headers.set("If-None-Match", etag);
}
}
let response;
try {
console.log(`Fetching per-test index from ${PER_TEST_INDEX_URL} ...`);
response = await fetch(PER_TEST_INDEX_URL, { headers });
} catch (error) {
fallbackOrFail(error.message);
return;
}
if (response.status === 304) {
console.log("Per-test index is up to date.");
return;
}
if (!response.ok) {
fallbackOrFail(`HTTP ${response.status}`);
return;
}
let text;
try {
text = await response.text();
} catch (error) {
fallbackOrFail(error.message);
return;
}
// Parse the payload before caching it, and cache the re-serialized result
// rather than the raw response body: only well-formed JSON produced by our
// own JSON.stringify is ever written to disk.
let serialized;
try {
serialized = JSON.stringify(JSON.parse(text));
} catch {
fallbackOrFail("the downloaded index is not valid JSON");
return;
}
// Write to a temporary file and rename it into place.
try {
fs.mkdirSync(path.dirname(indexPath), { recursive: true });
const tmpPath = `${indexPath}.${process.pid}.tmp`;
fs.writeFileSync(tmpPath, serialized);
fs.renameSync(tmpPath, indexPath);
const etag = response.headers.get("etag");
if (etag) {
fs.writeFileSync(etagPath, etag);
} else {
fs.rmSync(etagPath, { force: true });
}
} catch (error) {
// A write failure (disk full, read-only dir, ...) shouldn't be fatal when
// a usable cached copy already exists.
fallbackOrFail(error.message);
return;
}
console.log(`Per-test index updated (${serialized.length} bytes).`);
}
await refreshIndex();
if (!fs.existsSync(indexPath)) {
console.error(`Error: per-test index not found: ${indexPath}`);
console.error(
"Build it locally (gulp botbrowsertest --coverage-per-test) or omit " +
"--no-download to fetch it from the pdf.js.refs repository."
);
process.exit(1);
}
let ids, files;
try {
({ ids, files } = JSON.parse(fs.readFileSync(indexPath, "utf8")));
} catch (error) {
console.error(
`Error: couldn't read per-test index at ${indexPath}: ${error.message}`
);
console.error(
"The cached index may be corrupt; delete it and re-run without " +
"--no-download to refetch it."
);
process.exit(1);
}
// Find the file entry whose path matches fileName.
let fileEntry = null;
for (const [filePath, entry] of Object.entries(files)) {
if (
filePath === fileName ||
filePath.endsWith(`/${fileName}`) ||
filePath.endsWith(`\\${fileName}`)
) {
fileEntry = entry;
break;
}
}
if (!fileEntry) {
process.exit(0);
}
let testIndices = null;
if (lineNum !== null) {
// Direct line lookup.
testIndices = fileEntry.l?.[lineNum];
// If no hit, check whether lineNum is a function declaration start and
// redirect to that function's coverage.
if (!testIndices && fileEntry.fstarts?.[lineNum]) {
testIndices = fileEntry.f?.[fileEntry.fstarts[lineNum]];
}
} else {
testIndices = fileEntry.f?.[funcName];
}
if (testIndices) {
for (const idx of testIndices) {
console.log(ids[idx]);
}
}

View File

@ -1,190 +0,0 @@
#!/usr/bin/env node
/* Copyright 2026 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.
*/
/**
* Checks that every message ID defined in l10n/en-US/viewer.ftl is referenced
* in at least one HTML or JS/MJS file under the web/ directory.
*
* Usage: node external/check_l10n/check_l10n.mjs
*/
import { extname, join } from "path";
import { readdirSync, readFileSync, statSync } from "fs";
const ROOT = join(import.meta.dirname, "..", "..");
const FTL_PATH = join(ROOT, "l10n", "en-US", "viewer.ftl");
const SEARCH_DIRS = ["web", "src"];
const SEARCH_EXTENSIONS = new Set([".html", ".js", ".mjs"]);
// Minimum number of characters a prefix or suffix fragment must have to be
// considered a meaningful match when detecting dynamically-built IDs.
const MIN_FRAGMENT_LENGTH = 6;
/**
* Extract all message IDs from a Fluent (.ftl) file.
* A message ID is an identifier at the start of a line followed by " =".
* @param {string} ftlPath - Absolute path to the .ftl file.
* @returns {string[]} Ordered list of message IDs.
*/
function extractFtlIds(ftlPath) {
const lines = readFileSync(ftlPath, "utf8").split("\n");
const ids = [];
for (const line of lines) {
const match = line.match(/^([a-z][a-z0-9-]*)\s*=/i);
if (match) {
ids.push(match[1]);
}
}
return ids;
}
/**
* Recursively collect all files with matching extensions under a directory.
* @param {string} dir - Directory to walk.
* @param {Set<string>} extensions - Allowed file extensions (e.g. `".js"`).
* @returns {string[]} Absolute paths of matching files.
*/
function collectFiles(dir, extensions) {
const results = [];
for (const entry of readdirSync(dir)) {
const fullPath = join(dir, entry);
const stat = statSync(fullPath);
if (stat.isDirectory()) {
results.push(...collectFiles(fullPath, extensions));
} else if (extensions.has(extname(entry))) {
results.push(fullPath);
}
}
return results;
}
/**
* Load the contents of all source files found under the given directories.
* @param {string[]} dirs - Directory names relative to ROOT.
* @param {Set<string>} extensions - Allowed file extensions.
* @returns {{ path: string, content: string }[]}
*/
function loadSources(dirs, extensions) {
const files = dirs.flatMap(d => collectFiles(join(ROOT, d), extensions));
return files.map(f => ({ path: f, content: readFileSync(f, "utf8") }));
}
/**
* Check whether a message ID appears as a quoted string literal in any source
* file. Handles double quotes, single quotes, and backticks, covering:
* - `data-l10n-id="pdfjs-foo"` (HTML attribute)
* - `"pdfjs-foo"` / `'pdfjs-foo'` / `` `pdfjs-foo` `` (JS string literals,
* `setAttribute`, `l10n.get`, )
* @param {string} id - Message ID to look up.
* @param {{ path: string, content: string }[]} sources
* @returns {boolean}
*/
function isUsed(id, sources) {
const dq = `"${id}"`;
const sq = `'${id}'`;
const bt = `\`${id}\``;
return sources.some(
({ content }) =>
content.includes(dq) || content.includes(sq) || content.includes(bt)
);
}
/**
* For IDs not found as complete literals, check whether the ID is likely
* constructed dynamically via a template literal such as:
* `pdfjs-editor-${editorType}-added-alert`
*
* Strategy: try every (prefix, suffix) pair obtained by splitting the ID's
* dash-separated components, leaving one or more components as the "variable"
* gap. The prefix must appear immediately followed by `${` in a template
* literal; the suffix (if non-empty) must also appear in the same file.
* Minimum length guards prevent matches on trivially short fragments.
*
* @param {string} id - Message ID to test.
* @param {{ path: string, content: string }[]} sources
* @returns {{ path: string, line: number } | null} Location of the first
* matching template literal, or `null` if none found.
*/
function findDynamicLocation(id, sources) {
const parts = id.split("-");
// i = end of prefix (exclusive), j = start of suffix (inclusive)
for (let i = 1; i < parts.length; i++) {
for (let j = i + 1; j <= parts.length; j++) {
const prefix = parts.slice(0, i).join("-") + "-"; // e.g. "pdfjs-editor-"
const suffix = j < parts.length ? "-" + parts.slice(j).join("-") : ""; // e.g. "-added-alert"
if (prefix.length < MIN_FRAGMENT_LENGTH) {
continue;
}
if (suffix !== "" && suffix.length < MIN_FRAGMENT_LENGTH) {
continue;
}
// The prefix must be immediately followed by "${" in a template literal.
const prefixWithVar = prefix + "${";
for (const { path, content } of sources) {
if (
content.includes(prefixWithVar) &&
(suffix === "" || content.includes(suffix))
) {
const idx = content.indexOf(prefixWithVar);
const line = content.slice(0, idx).split("\n").length;
return { path, line };
}
}
}
}
return null;
}
function main() {
const ids = extractFtlIds(FTL_PATH);
console.log(`Found ${ids.length} message IDs in viewer.ftl\n`);
const sources = loadSources(SEARCH_DIRS, SEARCH_EXTENSIONS);
console.log(
`Searching in ${sources.length} files under: ${SEARCH_DIRS.join(", ")}\n`
);
const notFound = ids.filter(id => !isUsed(id, sources));
const dynamicEntries = notFound
.map(id => ({ id, loc: findDynamicLocation(id, sources) }))
.filter(({ loc }) => loc !== null);
const dynamicIds = new Set(dynamicEntries.map(({ id }) => id));
const unused = notFound.filter(id => !dynamicIds.has(id));
if (dynamicEntries.length > 0) {
console.log(
`~ ${dynamicEntries.length} ID(s) likely built dynamically (template literals):\n`
);
for (const { id, loc } of dynamicEntries) {
const rel = loc.path.replace(ROOT + "/", "").replace(ROOT + "\\", "");
console.log(` ${id}`);
console.log(`${rel}:${loc.line}`);
}
console.log();
}
if (unused.length === 0) {
console.log("✓ All remaining message IDs are used.");
} else {
console.log(`${unused.length} unused message ID(s):\n`);
for (const id of unused) {
console.log(` ${id}`);
}
process.exitCode = 1;
}
}
main();

View File

@ -1,270 +0,0 @@
/* Copyright 2026 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.
*/
const prefsMetadata = {
annotationEditorMode: {
enum: [-1, 0, 3, 15],
},
annotationMode: {
enum: [0, 1, 2, 3],
},
cursorToolOnLoad: {
title: "Cursor tool on load",
description:
"The cursor tool that is enabled upon load.\n 0 = Text selection tool.\n 1 = Hand tool.",
enum: [0, 1],
},
defaultZoomDelay: {
title: "Default zoom delay",
description: "Delay (in ms) to wait before redrawing the canvas.",
},
defaultZoomValue: {
title: "Default zoom level",
description:
"Default zoom level of the viewer. Accepted values: 'auto', 'page-actual', 'page-width', 'page-height', 'page-fit', or a zoom level in percents.",
pattern:
"|auto|page-actual|page-width|page-height|page-fit|[0-9]+\\.?[0-9]*(,[0-9]+\\.?[0-9]*){0,2}",
},
disableFontFace: {
title: "Disable @font-face",
description:
"Whether to disable @font-face and fall back to canvas rendering (this is more resource-intensive).",
},
disableRange: {
title: "Disable range requests",
description: "Whether to disable range requests (not recommended).",
},
disableStream: {
title: "Disable streaming for requests",
description: "Whether to disable streaming for requests (not recommended).",
},
disableTelemetry: {
title: "Disable telemetry",
description:
"Whether to prevent the extension from reporting the extension and browser version to the extension developers.",
},
enableAutoLinking: {
description: "Enable creation of hyperlinks from text that look like URLs.",
},
enableComment: {
description: "Enable creation of comment annotations.",
},
enableHWA: {
title: "Enable hardware acceleration",
description: "Whether to enable hardware acceleration.",
},
enableOptimizedPartialRendering: {
description:
"Enable tracking of PDF operations to optimize partial rendering.",
},
enablePrintAutoRotate: {
title: "Automatically rotate printed pages",
description: "When enabled, landscape pages are rotated when printed.",
},
enableScripting: {
title: "Enable active content (JavaScript) in PDFs",
description:
"Whether to allow execution of active content (JavaScript) by PDF files.",
},
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.",
enum: [0, 1, 2, 3, 4],
},
forcePageColors: {
description:
"When enabled, the pdf rendering will use the high contrast mode colors",
},
ignoreDestinationZoom: {
title: "Ignore the zoom argument in destinations",
description:
"When enabled it will maintain the currently active zoom level, rather than letting the PDF document modify it, when navigating to internal destinations.",
},
pageColorsBackground: {
description:
"The color is a string as defined in CSS. Its goal is to help improve readability in high contrast mode",
},
pageColorsForeground: {
description:
"The color is a string as defined in CSS. Its goal is to help improve readability in high contrast mode",
},
pdfBugEnabled: {
title: "Enable debugging tools",
description: "Whether to enable debugging tools.",
},
scrollModeOnLoad: {
title: "Scroll mode on load",
description:
"Controls how the viewer scrolls upon load.\n -1 = Default (uses the last position if available/enabled).\n 0 = Vertical scrolling.\n 1 = Horizontal scrolling.\n 2 = Wrapped scrolling.\n 3 = Page scrolling.",
enum: [-1, 0, 1, 2, 3],
},
sidebarViewOnLoad: {
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.",
enum: [-1, 0, 1, 2, 3],
},
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.",
enum: [-1, 0, 1, 2],
},
textLayerMode: {
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.",
enum: [0, 1],
},
viewerCssTheme: {
title: "Theme",
description:
"The theme to use.\n0 = Use system theme.\n1 = Light theme.\n2 = Dark theme.",
enum: [0, 1, 2],
},
viewOnLoad: {
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.",
enum: [-1, 0, 1],
},
};
// Deprecated keys are allowed in the managed preferences file.
// The code maintainer is responsible for adding migration logic to
// extensions/chromium/options/migration.js and web/chromecom.js .
const deprecatedPrefs = {
disablePageMode: {
description: "DEPRECATED.",
type: "boolean",
default: false,
},
disableTextLayer: {
description:
"DEPRECATED. Set textLayerMode to 0 to disable the text selection layer by default.",
type: "boolean",
default: false,
},
enableHandToolOnLoad: {
description:
"DEPRECATED. Set cursorToolOnLoad to 1 to enable the hand tool by default.",
type: "boolean",
default: false,
},
showPreviousViewOnLoad: {
description:
"DEPRECATED. Set viewOnLoad to 1 to disable showing the last page/position on load.",
type: "boolean",
default: true,
},
};
function buildPrefsSchema(prefs) {
const properties = Object.create(null);
for (const name in prefs) {
const pref = prefs[name];
let type = typeof pref;
switch (type) {
case "boolean":
case "string":
break;
case "number":
type = "integer";
break;
default:
throw new Error(`Invalid type (${type}) for "${name}"-preference.`);
}
const metadata = prefsMetadata[name];
if (metadata) {
let numMetadataKeys = 0;
// Do some (very basic) validation of the metadata.
for (const key in metadata) {
const entry = metadata[key];
switch (key) {
case "default":
case "type":
throw new Error(
`Invalid key (${key}) in metadata for "${name}"-preference.`
);
case "description":
if (entry.startsWith("DEPRECATED.")) {
throw new Error(
`The \`description\` of the "${name}"-preference cannot begin with "DEPRECATED."`
);
}
break;
}
numMetadataKeys++;
}
if (numMetadataKeys === 0) {
throw new Error(
`No metadata for "${name}"-preference, remove the entry.`
);
}
}
properties[name] = {
type,
default: pref,
...metadata,
};
}
for (const name in prefsMetadata) {
if (!properties[name]) {
// Do *not* throw here, since keeping the metadata up-to-date should be
// the responsibility of the CHROMIUM-addon maintainer.
console.error(
`The "${name}"-preference was removed, add it to \`deprecatedPrefs\` instead.\n`
);
}
}
for (const name in deprecatedPrefs) {
const entry = deprecatedPrefs[name];
if (properties[name]) {
throw new Error(
`The "${name}"-preference should not be listed as deprecated.`
);
}
if (!entry.description?.startsWith("DEPRECATED.")) {
throw new Error(
`The \`description\` of the deprecated "${name}"-preference must begin with "DEPRECATED."`
);
}
for (const key of ["default", "type"]) {
if (key in entry) {
continue;
}
throw new Error(
`A \`${key}\` entry must be provided for the deprecated "${name}"-preference.`
);
}
properties[name] = entry;
}
return {
type: "object",
properties,
};
}
export { buildPrefsSchema };

View File

@ -386,7 +386,7 @@ function writeNumber(n) {
if (buffer > 0) {
s = writeByte((buffer & 0x7f) | (s.length > 0 ? 0x80 : 0)) + s;
}
while (s.startsWith("80")) {
while (s.indexOf("80") === 0) {
s = s.substring(2);
}
return s;

View File

@ -14,7 +14,7 @@
*/
function parseAdobeCMap(content) {
let m = /(\bbegincmap\b[\s\S]+?)\bendcmap\b/.exec(content);
let m = /(\bbegincmap\b[\s\S]*?)\bendcmap\b/.exec(content);
if (!m) {
throw new Error("cmap was not found");
}
@ -37,7 +37,7 @@ function parseAdobeCMap(content) {
result.usecmap = m[1];
}
const re =
/(\d+)\s+(begincodespacerange|beginnotdefrange|begincidchar|begincidrange|beginbfchar|beginbfrange)\n([\s\S]*?)\n(?:endcodespacerange|endnotdefrange|endcidchar|endcidrange|endbfchar|endbfrange)/g;
/(\d+)\s+(begincodespacerange|beginnotdefrange|begincidchar|begincidrange|beginbfchar|beginbfrange)\n([\s\S]*?)\n(endcodespacerange|endnotdefrange|endcidchar|endcidrange|endbfchar|endbfrange)/g;
while ((m = re.exec(body))) {
const lines = m[3].toLowerCase().split("\n");

View File

@ -1,118 +0,0 @@
/**
* ESLint rule to prefer `MathClamp(v, min, max)` over nested
* `Math.min(Math.max(...), ...)` / `Math.max(Math.min(...), ...)` patterns.
*
* Detected patterns and their fixes:
* Math.min(Math.max(A, B), C) MathClamp(A, B, C)
* Math.min(C, Math.max(A, B)) MathClamp(A, B, C)
* Math.max(Math.min(A, B), C) MathClamp(A, C, B)
* Math.max(C, Math.min(A, B)) MathClamp(A, C, B)
*/
function isMathCall(node, method) {
return (
node.type === "CallExpression" &&
node.callee.type === "MemberExpression" &&
!node.callee.computed &&
node.callee.object.type === "Identifier" &&
node.callee.object.name === "Math" &&
node.callee.property.type === "Identifier" &&
node.callee.property.name === method &&
node.arguments.length === 2 &&
node.arguments.every(a => a.type !== "SpreadElement")
);
}
// Returns true if node is a Math.min or Math.max call.
function isMathMinMax(node) {
return isMathCall(node, "min") || isMathCall(node, "max");
}
const preferMathClampRule = {
meta: {
type: "suggestion",
fixable: "code",
docs: {
description:
"Prefer MathClamp(v, min, max) over nested Math.min/Math.max",
},
messages: {
useClamp:
"Use MathClamp(v, min, max) instead of nested Math.min/Math.max.",
},
schema: [],
},
create(context) {
const src = context.sourceCode ?? context.getSourceCode();
return {
CallExpression(node) {
// Pattern: Math.min(Math.max(A, B), C) or Math.min(C, Math.max(A, B)).
// Fix as MathClamp(A, B, C) where A,B are inner args, C is outer arg.
if (isMathCall(node, "min")) {
const [arg0, arg1] = node.arguments;
let outerArg, innerNode;
// Math.max(Math.min(A, B), Math.min(C, D)) isn't a clamp pattern, so
// require the outer arg to not be a min/max call.
if (isMathCall(arg0, "max") && !isMathMinMax(arg1)) {
innerNode = arg0;
outerArg = arg1;
} else if (isMathCall(arg1, "max") && !isMathMinMax(arg0)) {
innerNode = arg1;
outerArg = arg0;
} else {
return;
}
const v = src.getText(innerNode.arguments[0]);
const min = src.getText(innerNode.arguments[1]);
const max = src.getText(outerArg);
context.report({
node,
messageId: "useClamp",
fix(fixer) {
return fixer.replaceText(node, `MathClamp(${v}, ${min}, ${max})`);
},
});
}
// Pattern: Math.max(Math.min(A, B), C) or Math.max(C, Math.min(A, B)).
// Fix as MathClamp(A, C, B) where A,B are inner args, C is outer arg.
if (isMathCall(node, "max")) {
const [arg0, arg1] = node.arguments;
let outerArg, innerNode;
if (isMathCall(arg0, "min") && !isMathMinMax(arg1)) {
innerNode = arg0;
outerArg = arg1;
} else if (isMathCall(arg1, "min") && !isMathMinMax(arg0)) {
innerNode = arg1;
outerArg = arg0;
} else {
return;
}
const v = src.getText(innerNode.arguments[0]);
const max = src.getText(innerNode.arguments[1]);
const min = src.getText(outerArg);
context.report({
node,
messageId: "useClamp",
fix(fixer) {
return fixer.replaceText(node, `MathClamp(${v}, ${min}, ${max})`);
},
});
}
},
};
},
};
export default {
rules: {
"prefer-math-clamp": preferMathClampRule,
},
};

0
external/iccs/CGATS001Compat-v2-micro.icc vendored Normal file → Executable file
View File

View File

@ -91,7 +91,7 @@ async function downloadL10n(root) {
await downloadLanguageFiles(root, langCode);
}
const rmCodes = [];
const removeCodes = [];
for (const entry of fs.readdirSync(root)) {
const dirPath = path.join(root, entry),
stat = fs.lstatSync(dirPath);
@ -101,13 +101,14 @@ async function downloadL10n(root) {
entry !== DEFAULT_LOCALE &&
!langCodes.includes(entry)
) {
fs.rmSync(dirPath, { recursive: true, force: true });
rmCodes.push(entry);
removeCodes.push(entry);
}
}
if (rmCodes.length) {
if (removeCodes.length) {
console.log(
`\nRemoved the following unmaintained locales: ${rmCodes.join(", ")}\n`
"\nConsider removing the following unmaintained locales:\n" +
removeCodes.join(", ") +
"\n"
);
}
}

View File

@ -1,196 +0,0 @@
// Copyright 2014 The PDFium Authors
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Apache License
Version 2.0, January 2004
https://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
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
https://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.

View File

@ -1,13 +0,0 @@
Copyright 2026 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.

View File

@ -1,12 +0,0 @@
## Build
In order to generate the file `jbig2.js`:
* git clone https://github.com/mozilla/pdf.js.jbig2/
* the build requires to have a [Docker](https://www.docker.com/) setup and then:
* `node build.js -C` to build the Docker image
* `node build.js -co /pdf.js/external/jbig2/` to compile the decoder
## Licensing
[PDFium](https://pdfium.googlesource.com/pdfium/) is under [Apache-2.0](https://pdfium.googlesource.com/pdfium/+/main/LICENSE)
and [pdf.js.jbig2](https://github.com/mozilla/pdf.js.jbig2/) is released under [Apache-2.0](https://github.com/mozilla/pdf.js.jbig2/blob/main/LICENSE) license so `jbig2.js` is released under [Apache-2.0](https://github.com/mozilla/pdf.js.jbig2/blob/main/LICENSE) license too.

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because one or more lines are too long

240
external/qcms/qcms.js vendored
View File

@ -1,29 +1,34 @@
/* THIS FILE IS GENERATED - DO NOT EDIT */
import { copy_result, copy_rgb, make_cssRGB } from './qcms_utils.js';
let wasm;
/**
* @enum {0 | 1 | 2 | 3 | 4 | 5}
*/
export const DataType = Object.freeze({
RGB8: 0, "0": "RGB8",
RGBA8: 1, "1": "RGBA8",
BGRA8: 2, "2": "BGRA8",
Gray8: 3, "3": "Gray8",
GrayA8: 4, "4": "GrayA8",
CMYK: 5, "5": "CMYK",
});
const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
/**
* @enum {0 | 1 | 2 | 3}
*/
export const Intent = Object.freeze({
Perceptual: 0, "0": "Perceptual",
RelativeColorimetric: 1, "1": "RelativeColorimetric",
Saturation: 2, "2": "Saturation",
AbsoluteColorimetric: 3, "3": "AbsoluteColorimetric",
});
if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };
let cachedUint8ArrayMemory0 = null;
function getUint8ArrayMemory0() {
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
}
return cachedUint8ArrayMemory0;
}
function getStringFromWasm0(ptr, len) {
ptr = ptr >>> 0;
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
}
let WASM_VECTOR_LEN = 0;
function passArray8ToWasm0(arg, malloc) {
const ptr = malloc(arg.length * 1, 1) >>> 0;
getUint8ArrayMemory0().set(arg, ptr / 1);
WASM_VECTOR_LEN = arg.length;
return ptr;
}
/**
* # Safety
*
@ -37,21 +42,6 @@ export function qcms_convert_array(transformer, src) {
wasm.qcms_convert_array(transformer, ptr0, len0);
}
/**
* # Safety
*
* This function is called directly from JavaScript.
* @param {number} transformer
* @param {number} src1
* @param {number} src2
* @param {number} src3
* @param {number} src4
* @param {boolean} css
*/
export function qcms_convert_four(transformer, src1, src2, src3, src4, css) {
wasm.qcms_convert_four(transformer, src1, src2, src3, src4, css);
}
/**
* # Safety
*
@ -83,9 +73,14 @@ export function qcms_convert_three(transformer, src1, src2, src3, css) {
*
* This function is called directly from JavaScript.
* @param {number} transformer
* @param {number} src1
* @param {number} src2
* @param {number} src3
* @param {number} src4
* @param {boolean} css
*/
export function qcms_drop_transformer(transformer) {
wasm.qcms_drop_transformer(transformer);
export function qcms_convert_four(transformer, src1, src2, src3, src4, css) {
wasm.qcms_convert_four(transformer, src1, src2, src3, src4, css);
}
/**
@ -103,122 +98,117 @@ export function qcms_transformer_from_memory(mem, in_type, intent) {
const ret = wasm.qcms_transformer_from_memory(ptr0, len0, in_type, intent);
return ret >>> 0;
}
function __wbg_get_imports() {
const import0 = {
__proto__: null,
__wbg___wbindgen_throw_6b64449b9b9ed33c: function(arg0, arg1) {
throw new Error(getStringFromWasm0(arg0, arg1));
},
__wbg_copy_result_0d15f3bf9d9012ae: function(arg0, arg1) {
copy_result(arg0 >>> 0, arg1 >>> 0);
},
__wbg_copy_rgb_0106d9d9464fce43: function(arg0) {
copy_rgb(arg0 >>> 0);
},
__wbg_make_cssRGB_8e24b34f71f5363e: function(arg0) {
make_cssRGB(arg0 >>> 0);
},
__wbindgen_init_externref_table: function() {
const table = wasm.__wbindgen_externrefs;
const offset = table.grow(4);
table.set(0, undefined);
table.set(offset + 0, undefined);
table.set(offset + 1, null);
table.set(offset + 2, true);
table.set(offset + 3, false);
},
};
return {
__proto__: null,
"./qcms_bg.js": import0,
};
/**
* # Safety
*
* This function is called directly from JavaScript.
* @param {number} transformer
*/
export function qcms_drop_transformer(transformer) {
wasm.qcms_drop_transformer(transformer);
}
function getStringFromWasm0(ptr, len) {
ptr = ptr >>> 0;
return decodeText(ptr, len);
}
let cachedUint8ArrayMemory0 = null;
function getUint8ArrayMemory0() {
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
}
return cachedUint8ArrayMemory0;
}
function passArray8ToWasm0(arg, malloc) {
const ptr = malloc(arg.length * 1, 1) >>> 0;
getUint8ArrayMemory0().set(arg, ptr / 1);
WASM_VECTOR_LEN = arg.length;
return ptr;
}
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
cachedTextDecoder.decode();
const MAX_SAFARI_DECODE_BYTES = 2146435072;
let numBytesDecoded = 0;
function decodeText(ptr, len) {
numBytesDecoded += len;
if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
cachedTextDecoder.decode();
numBytesDecoded = len;
}
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
}
let WASM_VECTOR_LEN = 0;
let wasmModule, wasm;
function __wbg_finalize_init(instance, module) {
wasm = instance.exports;
wasmModule = module;
cachedUint8ArrayMemory0 = null;
wasm.__wbindgen_start();
return wasm;
}
/**
* @enum {0 | 1 | 2 | 3 | 4 | 5}
*/
export const DataType = Object.freeze({
RGB8: 0, "0": "RGB8",
RGBA8: 1, "1": "RGBA8",
BGRA8: 2, "2": "BGRA8",
Gray8: 3, "3": "Gray8",
GrayA8: 4, "4": "GrayA8",
CMYK: 5, "5": "CMYK",
});
/**
* @enum {0 | 1 | 2 | 3}
*/
export const Intent = Object.freeze({
Perceptual: 0, "0": "Perceptual",
RelativeColorimetric: 1, "1": "RelativeColorimetric",
Saturation: 2, "2": "Saturation",
AbsoluteColorimetric: 3, "3": "AbsoluteColorimetric",
});
async function __wbg_load(module, imports) {
if (typeof Response === 'function' && module instanceof Response) {
if (typeof WebAssembly.instantiateStreaming === 'function') {
try {
return await WebAssembly.instantiateStreaming(module, imports);
} catch (e) {
const validResponse = module.ok && expectedResponseType(module.type);
if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
} catch (e) {
if (module.headers.get('Content-Type') != 'application/wasm') {
console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e);
} else { throw e; }
} else {
throw e;
}
}
}
const bytes = await module.arrayBuffer();
return await WebAssembly.instantiate(bytes, imports);
} else {
const instance = await WebAssembly.instantiate(module, imports);
if (instance instanceof WebAssembly.Instance) {
return { instance, module };
} else {
return instance;
}
}
}
function expectedResponseType(type) {
switch (type) {
case 'basic': case 'cors': case 'default': return true;
function __wbg_get_imports() {
const imports = {};
imports.wbg = {};
imports.wbg.__wbg_copyresult_b08ee7d273f295dd = function(arg0, arg1) {
copy_result(arg0 >>> 0, arg1 >>> 0);
};
imports.wbg.__wbg_copyrgb_d60ce17bb05d9b67 = function(arg0) {
copy_rgb(arg0 >>> 0);
};
imports.wbg.__wbg_makecssRGB_893bf0cd9fdb302d = function(arg0) {
make_cssRGB(arg0 >>> 0);
};
imports.wbg.__wbindgen_init_externref_table = function() {
const table = wasm.__wbindgen_export_0;
const offset = table.grow(4);
table.set(0, undefined);
table.set(offset + 0, undefined);
table.set(offset + 1, null);
table.set(offset + 2, true);
table.set(offset + 3, false);
;
};
imports.wbg.__wbindgen_throw = function(arg0, arg1) {
throw new Error(getStringFromWasm0(arg0, arg1));
};
return imports;
}
return false;
function __wbg_init_memory(imports, memory) {
}
function __wbg_finalize_init(instance, module) {
wasm = instance.exports;
__wbg_init.__wbindgen_wasm_module = module;
cachedUint8ArrayMemory0 = null;
wasm.__wbindgen_start();
return wasm;
}
function initSync(module) {
if (wasm !== undefined) return wasm;
if (module !== undefined) {
if (typeof module !== 'undefined') {
if (Object.getPrototypeOf(module) === Object.prototype) {
({module} = module)
} else {
@ -227,10 +217,15 @@ function initSync(module) {
}
const imports = __wbg_get_imports();
__wbg_init_memory(imports);
if (!(module instanceof WebAssembly.Module)) {
module = new WebAssembly.Module(module);
}
const instance = new WebAssembly.Instance(module, imports);
return __wbg_finalize_init(instance, module);
}
@ -238,7 +233,7 @@ async function __wbg_init(module_or_path) {
if (wasm !== undefined) return wasm;
if (module_or_path !== undefined) {
if (typeof module_or_path !== 'undefined') {
if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
({module_or_path} = module_or_path)
} else {
@ -253,9 +248,12 @@ async function __wbg_init(module_or_path) {
module_or_path = fetch(module_or_path);
}
__wbg_init_memory(imports);
const { instance, module } = await __wbg_load(await module_or_path, imports);
return __wbg_finalize_init(instance, module);
}
export { initSync, __wbg_init as default };
export { initSync };
export default __wbg_init;

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

View File

@ -1,108 +0,0 @@
/* Copyright 2025 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 { parse, registerWalkers, Root } from "postcss-values-parser";
import { isString } from "stylelint/lib/utils/validateTypes.mjs";
import stylelint from "stylelint";
const {
createPlugin,
utils: { report, validateOptions },
} = stylelint;
registerWalkers(Root);
const ruleName = "pdfjs/no-unused-custom-properties";
// It's a very basic linter: we don't take into account scopes.
// But it should be enough for our use case.
/** @type {import('stylelint').Plugin} */
const ruleFunction =
(enabled, { ignoreList = [] } = {}, context = {}) =>
(root, result) => {
const validOptions = validateOptions(
result,
ruleName,
{
actual: enabled,
possible: [true],
},
{
actual: ignoreList,
possible: [isString],
optional: true,
}
);
if (!validOptions) {
return;
}
ignoreList = ignoreList.map(s => (s.startsWith("--") ? s : `--${s}`));
const usedCustomProperties = new Set(ignoreList);
const definedCustomProperties = new Set();
const usedBy = new Map();
root.walkDecls(decl => {
let definingProperty = null;
if (decl.prop.startsWith("--")) {
// This is a custom property definition.
definingProperty = decl.prop;
definedCustomProperties.add(definingProperty);
}
// Parse the declaration value to find var() usages.
const parsedValue = parse(decl.value);
parsedValue.walkFuncs(node => {
if (!node.isVar || node.nodes.length === 0) {
return;
}
// This is a var() function; get the custom property name.
const property = node.nodes[0].value;
if (!definingProperty) {
// This is a usage of a custom property but not in a definition.
// width: var(--foo);
usedCustomProperties.add(property);
return;
}
let usages = usedBy.get(property);
if (!usages) {
usages = [];
usedBy.set(property, usages);
}
// Record that this custom property is used by the defining property.
// --foo: var(--bar);
// bar is really used only if foo is.
usages.push(definingProperty);
});
});
const isUsed = p =>
usedCustomProperties.has(p) || (usedBy.get(p) || []).some(isUsed);
for (const customProperty of definedCustomProperties) {
if (isUsed(customProperty)) {
continue;
}
report({
message: `Custom property "${customProperty}" is defined but never used.`,
node: root,
result,
ruleName,
});
}
};
ruleFunction.ruleName = ruleName;
export default createPlugin(ruleName, ruleFunction);

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +1,5 @@
+ Only the translations for the `en-US` locale are maintained here.
+ The translations for all other locales are imported automatically from Firefox. Please see https://mozilla-l10n.github.io/introduction/ for information about contributing.
Most of the files in this folder (except for the `en-US` folder) have been
imported from the Firefox Nightly branch;
please see https://hg.mozilla.org/l10n-central. Some of the files are
licensed under the MPL license. You can obtain a copy of the license at
https://mozilla.org/MPL/2.0.

View File

@ -71,12 +71,24 @@ pdfjs-document-properties-button =
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:
@ -173,6 +185,9 @@ pdfjs-page-scale-actual = Dite kikome
# $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.
@ -198,3 +213,63 @@ 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
## Default editor aria labels
## 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
## Show all highlights
## This is a toggle button to show/hide all the highlights.
## New alt-text dialog
## Group note for entire feature: Alternative text (alt text) helps when people can't see the image. This feature includes a tool to create alt text automatically using an AI model that works locally on the user's device to preserve privacy.
## Image alt-text settings
## "Annotations removed" bar
## Add a signature dialog
## Tab names
## Tab panels
## Controls
## Dialog buttons
## Main menu for adding/removing signatures
## Editor toolbar
## Edit signature description dialog

View File

@ -71,17 +71,37 @@ pdfjs-document-properties-button =
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
@ -152,6 +172,9 @@ pdfjs-page-scale-actual = Werklike grootte
# $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.
@ -177,3 +200,63 @@ 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
## Default editor aria labels
## 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
## Show all highlights
## This is a toggle button to show/hide all the highlights.
## New alt-text dialog
## Group note for entire feature: Alternative text (alt text) helps when people can't see the image. This feature includes a tool to create alt text automatically using an AI model that works locally on the user's device to preserve privacy.
## Image alt-text settings
## "Annotations removed" bar
## Add a signature dialog
## Tab names
## Tab panels
## Controls
## Dialog buttons
## Main menu for adding/removing signatures
## Editor toolbar
## Edit signature description dialog

View File

@ -89,12 +89,24 @@ pdfjs-document-properties-button =
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:
@ -201,6 +213,9 @@ pdfjs-page-scale-actual = Grandaria actual
# $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.
@ -211,6 +226,10 @@ 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
@ -226,3 +245,63 @@ 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
## Default editor aria labels
## 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
## Show all highlights
## This is a toggle button to show/hide all the highlights.
## New alt-text dialog
## Group note for entire feature: Alternative text (alt text) helps when people can't see the image. This feature includes a tool to create alt text automatically using an AI model that works locally on the user's device to preserve privacy.
## Image alt-text settings
## "Annotations removed" bar
## Add a signature dialog
## Tab names
## Tab panels
## Controls
## Dialog buttons
## Main menu for adding/removing signatures
## Editor toolbar
## Edit signature description dialog

View File

@ -112,6 +112,14 @@ pdfjs-document-properties-size-kb = { NUMBER($kb, maximumSignificantDigits: 3) }
# $mb (Number) - the PDF file size in megabytes
# $b (Number) - the PDF file size in bytes
pdfjs-document-properties-size-mb = { NUMBER($mb, maximumSignificantDigits: 3) } م.بايت ({ $b } بايتات)
# 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 = الموضوع:
@ -121,6 +129,10 @@ pdfjs-document-properties-modification-date = تاريخ التعديل:
# Variables:
# $dateObj (Date) - the creation/modification date and time of the PDF file
pdfjs-document-properties-date-time-string = { DATETIME($dateObj, dateStyle: "short", timeStyle: "medium") }
# 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:
@ -153,19 +165,6 @@ pdfjs-document-properties-linearized = العرض السريع عبر الوِب
pdfjs-document-properties-linearized-yes = نعم
pdfjs-document-properties-linearized-no = لا
pdfjs-document-properties-close-button = أغلق
pdfjs-digital-signature-properties-view-certificate = اعرض الشهادة
# Shown beneath an invalid signature card to explain why verification
# failed. The text comes from NSS (e.g. "Signature integrity has been
# compromised", "PKCS#7 signature could not be parsed") and is not
# itself localized — it is the underlying error message produced by
# the verification backend.
# Variables:
# $reason (String) - error message describing why the signature
# could not be verified.
pdfjs-digital-signature-properties-reason = السبب: { $reason }
# Variables:
# $dateObj (Date) - the signing time from the /Sig dict's /M entry.
pdfjs-digital-signature-properties-timestamp = الطابع الزمني: { DATETIME($dateObj, dateStyle: "short", timeStyle: "medium") }
## Print
@ -214,15 +213,6 @@ pdfjs-thumb-page-title =
# $page (Number) - the page number
pdfjs-thumb-page-canvas =
.aria-label = مصغّرة صفحة { $page }
# Variables:
# $page (Number) - the page number
pdfjs-thumb-page-checkbox1 =
.title = حدّد الصفحة { $page }
# Variables:
# $page (Number) - the page number
# $total (Number) - the number of pages
pdfjs-thumb-page-title1 =
.title = الصفحة { $page } من { $total }
## Find panel button title and messages
@ -293,6 +283,10 @@ 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
@ -308,7 +302,7 @@ pdfjs-annotation-date-time-string = { DATETIME($dateObj, dateStyle: "short", tim
pdfjs-password-label = أدخل لكلمة السر لفتح هذا الملف.
pdfjs-password-invalid = كلمة سر خطأ. من فضلك أعد المحاولة.
pdfjs-password-ok-button = حسنًا
pdfjs-password-ok-button = حسنا
pdfjs-password-cancel-button = ألغِ
pdfjs-web-fonts-disabled = خطوط الوب مُعطّلة: تعذّر استخدام خطوط PDF المُضمّنة.
@ -316,13 +310,9 @@ pdfjs-web-fonts-disabled = خطوط الوب مُعطّلة: تعذّر استخ
pdfjs-editor-free-text-button =
.title = نص
pdfjs-editor-color-picker-free-text-input =
.title = غيِّر لون النص
pdfjs-editor-free-text-button-label = نص
pdfjs-editor-ink-button =
.title = ارسم
pdfjs-editor-color-picker-ink-input =
.title = غيِّر لون الرسم
pdfjs-editor-ink-button-label = ارسم
pdfjs-editor-stamp-button =
.title = أضِف أو حرّر الصور
@ -334,14 +324,6 @@ pdfjs-highlight-floating-button1 =
.title = أبرِز
.aria-label = أبرِز
pdfjs-highlight-floating-button-label = أبرِز
pdfjs-comment-floating-button =
.title = علق
.aria-label = علق
pdfjs-comment-floating-button-label = علق
pdfjs-editor-comment-button =
.title = علق
.aria-label = علق
pdfjs-editor-comment-button-label = التعليق
pdfjs-editor-signature-button =
.title = أضِف توقيع
pdfjs-editor-signature-button-label = أضِف توقيع
@ -404,31 +386,20 @@ pdfjs-editor-add-saved-signature-button =
pdfjs-free-text2 =
.aria-label = محرِّر النص
.default-content = ابدأ في كتابة…
# Used to show how many comments are present in the pdf file.
# Variables:
# $count (Number) - the number of comments.
pdfjs-editor-comments-sidebar-title =
{ $count ->
[zero] تعليق
[one] تعليق
[two] تعليقات
[few] تعليقات
[many] تعليقات
*[other] تعليقات
}
pdfjs-editor-comments-sidebar-close-button =
.title = أغلِق الشريط الجانبي
.aria-label = أغلِق الشريط الجانبي
pdfjs-editor-comments-sidebar-close-button-label = أغلِق الشريط الجانبي
# Instructional copy to add a comment by selecting text or an annotations.
pdfjs-editor-comments-sidebar-no-comments1 = هل رأيت شيئاً جديرًا بالملاحظة؟ ابرزه واترك تعليقًا.
pdfjs-editor-comments-sidebar-no-comments-link = اطّلع على المزيد
pdfjs-free-text =
.aria-label = محرِّر النص
pdfjs-free-text-default-content = ابدأ الكتابة…
pdfjs-ink =
.aria-label = محرِّر الرسم
pdfjs-ink-canvas =
.aria-label = صورة أنشأها المستخدم
## Alt-text dialog
pdfjs-editor-alt-text-button-label = نص بديل
pdfjs-editor-alt-text-edit-button =
.aria-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 = أضِف وصف
@ -448,6 +419,14 @@ pdfjs-editor-alt-text-button =
## 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 = مُنتصف اليسار - غيّر الحجم
pdfjs-editor-resizer-top-left =
.aria-label = الزاوية اليُسرى العُليا — غيّر الحجم
pdfjs-editor-resizer-top-middle =
@ -553,14 +532,6 @@ pdfjs-editor-alt-text-settings-show-dialog-button-label = أظهِر مُحرّ
pdfjs-editor-alt-text-settings-show-dialog-description = يساعدك على التأكد من أن جميع صورك تحتوي على نص بديل.
pdfjs-editor-alt-text-settings-close-button = أغلق
## Accessibility labels (announced by screen readers) for objects added to the editor.
pdfjs-editor-highlight-added-alert = أُضيف إبراز
pdfjs-editor-freetext-added-alert = أُضيف النص
pdfjs-editor-ink-added-alert = أُضيف رسم
pdfjs-editor-stamp-added-alert = أُضيف صورة
pdfjs-editor-signature-added-alert = أُضيف توقيع
## "Annotations removed" bar
pdfjs-editor-undo-bar-message-highlight = أُزِيل البرز
@ -568,7 +539,6 @@ pdfjs-editor-undo-bar-message-freetext = أُزيل النص
pdfjs-editor-undo-bar-message-ink = أُزِيلت الرسمة
pdfjs-editor-undo-bar-message-stamp = أُزيلت الصورة
pdfjs-editor-undo-bar-message-signature = أُزيل التوقيع
pdfjs-editor-undo-bar-message-comment = أُزيل التعليق
# Variables:
# $count (Number) - the number of removed annotations.
pdfjs-editor-undo-bar-message-multiple =
@ -590,7 +560,7 @@ pdfjs-editor-undo-bar-close-button-label = أغلق
## Add a signature dialog
pdfjs-editor-add-signature-dialog-label = يتيح هذا النموذج للمستخدم إنشاء توقيع لإضافته إلى مستند PDF. ويمكن للمستخدم تحرير الاسم (الذي يعمل أيضًا كنص بديل)، وحفظ التوقيع بشكل اختياري للاستخدام المتكرر.
pdfjs-editor-add-signature-dialog-title = أضِف توقيعًا
pdfjs-editor-add-signature-dialog-title = أضِف توقيعا
## Tab names
@ -634,8 +604,6 @@ pdfjs-editor-add-signature-save-checkbox = احفظ التوقيع
pdfjs-editor-add-signature-save-warning-message = لقد وصلت إلى الحد الأقصى وهو 5 توقيعات محفوظة. أزِل توقيع واحد لحفظ المزيد.
pdfjs-editor-add-signature-image-upload-error-title = تعذر رفع الصورة.
pdfjs-editor-add-signature-image-upload-error-description = تحقق من اتصال الشبكة لديك أو جرّب صورة أخرى.
pdfjs-editor-add-signature-image-no-data-error-title = لا يمكن تحويل هذه الصورة إلى توقيع
pdfjs-editor-add-signature-image-no-data-error-description = من فضلك حاول رفع صورة أخرى.
pdfjs-editor-add-signature-error-close-button = أغلق
## Dialog buttons
@ -644,182 +612,6 @@ pdfjs-editor-add-signature-cancel-button = ألغِ
pdfjs-editor-add-signature-add-button = أضِف
pdfjs-editor-edit-signature-update-button = حدّث
## Comment popup
pdfjs-editor-edit-comment-popup-button-label = حرّر التعليق
pdfjs-editor-edit-comment-popup-button =
.title = حرّر التعليق
pdfjs-editor-delete-comment-popup-button-label = أزِل التعليق
pdfjs-editor-delete-comment-popup-button =
.title = أزِل التعليق
pdfjs-show-comment-button =
.title = أظهر التعليق
## Edit a comment dialog
# An existing comment is edited
pdfjs-editor-edit-comment-dialog-title-when-editing = حرّر التعليق
pdfjs-editor-edit-comment-dialog-save-button-when-editing = حدّث
# No existing comment
pdfjs-editor-edit-comment-dialog-title-when-adding = أضِف تعليقًا
pdfjs-editor-edit-comment-dialog-save-button-when-adding = أضف
pdfjs-editor-edit-comment-dialog-text-input =
.placeholder = ابدأ الكتابة…
pdfjs-editor-edit-comment-dialog-cancel-button = ألغِ
## Edit a comment button in the editor toolbar
pdfjs-editor-add-comment-button =
.title = أضف التعليق
## The view manager is a sidebar displaying different views:
## - thumbnails;
## - outline;
## - attachments;
## - layers.
## The thumbnails view is used to edit the pdf: remove/insert pages, ...
pdfjs-toggle-views-manager-notification-button =
.title = تبديل الشريط الجانبي (يحتوي المستند على صور مصغرة/مخطط تفصيلي/مرفقات/طبقات)
pdfjs-toggle-views-manager-button1-label = أدِر الصفحات
pdfjs-views-manager-sidebar =
.aria-label = الشريط الجانبي
pdfjs-views-manager-sidebar-resizer =
.aria-label = أداة تغيير حجم الشريط الجانبي
pdfjs-views-manager-view-selector-button =
.title = المناظير
pdfjs-views-manager-view-selector-button-label = المناظير
pdfjs-views-manager-pages-title = الصفحات
pdfjs-views-manager-outlines-title1 = مخطط المستند
.title = مخطط المستند (انقر نقرًا مزدوجًا لتوسيع/طي كافة العناصر)
pdfjs-views-manager-attachments-title = المرفقات
pdfjs-views-manager-layers-title1 = ‏‏طبقات
.title = الطبقات (انقر نقرًا مزدوجًا لإعادة تعيين كافة الطبقات إلى الحالة المبدئية)
pdfjs-views-manager-pages-option-label = الصفحات
pdfjs-views-manager-outlines-option-label = مخطط المستند
pdfjs-views-manager-attachments-option-label = المرفقات
pdfjs-views-manager-layers-option-label = ‏‏الطبقات
pdfjs-views-manager-add-file-button =
.title = أضف ملف
pdfjs-views-manager-add-file-button-label = أضف ملف
# Variables:
# $count (Number) - the number of selected pages.
pdfjs-views-manager-pages-status-action-label =
{ $count ->
[zero] { $count } محدّد
[one] { $count } محدّد
[two] { $count } محدّدان
[few] { $count } محدّد
[many] { $count } محدّد
*[other] { $count } محدّد
}
pdfjs-views-manager-pages-status-none-action-label = حدّد الصفحات
pdfjs-views-manager-pages-status-action-button-label = أدِر
pdfjs-views-manager-pages-status-copy-button-label = انسخ
pdfjs-views-manager-pages-status-cut-button-label = قصّ
pdfjs-views-manager-pages-status-delete-button-label = احذف
pdfjs-views-manager-pages-status-export-selected-button-label = حُدِّد التصدير…
# Variables:
# $count (Number) - the number of selected pages to be cut.
pdfjs-views-manager-status-undo-cut-label =
{ $count ->
[zero] لا صفحات قُصت
[one] صفحة قُصت
[two] { $count } صفحتان قُصت
[few] { $count } صفحات قُصت
[many] { $count } صفحةً قُصت
*[other] { $count } صفحة قُصت
}
# Variables:
# $count (Number) - the number of selected pages to be copied.
pdfjs-views-manager-pages-status-undo-copy-label =
{ $count ->
[zero] لا صفحة منسوخة
[one] صفحة منسوخة
[two] صفحتان منسوختان
[few] { $count } صفحات منسوخة
[many] { $count } صفحةً منسوخةً
*[other] { $count } صفحة منسوخة
}
# Variables:
# $count (Number) - the number of selected pages to be deleted.
pdfjs-views-manager-pages-status-undo-delete-label =
{ $count ->
[zero] لا صفحات محذوفة
[one] حُذف صفحة
[two] حُذف صفحتان
[few] حُذف { $count } صفحات
[many] حُذف { $count } صفحةً
*[other] حُذف { $count } صفحة
}
pdfjs-views-manager-pages-status-waiting-ready-label = يجهز ملفك…
pdfjs-views-manager-pages-status-waiting-uploading-label = يرفع ملف…
pdfjs-views-manager-status-warning-cut-label = تعذّر القص. أنعش الصفحة وحاول مجددًا.
pdfjs-views-manager-status-warning-copy-label = تعذّر النسخ. أنعش الصفحة وحاول مجددًا.
pdfjs-views-manager-status-warning-delete-label = تعذّر الحذف. حدِّث الصفحة وحاول مجددًا.
pdfjs-views-manager-status-warning-save-label = تعذّر الحفظ. أنعش الصفحة وحاول مجددًا.
pdfjs-views-manager-status-undo-button-label = تراجع
pdfjs-views-manager-status-done-button-label = تمّ
pdfjs-views-manager-status-close-button =
.title = أغلق
pdfjs-views-manager-status-close-button-label = أغلق
pdfjs-views-manager-paste-button-label = ألصق
pdfjs-views-manager-paste-button-before =
.title = ألصق قبل الصفحة الأولى
# Variables:
# $page (Number) - the page number after which the paste button is.
pdfjs-views-manager-paste-button-after =
.title = ألصق بعد الصفحة { $page }
# Badge used to promote a new feature in the UI, keep it as short as possible.
# It's spelled uppercase for English, but it can be translated as usual.
pdfjs-new-badge-content = جديد
pdfjs-views-manager-waiting-for-file = يرفع ملف…
pdfjs-toggle-views-manager-button1 =
.title = أدِر الصفحات
## Digital signature properties (signature verification panel)
pdfjs-digital-signature-properties-button =
.title = خصائص التوقيع الرقمي
.aria-label = خصائص التوقيع الرقمي
pdfjs-digital-signature-properties-button-label = خصائص التوقيع الرقمي
## Banner shown above the signature list summarising the overall
## verification state of the document. Each variant is selected by the
## viewer based on the worst per-signature status; one signature is
## enough to lower the banner.
##
## Variables:
## $count (Number) - number of signatures at the worst level.
pdfjs-digital-signature-properties-banner-verified = وقِّع المستند بتوقيع رقمي صالح
## Per-signature status row. Only three distinct strings are needed:
## the signature crypto either verified (the cert chain may still be
## untrusted/expired/revoked, but that's surfaced on the cert row
## below), or it failed, or its sub-format isn't supported.
pdfjs-digital-signature-properties-status-verified = الحالة: تحققَ من التوقيع
pdfjs-digital-signature-properties-status-invalid = الحالة: التوقيع غير صالح
pdfjs-digital-signature-properties-status-unknown = الحالة: تعذّر التحقق (غير مدعوم)
## Per-signature certificate row. The variants with an issuer / date in
## parentheses embed fully-localized context — no English fall-through.
##
## Variables:
## $issuer (String) - issuer or subject common name from the cert.
## $dateObj (Date) - notAfter date for the expired-with-date form.
pdfjs-digital-signature-properties-certificate-trusted = الشهادة: موثوقة ({ $issuer })
pdfjs-digital-signature-properties-certificate-unknown = الشهادة: غير متوفرة
pdfjs-digital-signature-properties-certificate-untrusted = الشهادة: غير موثوقة
pdfjs-digital-signature-properties-certificate-untrusted-unknown-issuer = الشهادة: جهة إصدار مجهولة ({ $issuer })
pdfjs-digital-signature-properties-certificate-untrusted-self-signed = الشهادة: موقعّة ذاتيًا ({ $issuer })
pdfjs-digital-signature-properties-certificate-untrusted-untrusted-issuer = الشهادة: جهة إصدار مجهولة ({ $issuer })
pdfjs-digital-signature-properties-certificate-expired = الشهادة: منتهية الصلاحية
pdfjs-digital-signature-properties-certificate-expired-with-date = الشهادة: منتهية الصلاحية ({ DATETIME($dateObj, dateStyle: "medium") })
pdfjs-digital-signature-properties-certificate-revoked = الشهادة: مُلغاة
## Main menu for adding/removing signatures
pdfjs-editor-delete-signature-button1 =

View File

@ -77,10 +77,22 @@ pdfjs-document-properties-button =
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:
@ -166,7 +178,74 @@ pdfjs-page-landmark =
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
## Default editor aria labels
## 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
## Show all highlights
## This is a toggle button to show/hide all the highlights.
## New alt-text dialog
## Group note for entire feature: Alternative text (alt text) helps when people can't see the image. This feature includes a tool to create alt text automatically using an AI model that works locally on the user's device to preserve privacy.
## Image alt-text settings
## "Annotations removed" bar
## Add a signature dialog
## Tab names
## Tab panels
## Controls
## Dialog buttons
## Main menu for adding/removing signatures
## Editor toolbar
## Edit signature description dialog

View File

@ -89,12 +89,24 @@ pdfjs-document-properties-button =
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ı:
@ -201,6 +213,9 @@ pdfjs-page-scale-actual = Hazırkı Həcm
# $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ı.
@ -211,6 +226,10 @@ 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
@ -226,3 +245,63 @@ 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
## Default editor aria labels
## 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
## Show all highlights
## This is a toggle button to show/hide all the highlights.
## New alt-text dialog
## Group note for entire feature: Alternative text (alt text) helps when people can't see the image. This feature includes a tool to create alt text automatically using an AI model that works locally on the user's device to preserve privacy.
## Image alt-text settings
## "Annotations removed" bar
## Add a signature dialog
## Tab names
## Tab panels
## Controls
## Dialog buttons
## Main menu for adding/removing signatures
## Editor toolbar
## Edit signature description dialog

View File

@ -112,6 +112,14 @@ pdfjs-document-properties-size-kb = { NUMBER($kb, maximumSignificantDigits: 3) }
# $mb (Number) - the PDF file size in megabytes
# $b (Number) - the PDF file size in bytes
pdfjs-document-properties-size-mb = { NUMBER($mb, maximumSignificantDigits: 3) } МБ ({ $b } байтаў)
# 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 = Тэма:
@ -121,6 +129,10 @@ pdfjs-document-properties-modification-date = Дата змянення:
# Variables:
# $dateObj (Date) - the creation/modification date and time of the PDF file
pdfjs-document-properties-date-time-string = { DATETIME($dateObj, dateStyle: "short", timeStyle: "medium") }
# 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:
@ -153,28 +165,6 @@ pdfjs-document-properties-linearized = Хуткі прагляд у Інтэрн
pdfjs-document-properties-linearized-yes = Так
pdfjs-document-properties-linearized-no = Не
pdfjs-document-properties-close-button = Закрыць
pdfjs-digital-signature-properties-view-certificate = Паказаць сертыфікат
# Shown beneath an invalid signature card to explain why verification
# failed. The text comes from NSS (e.g. "Signature integrity has been
# compromised", "PKCS#7 signature could not be parsed") and is not
# itself localized — it is the underlying error message produced by
# the verification backend.
# Variables:
# $reason (String) - error message describing why the signature
# could not be verified.
pdfjs-digital-signature-properties-reason = Прычына: { $reason }
# Variables:
# $dateObj (Date) - the signing time from the /Sig dict's /M entry.
pdfjs-digital-signature-properties-timestamp = Адзнака часу: { DATETIME($dateObj, dateStyle: "short", timeStyle: "medium") }
# Variables:
# $count (Number) - number of nested sub-signatures (one per earlier
# incremental revision of the document).
pdfjs-digital-signature-properties-sub-signatures =
{ $count ->
[one] Дадатковы подпіс ({ $count })
[few] Дадатковыя подпісы ({ $count })
*[many] Дадатковыя подпісы ({ $count })
}
## Print
@ -223,15 +213,6 @@ pdfjs-thumb-page-title =
# $page (Number) - the page number
pdfjs-thumb-page-canvas =
.aria-label = Мініяцюра старонкі { $page }
# Variables:
# $page (Number) - the page number
pdfjs-thumb-page-checkbox1 =
.title = Выбраць старонку { $page }
# Variables:
# $page (Number) - the page number
# $total (Number) - the number of pages
pdfjs-thumb-page-title1 =
.title = Старонка { $page } з { $total }
## Find panel button title and messages
@ -296,6 +277,10 @@ 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
@ -319,13 +304,9 @@ pdfjs-web-fonts-disabled = Шрыфты Сеціва забаронены: не
pdfjs-editor-free-text-button =
.title = Тэкст
pdfjs-editor-color-picker-free-text-input =
.title = Змяніць колер тэксту
pdfjs-editor-free-text-button-label = Тэкст
pdfjs-editor-ink-button =
.title = Маляваць
pdfjs-editor-color-picker-ink-input =
.title = Змяніць колер малюнка
pdfjs-editor-ink-button-label = Маляваць
pdfjs-editor-stamp-button =
.title = Дадаць або змяніць выявы
@ -337,14 +318,6 @@ pdfjs-highlight-floating-button1 =
.title = Падфарбаваць
.aria-label = Падфарбаваць
pdfjs-highlight-floating-button-label = Падфарбаваць
pdfjs-comment-floating-button =
.title = Каментаваць
.aria-label = Каментаваць
pdfjs-comment-floating-button-label = Каментаваць
pdfjs-editor-comment-button =
.title = Каментарый
.aria-label = Каментарый
pdfjs-editor-comment-button-label = Каментарый
pdfjs-editor-signature-button =
.title = Дадаць подпіс
pdfjs-editor-signature-button-label = Дадаць подпіс
@ -407,28 +380,20 @@ pdfjs-editor-add-saved-signature-button =
pdfjs-free-text2 =
.aria-label = Тэкставы рэдактар
.default-content = Пачніце ўводзіць…
# Used to show how many comments are present in the pdf file.
# Variables:
# $count (Number) - the number of comments.
pdfjs-editor-comments-sidebar-title =
{ $count ->
[one] Каментарый
[few] Каментарыі
*[many] Каментарыі
}
pdfjs-editor-comments-sidebar-close-button =
.title = Закрыць бакавую панэль
.aria-label = Закрыць бакавую панэль
pdfjs-editor-comments-sidebar-close-button-label = Закрыць бакавую панэль
# Instructional copy to add a comment by selecting text or an annotations.
pdfjs-editor-comments-sidebar-no-comments1 = Бачыце штосьці вартае ўвагі? Вылучыце і пакіньце каментарый.
pdfjs-editor-comments-sidebar-no-comments-link = Падрабязней
pdfjs-free-text =
.aria-label = Тэкставы рэдактар
pdfjs-free-text-default-content = Пачніце набор тэксту…
pdfjs-ink =
.aria-label = Графічны рэдактар
pdfjs-ink-canvas =
.aria-label = Выява, створаная карыстальнікам
## Alt-text dialog
pdfjs-editor-alt-text-button-label = Альтэрнатыўны тэкст
pdfjs-editor-alt-text-edit-button =
.aria-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 = Дадаць апісанне
@ -448,6 +413,14 @@ pdfjs-editor-alt-text-button =
## 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 = Пасярэдзіне злева — змяніць памер
pdfjs-editor-resizer-top-left =
.aria-label = Верхні левы кут — змяніць памер
pdfjs-editor-resizer-top-middle =
@ -553,14 +526,6 @@ pdfjs-editor-alt-text-settings-show-dialog-button-label = Адразу пака
pdfjs-editor-alt-text-settings-show-dialog-description = Дапамагае пераканацца, што ўсе вашы выявы маюць альтэрнатыўны тэкст.
pdfjs-editor-alt-text-settings-close-button = Закрыць
## Accessibility labels (announced by screen readers) for objects added to the editor.
pdfjs-editor-highlight-added-alert = Вылучэнне дададзена
pdfjs-editor-freetext-added-alert = Тэкст дададзены
pdfjs-editor-ink-added-alert = Малюнак дададзены
pdfjs-editor-stamp-added-alert = Выява дададзена
pdfjs-editor-signature-added-alert = Подпіс дададзены
## "Annotations removed" bar
pdfjs-editor-undo-bar-message-highlight = Падсвятленне выдалена
@ -568,7 +533,6 @@ pdfjs-editor-undo-bar-message-freetext = Тэкст выдалены
pdfjs-editor-undo-bar-message-ink = Малюнак выдалены
pdfjs-editor-undo-bar-message-stamp = Відарыс выдалены
pdfjs-editor-undo-bar-message-signature = Подпіс выдалены
pdfjs-editor-undo-bar-message-comment = Каментарый выдалены
# Variables:
# $count (Number) - the number of removed annotations.
pdfjs-editor-undo-bar-message-multiple =
@ -631,8 +595,6 @@ pdfjs-editor-add-signature-save-checkbox = Захаваць подпіс
pdfjs-editor-add-signature-save-warning-message = Вы дасягнулі ліміту ў 5 захаваных подпісаў. Выдаліце адзін, каб захаваць іншы.
pdfjs-editor-add-signature-image-upload-error-title = Не ўдалося загрузіць выяву
pdfjs-editor-add-signature-image-upload-error-description = Праверце падключэнне да сеткі ці паспрабуйце іншую выяву.
pdfjs-editor-add-signature-image-no-data-error-title = Не ўдалося пераўтварыць гэту выяву ў подпіс
pdfjs-editor-add-signature-image-no-data-error-description = Калі ласка, паспрабуйце зацягнуць іншую выяву.
pdfjs-editor-add-signature-error-close-button = Закрыць
## Dialog buttons
@ -641,200 +603,6 @@ pdfjs-editor-add-signature-cancel-button = Скасаваць
pdfjs-editor-add-signature-add-button = Дадаць
pdfjs-editor-edit-signature-update-button = Абнавіць
## Comment popup
pdfjs-editor-edit-comment-popup-button-label = Змяніць каментарый
pdfjs-editor-edit-comment-popup-button =
.title = Змяніць каментарый
pdfjs-editor-delete-comment-popup-button-label = Выдаліць каментарый
pdfjs-editor-delete-comment-popup-button =
.title = Выдаліць каментарый
pdfjs-show-comment-button =
.title = Паказаць каментарый
## Edit a comment dialog
# An existing comment is edited
pdfjs-editor-edit-comment-dialog-title-when-editing = Змяніць каментарый
pdfjs-editor-edit-comment-dialog-save-button-when-editing = Абнавіць
# No existing comment
pdfjs-editor-edit-comment-dialog-title-when-adding = Дадаць каментарый
pdfjs-editor-edit-comment-dialog-save-button-when-adding = Дадаць
pdfjs-editor-edit-comment-dialog-text-input =
.placeholder = Пачніце набор тэксту…
pdfjs-editor-edit-comment-dialog-cancel-button = Скасаваць
## Edit a comment button in the editor toolbar
pdfjs-editor-add-comment-button =
.title = Дадаць каментарый
## The view manager is a sidebar displaying different views:
## - thumbnails;
## - outline;
## - attachments;
## - layers.
## The thumbnails view is used to edit the pdf: remove/insert pages, ...
pdfjs-toggle-views-manager-notification-button =
.title = Паказаць/схаваць бакавую панэль (дакумент мае мініяцюры/змест/далучэнні/пласты)
pdfjs-toggle-views-manager-button1-label = Кіраванне старонкамі
pdfjs-views-manager-sidebar =
.aria-label = Бакавая панэль
pdfjs-views-manager-sidebar-resizer =
.aria-label = Змена памеру бакавой панэлі
pdfjs-views-manager-view-selector-button =
.title = Выгляд
pdfjs-views-manager-view-selector-button-label = Выгляд
pdfjs-views-manager-pages-title = Старонкі
pdfjs-views-manager-outlines-title1 = Структура дакумента
.title = Структура дакумента (націсніце двойчы, каб разгарнуць/згарнуць усе элементы)
pdfjs-views-manager-attachments-title = Далучэнні
pdfjs-views-manager-layers-title1 = Пласты
.title = Пласты (націсніце двойчы каб скінуць у прадвызначаны стан)
pdfjs-views-manager-pages-option-label = Старонкі
pdfjs-views-manager-outlines-option-label = Структура дакумента
pdfjs-views-manager-attachments-option-label = Далучэнні
pdfjs-views-manager-layers-option-label = Пласты
pdfjs-views-manager-add-file-button =
.title = Дадаць файл
pdfjs-views-manager-add-file-button-label = Дадаць файл
# Variables:
# $count (Number) - the number of selected pages.
pdfjs-views-manager-pages-status-action-label =
{ $count ->
[one] Вылучана { $count }
[few] Вылучаны { $count }
*[many] Вылучана { $count }
}
pdfjs-views-manager-pages-status-none-action-label = Выбраць старонкі
pdfjs-views-manager-pages-status-action-button-label = Кіраваць
pdfjs-views-manager-pages-status-copy-button-label = Капіяваць
pdfjs-views-manager-pages-status-cut-button-label = Выразаць
pdfjs-views-manager-pages-status-delete-button-label = Выдаліць
pdfjs-views-manager-pages-status-export-selected-button-label = Экспартаваць выбранае…
# Variables:
# $count (Number) - the number of selected pages to be cut.
pdfjs-views-manager-status-undo-cut-label =
{ $count ->
[one] Выразана { $count } старонка
[few] Выразана { $count } старонкі
*[many] Выразана { $count } старонак
}
# Variables:
# $count (Number) - the number of selected pages to be copied.
pdfjs-views-manager-pages-status-undo-copy-label =
{ $count ->
[one] Скапіравана { $count } старонка
[few] Скапіравана { $count } старонкі
*[many] Скапіравана { $count } старонак
}
# Variables:
# $count (Number) - the number of selected pages to be deleted.
pdfjs-views-manager-pages-status-undo-delete-label =
{ $count ->
[one] Выдалена { $count } старонка
[few] Выдалена { $count } старонкі
*[many] Выдалена { $count } старонак
}
pdfjs-views-manager-pages-status-waiting-ready-label = Рыхтуецца ваш файл…
pdfjs-views-manager-pages-status-waiting-uploading-label = Зацягваецца файл…
pdfjs-views-manager-status-warning-cut-label = Не ўдалося выразаць. Абнавіце старонку і паспрабуйце зноў.
pdfjs-views-manager-status-warning-copy-label = Не ўдалося скапіяваць. Абнавіце старонку і паспрабуйце зноў.
pdfjs-views-manager-status-warning-delete-label = Не ўдалося выдаліць. Абнавіце старонку і паспрабуйце зноў.
pdfjs-views-manager-status-warning-save-label = Не ўдалося захаваць. Абнавіце старонку і паспрабуйце зноў.
pdfjs-views-manager-status-undo-button-label = Адмяніць
pdfjs-views-manager-status-done-button-label = Гатова
pdfjs-views-manager-status-close-button =
.title = Закрыць
pdfjs-views-manager-status-close-button-label = Закрыць
pdfjs-views-manager-paste-button-label = Уставіць
pdfjs-views-manager-paste-button-before =
.title = Уставіць перад першай старонкай
# Variables:
# $page (Number) - the page number after which the paste button is.
pdfjs-views-manager-paste-button-after =
.title = Уставіць пасля старонкі { $page }
# Badge used to promote a new feature in the UI, keep it as short as possible.
# It's spelled uppercase for English, but it can be translated as usual.
pdfjs-new-badge-content = НОВАЕ
pdfjs-views-manager-waiting-for-file = Зацягваецца файл…
pdfjs-toggle-views-manager-button1 =
.title = Кіраванне старонкамі
## Digital signature properties (signature verification panel)
pdfjs-digital-signature-properties-button =
.title = Уласцівасці лічбавага подпісу
.aria-label = Уласцівасці лічбавага подпісу
pdfjs-digital-signature-properties-button-label = Уласцівасці лічбавага подпісу
## Banner shown above the signature list summarising the overall
## verification state of the document. Each variant is selected by the
## viewer based on the worst per-signature status; one signature is
## enough to lower the banner.
##
## Variables:
## $count (Number) - number of signatures at the worst level.
pdfjs-digital-signature-properties-banner-verified = Дакумент быў падпісаны сапраўдным лічбавым подпісам
pdfjs-digital-signature-properties-banner-unknown =
{ $count ->
[one] Дакумент падпісаны, але { $count } лічбавы подпіс не ўдалося праверыць
[few] Дакумент падпісаны, але { $count } лічбавыя подпісы не ўдалося праверыць
*[many] Дакумент падпісаны, але { $count } лічбавых подпісаў не ўдалося праверыць
}
pdfjs-digital-signature-properties-banner-untrusted =
{ $count ->
[one] Дакумент падпісаны { $count } недавераным сертыфікатам
[few] Дакумент падпісаны { $count } недаверанымі сертыфікатамі
*[many] Дакумент падпісаны { $count } недаверанымі сертыфікатамі
}
pdfjs-digital-signature-properties-banner-expired =
{ $count ->
[one] Дакумент падпісаны { $count } пратэрмінаваным сертыфікатам
[few] Дакумент падпісаны { $count } пратэрмінаванымі сертыфікатамі
*[many] Дакумент падпісаны { $count } пратэрмінаванымі сертыфікатамі
}
pdfjs-digital-signature-properties-banner-invalid =
{ $count ->
[one] Дакумент мае { $count } нядзейсны лічбавы подпіс
[few] Дакумент мае { $count } нядзейсныя лічбавыя подпісы
*[many] Дакумент мае { $count } нядзейсных лічбавых подпісаў
}
pdfjs-digital-signature-properties-banner-revoked =
{ $count ->
[one] Дакумент падпісаны { $count } адкліканым сертыфікатам
[few] Дакумент падпісаны { $count } адкліканымі сертыфікатамі
*[many] Дакумент падпісаны { $count } адкліканымі сертыфікатамі
}
## Per-signature status row. Only three distinct strings are needed:
## the signature crypto either verified (the cert chain may still be
## untrusted/expired/revoked, but that's surfaced on the cert row
## below), or it failed, or its sub-format isn't supported.
pdfjs-digital-signature-properties-status-verified = Статус: Подпіс правераны
pdfjs-digital-signature-properties-status-invalid = Статус: Подпіс нядзейсны
pdfjs-digital-signature-properties-status-unknown = Статус: Немагчыма праверыць (не падтрымліваецца)
## Per-signature certificate row. The variants with an issuer / date in
## parentheses embed fully-localized context — no English fall-through.
##
## Variables:
## $issuer (String) - issuer or subject common name from the cert.
## $dateObj (Date) - notAfter date for the expired-with-date form.
pdfjs-digital-signature-properties-certificate-trusted = Сертыфікат: Давераны ({ $issuer })
pdfjs-digital-signature-properties-certificate-unknown = Сертыфікат: Недаступны
pdfjs-digital-signature-properties-certificate-untrusted = Сертыфікат: Недавераны
pdfjs-digital-signature-properties-certificate-untrusted-unknown-issuer = Сертыфікат: Невядомы выдавец ({ $issuer })
pdfjs-digital-signature-properties-certificate-untrusted-self-signed = Сертыфікат: Самападпісаны ({ $issuer })
pdfjs-digital-signature-properties-certificate-untrusted-untrusted-issuer = Сертыфікат: Недавераны выдавец ({ $issuer })
pdfjs-digital-signature-properties-certificate-expired = Сертыфікат: Пратэрмінаваны
pdfjs-digital-signature-properties-certificate-expired-with-date = Сертыфікат: Пратэрмінаваны ({ DATETIME($dateObj, dateStyle: "medium") })
pdfjs-digital-signature-properties-certificate-revoked = Сертыфікат: Адкліканы
## Main menu for adding/removing signatures
pdfjs-editor-delete-signature-button1 =

View File

@ -112,6 +112,14 @@ pdfjs-document-properties-size-kb = { NUMBER($kb, maximumSignificantDigits: 3) }
# $mb (Number) - the PDF file size in megabytes
# $b (Number) - the PDF file size in bytes
pdfjs-document-properties-size-mb = { NUMBER($mb, maximumSignificantDigits: 3) } МБ ({ $b } байта)
# 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 = Тема:
@ -121,6 +129,10 @@ pdfjs-document-properties-modification-date = Дата на промяна:
# Variables:
# $dateObj (Date) - the creation/modification date and time of the PDF file
pdfjs-document-properties-date-time-string = { DATETIME($dateObj, dateStyle: "short", timeStyle: "medium") }
# 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:
@ -263,6 +275,10 @@ 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
@ -294,6 +310,9 @@ pdfjs-editor-stamp-button =
.title = Добавяне или променяне на изображения
pdfjs-editor-stamp-button-label = Добавяне или променяне на изображения
## Default editor aria labels
## Remove button for the various kind of editor.
pdfjs-editor-remove-ink-button =
@ -320,11 +339,18 @@ pdfjs-editor-stamp-add-image-button-label = Добавяне на изображ
pdfjs-free-text2 =
.aria-label = Текстов редактор
.default-content = Започнете да пишете…
pdfjs-editor-comments-sidebar-close-button-label = Затваряне на страничната лента
pdfjs-free-text =
.aria-label = Текстов редактор
pdfjs-free-text-default-content = Започнете да пишете…
pdfjs-ink =
.aria-label = Промяна на рисунка
pdfjs-ink-canvas =
.aria-label = Изображение, създадено от потребител
## Alt-text dialog
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 = Добавяне на описание
@ -341,6 +367,14 @@ pdfjs-editor-alt-text-textarea =
## 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 = Ляво в средата — преоразмеряване
pdfjs-editor-resizer-top-left =
.aria-label = Горен ляв ъгъл — преоразмеряване
pdfjs-editor-resizer-top-middle =
@ -377,25 +411,41 @@ pdfjs-editor-colorpicker-pink =
pdfjs-editor-colorpicker-red =
.title = Червено
## Show all highlights
## This is a toggle button to show/hide all the highlights.
## New alt-text dialog
## Group note for entire feature: Alternative text (alt text) helps when people can't see the image. This feature includes a tool to create alt text automatically using an AI model that works locally on the user's device to preserve privacy.
pdfjs-editor-new-alt-text-disclaimer-learn-more-url = Научете повече
pdfjs-editor-new-alt-text-not-now-button = Не сега
## Image alt-text settings
pdfjs-editor-alt-text-settings-delete-model-button = Изтриване
## "Annotations removed" bar
## Add a signature dialog
## Tab names
## Tab panels
## Controls
pdfjs-editor-add-signature-image-upload-error-description = Проверете мрежовата си връзка или опитайте с друго изображение.
## Per-signature certificate row. The variants with an issuer / date in
## parentheses embed fully-localized context — no English fall-through.
##
## Variables:
## $issuer (String) - issuer or subject common name from the cert.
## $dateObj (Date) - notAfter date for the expired-with-date form.
## Dialog buttons
## Main menu for adding/removing signatures
## Editor toolbar
## Edit signature description dialog
pdfjs-digital-signature-properties-certificate-expired = Сертификат: с изтекъл срок на валидност

View File

@ -85,12 +85,24 @@ pdfjs-document-properties-button =
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 = পিডিএফ সংষ্করণ:
@ -191,6 +203,9 @@ pdfjs-page-scale-actual = প্রকৃত আকার
# $scale (Number) - percent value for page scale
pdfjs-page-scale-percent = { $scale }%
## PDF page
## Loading indicator messages
pdfjs-loading-error = পিডিএফ লোড করার সময় ত্রুটি দেখা দিয়েছে।
@ -201,6 +216,10 @@ 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
@ -216,3 +235,63 @@ pdfjs-password-invalid = ভুল পাসওয়ার্ড। অনুগ
pdfjs-password-ok-button = ঠিক আছে
pdfjs-password-cancel-button = বাতিল
pdfjs-web-fonts-disabled = ওয়েব ফন্ট নিষ্ক্রিয়: সংযুক্ত পিডিএফ ফন্ট ব্যবহার করা যাচ্ছে না।
## Editing
## Default editor aria labels
## 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
## Show all highlights
## This is a toggle button to show/hide all the highlights.
## New alt-text dialog
## Group note for entire feature: Alternative text (alt text) helps when people can't see the image. This feature includes a tool to create alt text automatically using an AI model that works locally on the user's device to preserve privacy.
## Image alt-text settings
## "Annotations removed" bar
## Add a signature dialog
## Tab names
## Tab panels
## Controls
## Dialog buttons
## Main menu for adding/removing signatures
## Editor toolbar
## Edit signature description dialog

View File

@ -89,12 +89,24 @@ pdfjs-document-properties-button =
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:
@ -195,6 +207,9 @@ pdfjs-page-scale-actual = Actual Size
# $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.
@ -220,3 +235,63 @@ 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
## Default editor aria labels
## 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
## Show all highlights
## This is a toggle button to show/hide all the highlights.
## New alt-text dialog
## Group note for entire feature: Alternative text (alt text) helps when people can't see the image. This feature includes a tool to create alt text automatically using an AI model that works locally on the user's device to preserve privacy.
## Image alt-text settings
## "Annotations removed" bar
## Add a signature dialog
## Tab names
## Tab panels
## Controls
## Dialog buttons
## Main menu for adding/removing signatures
## Editor toolbar
## Edit signature description dialog

View File

@ -1,150 +0,0 @@
# 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-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-label = بلگه هیم سکویی
## Secondary toolbar and context menu
pdfjs-tools-button =
.title = ٱوزارا
pdfjs-tools-button-label = ٱوزارا
pdfjs-cursor-text-select-tool-button-label = ٱوزار پسند هؽل
pdfjs-cursor-hand-tool-button =
.title = فعال کردن ٱوزار دست
pdfjs-cursor-hand-tool-button-label = ٱوزار دست
## Document properties dialog
pdfjs-document-properties-file-name = نوم فایل:
pdfjs-document-properties-file-size = هندا فایل:
pdfjs-document-properties-title = عونوان:
pdfjs-document-properties-author = هؽل کوݩ:
pdfjs-document-properties-subject = سرتال:
pdfjs-document-properties-page-size = هندا بلگه:
pdfjs-document-properties-page-size-unit-inches = اینچ
pdfjs-document-properties-page-size-unit-millimeters = میلی متر
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 })
##
pdfjs-document-properties-linearized-yes = هری
pdfjs-document-properties-linearized-no = ن
pdfjs-document-properties-close-button = بستن
## Print
# Variables:
# $progress (Number) - percent value
pdfjs-print-progress-percent = { $progress }%
pdfjs-print-progress-close-button = لقو
## Tooltips and alt text for side panel toolbar buttons
pdfjs-toggle-sidebar-button =
.title = آلشت هالت نوار کلی
## Password
pdfjs-password-ok-button = خا
pdfjs-password-cancel-button = لقو
## Editing
pdfjs-editor-stamp-button =
.title = ٱووردن یا آلشت شؽواتا
pdfjs-editor-stamp-button-label = ٱووردن یا آلشت شؽواتا
## Default editor aria labels
pdfjs-editor-stamp-editor =
.aria-label = آلشتگر شؽوات
##
# .default-content is used as a placeholder in an empty text editor.
pdfjs-free-text2 =
.aria-label = آلشتگر هؽل
.default-content = ناهاڌن پا هؽل کردن...
pdfjs-editor-comments-sidebar-no-comments-link = قلوه دووسته بۊین
## Alt-text dialog
pdfjs-editor-alt-text-cancel-button = لقو
## New alt-text dialog
## Group note for entire feature: Alternative text (alt text) helps when people can't see the image. This feature includes a tool to create alt text automatically using an AI model that works locally on the user's device to preserve privacy.
pdfjs-editor-new-alt-text-disclaimer-learn-more-url = قلوه دووسته بۊین
## Dialog buttons
pdfjs-editor-add-signature-cancel-button = لقو
## Comment popup
pdfjs-editor-edit-comment-popup-button-label = آلشت منشڌ
pdfjs-editor-edit-comment-popup-button =
.title = آلشت منشڌ
## Edit a comment dialog
# An existing comment is edited
pdfjs-editor-edit-comment-dialog-title-when-editing = آلشت منشڌ
pdfjs-editor-edit-comment-dialog-cancel-button = لقو

View File

@ -99,12 +99,24 @@ pdfjs-document-properties-button =
pdfjs-document-properties-button-label = Perzhioù an teul…
pdfjs-document-properties-file-name = Anv restr:
pdfjs-document-properties-file-size = Ment ar restr:
# 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 } Ke ({ $size_b } eizhbit)
# 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 } Me ({ $size_b } eizhbit)
pdfjs-document-properties-title = Titl:
pdfjs-document-properties-author = Aozer:
pdfjs-document-properties-subject = Danvez:
pdfjs-document-properties-keywords = Gerioù-alc'hwez:
pdfjs-document-properties-creation-date = Deiziad krouiñ:
pdfjs-document-properties-modification-date = Deiziad kemmañ:
# 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 = Krouer:
pdfjs-document-properties-producer = Kenderc'her PDF:
pdfjs-document-properties-version = Handelv PDF:
@ -194,7 +206,7 @@ pdfjs-find-previous-button-label = Kent
pdfjs-find-next-button =
.title = Kavout an tamm frazenn war-lerc'h o klotañ ganti
pdfjs-find-next-button-label = War-lerc'h
pdfjs-find-highlight-checkbox = Sklêrijennañ pep tra
pdfjs-find-highlight-checkbox = Usskediñ pep tra
pdfjs-find-match-case-checkbox-label = Teurel evezh ouzh ar pennlizherennoù
pdfjs-find-match-diacritics-checkbox-label = Doujañ dan tiredoù
pdfjs-find-entire-word-checkbox-label = Gerioù a-bezh
@ -229,6 +241,10 @@ pdfjs-rendering-error = Degouezhet ez eus bet ur fazi e-pad skrammañ ar bajenna
## 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
@ -256,13 +272,12 @@ pdfjs-editor-ink-button-label = Tresañ
pdfjs-editor-stamp-button =
.title = Ouzhpennañ pe aozañ skeudennoù
pdfjs-editor-stamp-button-label = Ouzhpennañ pe aozañ skeudennoù
pdfjs-editor-highlight-button =
.title = Sklerijennañ
pdfjs-editor-highlight-button-label = Sklerijennañ
pdfjs-highlight-floating-button1 =
.title = Sklerijennañ
.aria-label = Sklerijennañ
pdfjs-highlight-floating-button-label = Sklerijennañ
## Default editor aria labels
## Remove button for the various kind of editor.
##
@ -277,20 +292,25 @@ pdfjs-editor-stamp-add-image-button =
pdfjs-editor-stamp-add-image-button-label = Ouzhpennañ ur skeudenn
# This refers to the thickness of the line used for free highlighting (not bound to text)
pdfjs-editor-free-highlight-thickness-input = Tevded
pdfjs-free-text =
.aria-label = Aozer testennoù
pdfjs-ink =
.aria-label = Aozer tresoù
pdfjs-ink-canvas =
.aria-label = Skeudenn bet krouet gant an implijer·ez
## Alt-text dialog
pdfjs-editor-alt-text-add-description-label = Ouzhpennañ un deskrivadur
pdfjs-editor-alt-text-cancel-button = Nullañ
pdfjs-editor-alt-text-save-button = Enrollañ
# .placeholder: This is a placeholder for the alt text input area
pdfjs-editor-alt-text-textarea =
.placeholder = Da skouer, “Ur paotr yaouank ouzh taol o tebriñ boued”
## Editor resizers
## This is used in an aria label to help to understand the role of the resizer.
## Color picker
# This means "Color used to highlight text"
pdfjs-editor-highlight-colorpicker-label = Liv sklêrijennañ
pdfjs-editor-colorpicker-button =
.title = Cheñch liv
pdfjs-editor-colorpicker-yellow =
@ -321,3 +341,30 @@ pdfjs-editor-alt-text-settings-delete-model-button = Dilemel
pdfjs-editor-alt-text-settings-download-model-button = Pellgargañ
pdfjs-editor-alt-text-settings-downloading-model-button = O pellgargañ…
pdfjs-editor-alt-text-settings-close-button = Serriñ
## "Annotations removed" bar
## Add a signature dialog
## Tab names
## Tab panels
## Controls
## Dialog buttons
## Main menu for adding/removing signatures
## Editor toolbar
## Edit signature description dialog

View File

@ -65,12 +65,24 @@ pdfjs-document-properties-button =
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 } 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 } 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 बिसान:
@ -162,6 +174,9 @@ pdfjs-page-scale-actual = थार महर
# $scale (Number) - percent value for page scale
pdfjs-page-scale-percent = { $scale }%
## PDF page
## Loading indicator messages
pdfjs-loading-error = PDF ल'ड खालामनाय समाव मोनसे गोरोन्थि जाबाय।
@ -172,6 +187,10 @@ 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
@ -187,3 +206,63 @@ pdfjs-password-invalid = बाहायजायै पासवार्ड।
pdfjs-password-ok-button = OK
pdfjs-password-cancel-button = नेवसि
pdfjs-web-fonts-disabled = वेब फन्टखौ लोरबां खालामबाय: अरजाबहोनाय PDF फन्टखौ बाहायनो हायाखै।
## Editing
## Default editor aria labels
## 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
## Show all highlights
## This is a toggle button to show/hide all the highlights.
## New alt-text dialog
## Group note for entire feature: Alternative text (alt text) helps when people can't see the image. This feature includes a tool to create alt text automatically using an AI model that works locally on the user's device to preserve privacy.
## Image alt-text settings
## "Annotations removed" bar
## Add a signature dialog
## Tab names
## Tab panels
## Controls
## Dialog buttons
## Main menu for adding/removing signatures
## Editor toolbar
## Edit signature description dialog

View File

@ -39,18 +39,6 @@ pdfjs-open-file-button-label = Otvori
pdfjs-print-button =
.title = Štampaj
pdfjs-print-button-label = Štampaj
pdfjs-save-button =
.title = Sačuvaj
pdfjs-save-button-label = Sačuvaj
# Used in Firefox for Android as a tooltip for the download button (“download” is a verb).
pdfjs-download-button =
.title = Preuzmi
# 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 = Preuzmi
pdfjs-bookmark-button =
.title = Trenutna stranica (Prikaži URL sa trenutne stranice)
pdfjs-bookmark-button-label = Trenutna stranica
## Secondary toolbar and context menu
@ -75,27 +63,6 @@ pdfjs-cursor-text-select-tool-button-label = Alat za označavanje teksta
pdfjs-cursor-hand-tool-button =
.title = Omogući ručni alat
pdfjs-cursor-hand-tool-button-label = Ručni alat
pdfjs-scroll-page-button =
.title = Koristite pomicanje stranice
pdfjs-scroll-page-button-label = Pomicanje stranice
pdfjs-scroll-vertical-button =
.title = Koristite vertikalno pomicanje
pdfjs-scroll-vertical-button-label = Vertikalno pomicanje
pdfjs-scroll-horizontal-button =
.title = Koristite horizontalno pomicanje
pdfjs-scroll-horizontal-button-label = Horizontalno pomicanje
pdfjs-scroll-wrapped-button =
.title = Koristite omotno pomicanje
pdfjs-scroll-wrapped-button-label = Omotno pomicanje
pdfjs-spread-none-button =
.title = Ne izrađuj duplerice
pdfjs-spread-none-button-label = Bez duplerica
pdfjs-spread-odd-button =
.title = Izradi duplerice koje počinju s neparnim stranicama
pdfjs-spread-odd-button-label = Neparne duplerice
pdfjs-spread-even-button =
.title = Izradi duplerice koje počinju s parnim stranicama
pdfjs-spread-even-button-label = Parne duplerice
## Document properties dialog
@ -105,13 +72,13 @@ pdfjs-document-properties-button-label = Svojstva dokumenta...
pdfjs-document-properties-file-name = Naziv fajla:
pdfjs-document-properties-file-size = Veličina fajla:
# Variables:
# $kb (Number) - the PDF file size in kilobytes
# $b (Number) - the PDF file size in bytes
pdfjs-document-properties-size-kb = { NUMBER($kb, maximumSignificantDigits: 3) } KB ({ $b } bajtova)
# $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 } bajta)
# Variables:
# $mb (Number) - the PDF file size in megabytes
# $b (Number) - the PDF file size in bytes
pdfjs-document-properties-size-mb = { NUMBER($mb, maximumSignificantDigits: 3) } MB ({ $b } bajtova)
# $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 } bajta)
pdfjs-document-properties-title = Naslov:
pdfjs-document-properties-author = Autor:
pdfjs-document-properties-subject = Predmet:
@ -119,8 +86,9 @@ pdfjs-document-properties-keywords = Ključne riječi:
pdfjs-document-properties-creation-date = Datum kreiranja:
pdfjs-document-properties-modification-date = Datum promjene:
# Variables:
# $dateObj (Date) - the creation/modification date and time of the PDF file
pdfjs-document-properties-date-time-string = { DATETIME($dateObj, dateStyle: "short", timeStyle: "medium") }
# $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 = Kreator:
pdfjs-document-properties-producer = PDF stvaratelj:
pdfjs-document-properties-version = PDF verzija:
@ -147,11 +115,6 @@ pdfjs-document-properties-page-size-dimension-name-string = { $width } × { $hei
##
# The linearization status of the document; usually called "Fast Web View" in
# English locales of Adobe software.
pdfjs-document-properties-linearized = Brzi web pregled:
pdfjs-document-properties-linearized-yes = Da
pdfjs-document-properties-linearized-no = Ne
pdfjs-document-properties-close-button = Zatvori
## Print
@ -168,8 +131,6 @@ pdfjs-printing-not-ready = Upozorenje: PDF nije u potpunosti učitan za štampan
pdfjs-toggle-sidebar-button =
.title = Uključi/isključi bočnu traku
pdfjs-toggle-sidebar-notification-button =
.title = Uključi/isključi bočnu traku (dokument sadrži obris/priloge/slojeve)
pdfjs-toggle-sidebar-button-label = Uključi/isključi bočnu traku
pdfjs-document-outline-button =
.title = Prikaži outline dokumenta (dvoklik za skupljanje/širenje svih stavki)
@ -177,19 +138,12 @@ pdfjs-document-outline-button-label = Konture dokumenta
pdfjs-attachments-button =
.title = Prikaži priloge
pdfjs-attachments-button-label = Prilozi
pdfjs-layers-button =
.title = Prikaži slojeve (dvostruki klik da biste vratili sve slojeve na zadano stanje)
pdfjs-layers-button-label = Slojevi
pdfjs-thumbs-button =
.title = Prikaži thumbnailove
pdfjs-thumbs-button-label = Thumbnailovi
pdfjs-current-outline-item-button =
.title = Pronađi trenutnu stavku strukture
pdfjs-current-outline-item-button-label = Trenutna stavka strukture
pdfjs-findbar-button =
.title = Pronađi u dokumentu
pdfjs-findbar-button-label = Pronađi
pdfjs-additional-layers = Dodatni slojevi
## Thumbnails panel item (tooltip and alt text for images)
@ -215,27 +169,8 @@ pdfjs-find-next-button =
pdfjs-find-next-button-label = Sljedeće
pdfjs-find-highlight-checkbox = Označi sve
pdfjs-find-match-case-checkbox-label = Osjetljivost na karaktere
pdfjs-find-match-diacritics-checkbox-label = Podudaranje dijakritika
pdfjs-find-entire-word-checkbox-label = Cijele riječi
pdfjs-find-reached-top = Dostigao sam vrh dokumenta, nastavljam sa dna
pdfjs-find-reached-bottom = Dostigao sam kraj dokumenta, nastavljam sa vrha
# 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 } od { $total } podudaranje
[few] { $current } od { $total } podudaranja
*[other] { $current } od { $total } podudaranja
}
# Variables:
# $limit (Number) - the maximum number of matches
pdfjs-find-match-count-limit =
{ $limit ->
[one] Više od { $limit } podudaranja
[few] Više od { $limit } podudaranja
*[other] Više od { $limit } podudaranja
}
pdfjs-find-not-found = Fraza nije pronađena
## Predefined zoom values
@ -250,10 +185,6 @@ pdfjs-page-scale-percent = { $scale }%
## PDF page
# Variables:
# $page (Number) - the page number
pdfjs-page-landmark =
.aria-label = Stranica { $page }
## Loading indicator messages
@ -272,9 +203,6 @@ pdfjs-rendering-error = Došlo je do greške prilikom renderiranja strane.
# Some common types are e.g.: "Check", "Text", "Comment", "Note"
pdfjs-text-annotation-type =
.alt = [{ $type } pribilješka]
# Variables:
# $dateObj (Date) - the modification date and time of the annotation
pdfjs-annotation-date-time-string = { DATETIME($dateObj, dateStyle: "short", timeStyle: "medium") }
## Password
@ -286,303 +214,60 @@ pdfjs-web-fonts-disabled = Web fontovi su onemogućeni: nemoguće koristiti uba
## Editing
pdfjs-editor-free-text-button =
.title = Tekst
pdfjs-editor-free-text-button-label = Tekst
pdfjs-editor-ink-button =
.title = Crtanje
pdfjs-editor-ink-button-label = Crtanje
pdfjs-editor-stamp-button =
.title = Dodajte ili uredite slike
pdfjs-editor-stamp-button-label = Dodajte ili uredite slike
pdfjs-editor-highlight-button =
.title = Istaknite
pdfjs-editor-highlight-button-label = Istaknite
pdfjs-highlight-floating-button1 =
.title = Istaknite
.aria-label = Istaknite
pdfjs-highlight-floating-button-label = Istaknite
pdfjs-editor-signature-button =
.title = Dodaj potpis
pdfjs-editor-signature-button-label = Dodaj potpis
## Default editor aria labels
# “Highlight” is a noun, the string is used on the editor for highlights.
pdfjs-editor-highlight-editor =
.aria-label = Uređivač istaknutih elemenata
# “Drawing” is a noun, the string is used on the editor for drawings.
pdfjs-editor-ink-editor =
.aria-label = Uređivač crteža
# Used when a signature editor is selected/hovered.
# Variables:
# $description (String) - a string describing/labeling the signature.
pdfjs-editor-signature-editor1 =
.aria-description = Uređivač potpisa: { $description }
pdfjs-editor-stamp-editor =
.aria-label = Uređivač slika
## Remove button for the various kind of editor.
pdfjs-editor-remove-ink-button =
.title = Ukloni crtež
pdfjs-editor-remove-freetext-button =
.title = Ukloni tekst
pdfjs-editor-remove-stamp-button =
.title = Ukloni sliku
pdfjs-editor-remove-highlight-button =
.title = Ukloni istaknuti dio
pdfjs-editor-remove-signature-button =
.title = Ukloni potpis
##
# Editor Parameters
pdfjs-editor-free-text-color-input = Boja
pdfjs-editor-free-text-size-input = Veličina
pdfjs-editor-ink-color-input = Boja
pdfjs-editor-ink-thickness-input = Debljina
pdfjs-editor-ink-opacity-input = Neprozirnost
pdfjs-editor-stamp-add-image-button =
.title = Dodaj sliku
pdfjs-editor-stamp-add-image-button-label = Dodaj sliku
# This refers to the thickness of the line used for free highlighting (not bound to text)
pdfjs-editor-free-highlight-thickness-input = Debljina
pdfjs-editor-free-highlight-thickness-title =
.title = Promijenite debljinu prilikom označavanja stavki koje nisu tekst
pdfjs-editor-add-signature-container =
.aria-label = Kontrole potpisa i sačuvani potpisi
pdfjs-editor-signature-add-signature-button =
.title = Dodaj novi potpis
pdfjs-editor-signature-add-signature-button-label = Dodaj novi potpis
# Used on the button to use an already saved signature.
# Variables:
# $description (String) - a string describing/labeling the signature.
pdfjs-editor-add-saved-signature-button =
.title = Sačuvani potpis: { $description }
# .default-content is used as a placeholder in an empty text editor.
pdfjs-free-text2 =
.aria-label = Uređivač teksta
.default-content = Počnite kucati…
## Alt-text dialog
pdfjs-editor-alt-text-button-label = Alternativni tekst
pdfjs-editor-alt-text-edit-button =
.aria-label = Uredi alternativni tekst
pdfjs-editor-alt-text-dialog-label = Odaberite opciju
pdfjs-editor-alt-text-dialog-description = Alternativni tekst (Alt tekst) pomaže kada ljudi ne mogu vidjeti sliku ili kada se ona ne učitava.
pdfjs-editor-alt-text-add-description-label = Dodajte opis
pdfjs-editor-alt-text-add-description-description = Ciljajte na 1-2 rečenice koje opisuju temu, okruženje ili radnju.
pdfjs-editor-alt-text-mark-decorative-label = Označi kao dekorativno
pdfjs-editor-alt-text-mark-decorative-description = Ovo se koristi za ukrasne slike, poput okvira ili vodenih žigova.
pdfjs-editor-alt-text-cancel-button = Otkaži
pdfjs-editor-alt-text-save-button = Sačuvaj
pdfjs-editor-alt-text-decorative-tooltip = Označeno kao dekorativno
# .placeholder: This is a placeholder for the alt text input area
pdfjs-editor-alt-text-textarea =
.placeholder = Na primjer, „Mladić sjeda za stol da jede obrok“
# Alternative text (alt text) helps when people can't see the image.
pdfjs-editor-alt-text-button =
.aria-label = Alternativni tekst
## Editor resizers
## This is used in an aria label to help to understand the role of the resizer.
pdfjs-editor-resizer-top-left =
.aria-label = Gornji lijevi ugao — promjena veličine
pdfjs-editor-resizer-top-middle =
.aria-label = Gore u sredini — promijeni veličinu
pdfjs-editor-resizer-top-right =
.aria-label = Gornji desni ugao — promijeni veličinu
pdfjs-editor-resizer-middle-right =
.aria-label = Sredina desno — promijeni veličinu
pdfjs-editor-resizer-bottom-right =
.aria-label = Donji desni ugao — promijeni veličinu
pdfjs-editor-resizer-bottom-middle =
.aria-label = Donji srednji dio — promijeni veličinu
pdfjs-editor-resizer-bottom-left =
.aria-label = Donji lijevi ugao — promijeni veličinu
pdfjs-editor-resizer-middle-left =
.aria-label = Sredina lijevo — promijeni veličinu
## Color picker
# This means "Color used to highlight text"
pdfjs-editor-highlight-colorpicker-label = Boja isticanja
pdfjs-editor-colorpicker-button =
.title = Promijeni boju
pdfjs-editor-colorpicker-dropdown =
.aria-label = Izbor boja
pdfjs-editor-colorpicker-yellow =
.title = Žuta
pdfjs-editor-colorpicker-green =
.title = Zelena
pdfjs-editor-colorpicker-blue =
.title = Plava
pdfjs-editor-colorpicker-pink =
.title = Roza
pdfjs-editor-colorpicker-red =
.title = Crvena
## Show all highlights
## This is a toggle button to show/hide all the highlights.
pdfjs-editor-highlight-show-all-button-label = Prikaži sve
pdfjs-editor-highlight-show-all-button =
.title = Prikaži sve
## New alt-text dialog
## Group note for entire feature: Alternative text (alt text) helps when people can't see the image. This feature includes a tool to create alt text automatically using an AI model that works locally on the user's device to preserve privacy.
# Modal header positioned above a text box where users can edit the alt text.
pdfjs-editor-new-alt-text-dialog-edit-label = Uredi alternativni tekst (opis slike)
# Modal header positioned above a text box where users can add the alt text.
pdfjs-editor-new-alt-text-dialog-add-label = Dodaj alternativni tekst (opis slike)
pdfjs-editor-new-alt-text-textarea =
.placeholder = Ovdje napišite svoj opis…
# This text refers to the alt text box above this description. It offers a definition of alt text.
pdfjs-editor-new-alt-text-description = Kratak opis za osobe koje ne mogu vidjeti sliku ili kada se slika ne učitava.
# This is a required legal disclaimer that refers to the automatically created text inside the alt text box above this text. It disappears if the text is edited by a human.
pdfjs-editor-new-alt-text-disclaimer1 = Ovaj alternativni tekst je kreiran automatski i moguće je da je netačan.
pdfjs-editor-new-alt-text-disclaimer-learn-more-url = Saznajte više
pdfjs-editor-new-alt-text-create-automatically-button-label = Automatski kreiraj alternativni tekst
pdfjs-editor-new-alt-text-not-now-button = Ne sada
pdfjs-editor-new-alt-text-error-title = Nije moguće automatski kreirati alternativni tekst
pdfjs-editor-new-alt-text-error-description = Molimo vas da napišete vlastiti alternativni tekst ili pokušate ponovo kasnije.
pdfjs-editor-new-alt-text-error-close-button = Zatvori
# Variables:
# $totalSize (Number) - the total size (in MB) of the AI model.
# $downloadedSize (Number) - the downloaded size (in MB) of the AI model.
pdfjs-editor-new-alt-text-ai-model-downloading-progress = Preuzimanje alternativnog tekstualnog AI modela ({ $downloadedSize } od { $totalSize } MB)
.aria-valuetext = Preuzimanje alternativnog tekstualnog AI modela ({ $downloadedSize } od { $totalSize } MB)
# This is a button that users can click to edit the alt text they have already added.
pdfjs-editor-new-alt-text-added-button =
.aria-label = Alternativni tekst je dodan
pdfjs-editor-new-alt-text-added-button-label = Alternativni tekst je dodan
# This is a button that users can click to open the alt text editor and add alt text when it is not present.
pdfjs-editor-new-alt-text-missing-button =
.aria-label = Nedostaje alternativni tekst
pdfjs-editor-new-alt-text-missing-button-label = Nedostaje alternativni tekst
# This is a button that opens up the alt text modal where users should review the alt text that was automatically generated.
pdfjs-editor-new-alt-text-to-review-button =
.aria-label = Alternativni tekst recenzije
pdfjs-editor-new-alt-text-to-review-button-label = Alternativni tekst recenzije
# "Created automatically" is a prefix that will be added to the beginning of any alt text that has been automatically generated. After the colon, the user will see/hear the actual alt text description. If the alt text has been edited by a human, this prefix will not appear.
# Variables:
# $generatedAltText (String) - the generated alt-text.
pdfjs-editor-new-alt-text-generated-alt-text-with-disclaimer = Automatski kreirano: { $generatedAltText }
## Image alt-text settings
pdfjs-image-alt-text-settings-button =
.title = Postavke alternativnog teksta slike
pdfjs-image-alt-text-settings-button-label = Postavke alternativnog teksta slike
pdfjs-editor-alt-text-settings-dialog-label = Postavke alternativnog teksta slike
pdfjs-editor-alt-text-settings-automatic-title = Automatski alternativni tekst
pdfjs-editor-alt-text-settings-create-model-button-label = Automatski kreiraj alternativni tekst
pdfjs-editor-alt-text-settings-create-model-description = Predlaže opise kako bi pomogao ljudima koji ne vide sliku ili kada se slika ne učitava.
# Variables:
# $totalSize (Number) - the total size (in MB) of the AI model.
pdfjs-editor-alt-text-settings-download-model-label = Alternativni tekst AI model ({ $totalSize } MB)
pdfjs-editor-alt-text-settings-ai-model-description = Radi lokalno na vašem uređaju tako da vaši podaci ostaju privatni. Potrebno za automatski alternativni tekst.
pdfjs-editor-alt-text-settings-delete-model-button = Izbriši
pdfjs-editor-alt-text-settings-download-model-button = Preuzmi
pdfjs-editor-alt-text-settings-downloading-model-button = Preuzimam…
pdfjs-editor-alt-text-settings-editor-title = Uređivač alternativnog teksta
pdfjs-editor-alt-text-settings-show-dialog-button-label = Odmah prikaži uređivač alternativnog teksta prilikom dodavanja slike
pdfjs-editor-alt-text-settings-show-dialog-description = Pomaže vam da osigurate da sve vaše slike imaju alternativni tekst.
pdfjs-editor-alt-text-settings-close-button = Zatvori
## "Annotations removed" bar
pdfjs-editor-undo-bar-message-highlight = Istaknuto je uklonjeno
pdfjs-editor-undo-bar-message-freetext = Tekst uklonjen
pdfjs-editor-undo-bar-message-ink = Crtež uklonjen
pdfjs-editor-undo-bar-message-stamp = Slika uklonjena
pdfjs-editor-undo-bar-message-signature = Potpis uklonjen
# Variables:
# $count (Number) - the number of removed annotations.
pdfjs-editor-undo-bar-message-multiple =
{ $count ->
[one] { $count } bilješka uklonjena
[few] { $count } bilješke uklonjene
*[other] { $count } bilješki uklonjeno
}
pdfjs-editor-undo-bar-undo-button =
.title = Poništi
pdfjs-editor-undo-bar-undo-button-label = Poništi
pdfjs-editor-undo-bar-close-button =
.title = Zatvori
pdfjs-editor-undo-bar-close-button-label = Zatvori
## Add a signature dialog
pdfjs-editor-add-signature-dialog-label = Ovaj modalni prozor omogućava korisniku da kreira potpis koji će dodati PDF dokumentu. Korisnik može urediti ime (koje služi i kao alternativni tekst) i opcionalno sačuvati potpis za ponovnu upotrebu.
pdfjs-editor-add-signature-dialog-title = Dodaj potpis
## Tab names
# Type is a verb (you can type your name as signature)
pdfjs-editor-add-signature-type-button = Ukucaj
.title = Ukucaj
# Draw is a verb (you can draw your signature)
pdfjs-editor-add-signature-draw-button = Napiši
.title = Napiši
pdfjs-editor-add-signature-image-button = Slika
.title = Slika
## Tab panels
pdfjs-editor-add-signature-type-input =
.aria-label = Ukucajte svoj potpis
.placeholder = Ukucajte svoj potpis
pdfjs-editor-add-signature-draw-placeholder = Napišite svoj potpis
pdfjs-editor-add-signature-draw-thickness-range-label = Debljina
# Variables:
# $thickness (Number) - the thickness (in pixels) of the line used to draw a signature.
pdfjs-editor-add-signature-draw-thickness-range =
.title = Debljina pisanja: { $thickness }
pdfjs-editor-add-signature-image-placeholder = Prevucite datoteku ovdje da biste je učitali
pdfjs-editor-add-signature-image-browse-link =
{ PLATFORM() ->
[macos] Ili odaberite slikovne datoteke
*[other] Ili pregledajte slikovne datoteke
}
## Controls
pdfjs-editor-add-signature-description-label = Opis (alternativni tekst)
pdfjs-editor-add-signature-description-input =
.title = Opis (alternativni tekst)
pdfjs-editor-add-signature-description-default-when-drawing = Potpis
pdfjs-editor-add-signature-clear-button-label = Očisti potpis
pdfjs-editor-add-signature-clear-button =
.title = Očisti potpis
pdfjs-editor-add-signature-save-checkbox = Sačuvaj potpis
pdfjs-editor-add-signature-save-warning-message = Dostigli ste ograničenje od 5 sačuvanih potpisa. Uklonite jedan da biste sačuvali više.
pdfjs-editor-add-signature-image-upload-error-title = Nije moguće učitati sliku
pdfjs-editor-add-signature-image-upload-error-description = Provjerite mrežnu vezu ili pokušajte s drugom slikom.
pdfjs-editor-add-signature-image-no-data-error-title = Nije moguće pretvoriti ovu sliku u potpis
pdfjs-editor-add-signature-image-no-data-error-description = Molimo pokušajte učitati drugu sliku.
pdfjs-editor-add-signature-error-close-button = Zatvori
## Dialog buttons
pdfjs-editor-add-signature-cancel-button = Otkaži
pdfjs-editor-add-signature-add-button = Dodaj
pdfjs-editor-edit-signature-update-button = Ažuriraj
## Main menu for adding/removing signatures
pdfjs-editor-delete-signature-button1 =
.title = Ukloni sačuvani potpis
pdfjs-editor-delete-signature-button-label1 = Ukloni sačuvani potpis
## Editor toolbar
pdfjs-editor-add-signature-edit-button-label = Uredi opis
## Edit signature description dialog
pdfjs-editor-edit-signature-dialog-title = Uredi opis

View File

@ -98,12 +98,24 @@ pdfjs-document-properties-button =
pdfjs-document-properties-button-label = Propietats del document…
pdfjs-document-properties-file-name = Nom del fitxer:
pdfjs-document-properties-file-size = Mida del fitxer:
# 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ítol:
pdfjs-document-properties-author = Autor:
pdfjs-document-properties-subject = Assumpte:
pdfjs-document-properties-keywords = Paraules clau:
pdfjs-document-properties-creation-date = Data de creació:
pdfjs-document-properties-modification-date = Data de modificació:
# 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 = Creador:
pdfjs-document-properties-producer = Generador de PDF:
pdfjs-document-properties-version = Versió de PDF:
@ -231,6 +243,10 @@ pdfjs-rendering-error = S'ha produït un error mentre es renderitzava la pàgina
## 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
@ -256,6 +272,12 @@ pdfjs-editor-ink-button =
.title = Dibuixa
pdfjs-editor-ink-button-label = Dibuixa
## Default editor aria labels
## Remove button for the various kind of editor.
##
# Editor Parameters
@ -264,11 +286,58 @@ pdfjs-editor-free-text-size-input = Mida
pdfjs-editor-ink-color-input = Color
pdfjs-editor-ink-thickness-input = Gruix
pdfjs-editor-ink-opacity-input = Opacitat
pdfjs-free-text =
.aria-label = Editor de text
pdfjs-free-text-default-content = Escriviu…
pdfjs-ink =
.aria-label = Editor de dibuix
pdfjs-ink-canvas =
.aria-label = Imatge creada per l'usuari
## Alt-text dialog
pdfjs-editor-alt-text-cancel-button = Cancel·la
## Editor resizers
## This is used in an aria label to help to understand the role of the resizer.
## Color picker
## Show all highlights
## This is a toggle button to show/hide all the highlights.
## New alt-text dialog
## Group note for entire feature: Alternative text (alt text) helps when people can't see the image. This feature includes a tool to create alt text automatically using an AI model that works locally on the user's device to preserve privacy.
## Image alt-text settings
## "Annotations removed" bar
## Add a signature dialog
## Tab names
## Tab panels
## Controls
## Dialog buttons
pdfjs-editor-add-signature-cancel-button = Cancel·la
## Main menu for adding/removing signatures
## Editor toolbar
## Edit signature description dialog

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